Modem Not detected Raspberry Pi


#1

Hi,

I am configuring my Raspberry Pi to connect to the Hologram network through a Huawei E303 device. I have followed the tutorials and it is connecting successfully. I am able to ping websites and the USB stick shows it is connecting. However whenever I try to use the Hologram Cloud through the Python SDK I get the following error.
Exceptions.HologramError.NetworkError: Modem not detected

Am I missing an important setup step? How can I specify the modem it should use? If I am understanding it correctly the usb device is my modem so since it is working what am I missing for the python SDK? Thanks for any help you can give me.

My test script is the following:

from Hologram.HologramCloud import HologramCloud
hologram = HologramCloud(dict(), network=‘cellular’)

result = hologram.network.connect()
response_code = hologram.sendMessage(“hello,world”)
print hologram.getResultString(response_code)

hologram.network.disconnect()


#2

Hi, can you paste the output of the lsusb command?

Are you going through the tutorial with the usb modeswitch steps or are you doing the one where you set everything up in the web browser?


#3

Here is my terminal output.

I have tried both but currently my setup follows the tutorial that installs usb modeswitch but then sets everything up on the website. Is one better than the other?

Thanks


#4

lsusb suggests that it is not in modem mode. Did you run the suggested usb_modeswitch script when you first tried it?


#5

I too tried this lesson… .there is no mention of lsusb

  • celluar modem not detected- powereed on - yes - red light

… I also tried this lesson and was successful - as I left a comment -positive -

I was able to connect…and send basic texts…Im wanting to send photos too…
… Ok… will go on to another lesson:


no modem aware on raspberry pi

sc


#6

I was able to set up the system with "add celluar to a raspberry pi with holgoram nova…
thought I would try Hologram Python SDK…

heres the code:

pi@raspberrypi:~ $ sudo hologram send " test "
RESPONSE MESSAGE: Message sent successfully
pi@raspberrypi:~ $ sudo hologram send "test no network cable"
RTNETLINK answers: File exists
RESPONSE MESSAGE: Message sent successfully
pi@raspberrypi:~ $ sudo hologram send "no atcive lights on modem-yet functioning"
RTNETLINK answers: File exists
RESPONSE MESSAGE: Message sent successfully
pi@raspberrypi:~ $ from Hologram.HologramCloud import HologramCloud
from: can’t read /var/mail/Hologram.HologramCloud
pi@raspberrypi:~ $


#7

Looks like it’s working. Those RTNETLINK messages are warnings that can be ignored. We’ll remove that in a future release.
The last line is supposed to go inside of a python script so it won’t work on the command line


#8

i have tried to connect raspberry pi to celluar with huawei e303 modem
seems even with lsusb …
not sure why raspberry pi not seeing the modem…
see code…
Thanks!

pi@raspberrypi:~ $ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:c6:77:08 txqueuelen 1000 (Ethernet)
RX packets 251 bytes 22051 (21.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 68 bytes 10533 (10.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1 (Local Loopback)
RX packets 9 bytes 524 (524.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 9 bytes 524 (524.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:93:22:5d txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

pi@raspberrypi:~ $ sudo dhclient eth1
Cannot find device "eth1"
pi@raspberrypi:~ $ lsusb
Bus 001 Device 006: ID 046d:c016 Logitech, Inc. Optical Wheel Mouse
Bus 001 Device 005: ID 1c4f:0016 SiGma Micro
Bus 001 Device 008: ID 1546:1102 U-Blox AG
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@raspberrypi:~ $


#9

Thanks for the response. Still have issue with modem


#10

Actually, I think the issue is the inability of the raspberry pi to discover the device either as a storage or as a modem… have tried a few things…but the modem only works (for me) if I go with the Hologram Nova installation.


#11

First step is to have the e303 show up in lsusb.

You could also look at:
dmesg or dmesg | tail before and after plugging the e303 in.

Post the results.


#12

I installed the usb_modeswitch like the tutorial stated. In the past I have tried running a long sub_modeswitch command which has not helped. I tried running it again but I get a message that “No device in target mode or class is found.” This is the command I found:

sudo usb_modeswitch -v 0x12d1 -p 0x1f01 -V 0x12d1 -P 0x1001 -M “55534243000000000000000000000611060000000000000000000000000000”

Thanks


#13

Before we go any further verify what lsusb says when you plug the e303 in.

Also confirm that you really have a e303 and not some other variant.

For the e3513 I had to use this usb_modeswitch command:
sudo usb_modeswitch -v 0x12d1 -p 0x1f01 -V 0x12d1 -P 0x1001 -M “55534243123456780000000000000011062000000100000000000000000000”

Maybe worth a try, however you want to do another lsusb command after running usb_modeswitch.

davef


#14

Thanks for your help davef.

The box says its an HUAWEI e303 but all the documentation is not in English and the Raspberry seems to think it is an E353/E3131. It looks like an e303 but I can’t find anything that verifies that. Is there another way to tell?

I tried your new command and got the same message of No devices in target mode


#15

It is an e303! The inside is labeled


#16

I tried… using the lsusb… sudo nano /etc/networks/interfaces

tired hot plugin of modem…
changed the code to allow for hot plug in…

Perhaps… someone can write up a script or code something to download?
When I did the Hologram Nova … i was able to get connection…
but the modem never had the full lights showing actiivity…

Will get back to this project tomorrow.


#17

I think that 12d1:14db is the HiLink mode. Did you follow the instructions to disable automatic mode switching and then reboot?


#18

jkraft,

Have you got lusub on your RaspberryPi?


#19

So I think in a recent reorganization we lost the page in the docs that describes how to do this. Lemme post a few relevant excerpts.

Install the usb-modeswitch utility:

sudo apt-get install usb-modeswitch

Edit the file /etc/usb_modeswitch.conf and change the line that says DisableSwitching=0 to DisableSwitching=1

Save the file and reboot your system.

Plug the modem into a USB port. On the command line, list your connected USB
devices with lsusb. In the output you should see a line for the modem:

Bus 001 Device 006: ID 12d1:1f01 Huawei Technologies Co., Ltd.

The ID ending with 1f01 indicates that the modem is in storage mode. Switch it into PPP
modem mode by running the command:

sudo usb_modeswitch -v 0x12d1 -p 0x1f01 -V 0x12d1 -P 0x1001 -M "55534243000000000000000000000611060000000000000000000000000000"

Then run lsusb again, and you should see that the modem’s device ID and
description has changed:

Bus 001 Device 008: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem

Once you do this, then you should be able to use the modem with the Hologram Python SDK.

Note that if all you want is an internet connection, then you can just use the default HiLink mode and not deal with this.


#20

Hi Reuben,

Thanks for the response.

I am a little confused. I followed those instructions but it seems to have told the USB stick to just be a memory device. After executing that it does not have a light showing it is connected and I am not able to ping hologram.io. Did it do the opposite or is it supposed to be disconnected from the 3G network in order to be used by the SDK?

Thanks