Modem Not detected Raspberry Pi

Correct.

The modem has two different modes: HiLink and Serial Modem Mode. If you use HiLink, then you configure it in the web browser and it shows up as an ethernet device and the modem itself takes care of establishing the connection.
In order to have the Hologram SDK manage the connection instead, then it must be in serial modem mode. This mode is also the only way to send the modem AT commands for doing things like SMS or getting signal strength.

I should also mention that the SDK has a “network agnostic” mode that you can use to do some basic stuff like sending a cloud message over any available network connection. That would work in HiLink mode, but most features won’t be available. I’ll get some info about that for you soon.

Ok thank you! I would really appreciate more information on that!

My goal is to use this as an IOT engineering project that will send GPS coordinates to the hologram cloud. Then I want them sent to a website or rendered in a google maps API. For those types of messages I am assuming I would need the serial modem or for just sending messages would the HiLink be a better option?

Thanks again for your help!

Hmm yeah, for just sending a message that might be a little simpler since it’ll just connect on it’s own though you have to be careful about data usage there.

I’ll get you that info about network agnostic mode tomorrow

Ok thanks! That would be great!

Don’t they both use data? Is one better than the other?

Do you mind if I ask another question?
(I completely understand if you don’t have time. Thanks for all your help so far)

I tried sending a message to the hologram cloud with the new settings and it seems to be connecting to the network well! It still however throws an error “TypeError: object of type ‘NoneType’ has no len()” I have not looked too in-depth at the SDK source code but it seems to be failing to create an authentication string when I pass in my credentials like the tutorial instructs. I am assuming the error is on my end but not sure where.

Here is the script from the tutorial and my error. (The 6digitID is the device ID I received from my dashboard)

Yes I followed instructions… just seems like the modem is not discovered as you can
see from the lsusb… ugh

Your lsusb output above shows a Nova connected (that’s the UBlox one)

What does the output look like when you plug in the E303?

Try something like this:

hologram = HologramCloud(credentials, network='', authentication_type='csrpsk')

sent = hologram.sendMessage("something")

Setting network to an empty string means it won’t try to manage the network and will just send the message over whatever connection it can find. No need for the connect calls in this case.

Note that you need to set the authentication_type since the default one won’t really work with the e303. That might be the reason for that exception. We’ll have to make it return a better error there.

@chappell I think you might be confused. This thread is about the Huawei E303 modem, but it looks like you have the Nova. You’re looking at the wrong tutorial. Take a look at:

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

Reuben- thanks for the effort here. I have stopped work on this project as the team has moved into
a different direction.

Sorry to bring back an old thread @Reuben but just came across your post where you listed the methods to get the USB dongle working. I’ve got the Huawei Dongle on my Raspberry Pi that was just showing without any mode. Then I followed your instructions to enabled switching in the usb_modeswitch.conf file and then after reboot it showed up as USB Storage, then I ran your usb_modeswitch command which then switched it to HSDPA Modem. So that works but everytime I reboot the Pi it goes back to Mass Storage Device and I have to run that command again. Is there a way to make this stick? also instead of being in HSDPA Modem mode, how do you enter ethernet mode so that the dongle becomes a ethernet device with it’s own IP address?

If you reverse the change you made to the usb_modeswitch.conf file then it should switch back to ethernet mode next time you reboot.
To get it to stick I think I’d suggest putting that command into a script that runs on startup. There is also an AT command that I think will save the mode but this can be a little risky as it could get stuck somewhere. I can try to dig up that specific command for you. I think we had it in a tutorial from a long time ago.

I am also facing same problem. USB dongle is not detected as Modem in raspberry pi 4
Here are the steps I have followed:

$ sudo apt-get update
$ sudo apt-get install usb-modeswitch usb-modeswitch-data ppp
$ sudo apt-get install wvdial
$ lsusb

$ cd /etc/usb_modeswitch.d/
$ sudo tar -xzvf /usr/share/usb_modeswitch/configPack.tar.gz 12d1:1f01
$ sudo nano 12d1:1f01

replaced the content of 12d1:1f01 file with

# Huawei E3531s-2 - switch to modem mode instead of HiLink CDC-Ether mode
TargetVendor=0x12d1
TargetProduct=0x1f01

# switch to 12d1:1001 (modem mode, 3 virtual serial ports)
MessageContent="55534243123456780000000000000011062000000100000000000000000000"

now the i get this result:

$ lsusb

Then I run

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

The response reading fails

#########################
Finally I have solved it and now the dongle is detected as modem. Here are the steps required to detect automatically:

  • Open this file sudo nano /etc/usb_modeswitch.conf and set the flat to true
    DisableSwitching=1

  • Create a file like /etc/udev/rules.d/huawei_e303.rules
    $ sudo touch /etc/udev/rules.d/huawei_e303.rules

edit the file and copy following content in side the file

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1f01", RUN+="/usr/sbin/usb_modeswitch -v 0x12d1 -p 0x1f01 -V 0x12d1 -P 0x0x1001 -M '55534243000000000000000000000611060000000000000000000000000000'"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1f01", RUN+="/bin/usr/ -c 'modprobe option && echo 12d1 1506 > /sys/bus/usb-serial/drivers/option1/new_id'"

Then execute following command

$ sudo udevadm control --reload-rules

if you enter lsusb you will the product with label as modem