R404 Not working (enumeration and power brown out)

I just received an R404 cat-1 lte modem. i have 2 raspberry pi’s, a model b and a zero w. I also have a few linux laptops laying around. All of these devices work fine with the 3g modem i already have. I first tried the r404 on the pi model b with a 2amp supply and the blue led turned on first and nothing else happened while the red led stayed off. i rebooted that pi and neither led came on again. I tried the second usb port but still the same. I then unplugged the working 3g version from the pi zero w and plugged the r404 in and still no led comes on. To be noted i did also type the modprobe command in both pi’s and the ubuntu laptop i tried next, and on neither pi did it show up in usb devices. i then tried the fully updated ubuntu laptop (the 3g version works on this as well) and first the blue led comes on and remains solid then a couple seconds later the red led comes on and it registers under usb devices as Qualcomm, Inc. but when trying to run any hologram commands I get error modem not detected. Any help…

Small update, on the laptop after running the modprobe command (this command seems to have to be run every time i reboot the laptop) sudo hologram modem connect -v detected NovaM_R404, found the working port at ttyusb2 and added system wide routes but it just hangs at sending a message or checking signal. The leds just stay lit no matter if i connect or disconnect. which are the only things i am able to do and just on the linux laptop as neither pi will power it up.

I am having the identical problem - it is not just you. On very rare occiasions it will enumerate and work - typically one out of 20. I thought maybe it was the power supply or raspberry pi. I bought a new board and 2.5 amp power supply with no change. I have a different brand USB modem that enumerates 100%. If it is not detected lsusb command will not show much. dmesg -w is helpful to see usb detection. This is frustrating as the modem is supposedly design to work with the raspberry pi.

I posted “Nova R404 will not enumerate” last week. You may want to look at that. Unfortunately - I have not had any response from Hologram. Hopefully this will be resolved soon. It is not just you.

Bob

Just an update… i was able to use the r404 on the pi model b once. As soon as i tried to send a message though it rebooted the pi and it did not power the r404 back up again. i also did get it working on my ubuntu laptop and was able to check signal and send messages. although i have to run the modprobe command everytime i reboot the laptop as the folders disappear. But i agree with the only response i have gotten so far i bought it to use with the pi as a data node not my laptop. And i read your post before i posted mine it also helped. To add this modem also causes both pi’s to reboot when i plug it in while running on a 1amp, 2amp, or 2.5amp power supply.

Bob PM’d me separately (which I appreciate!), but thought I’d mention here we do have our engineers working on this and we’re trying to get a fix in place. Thanks for your patience!

Thanks for the reply!!

Hi @zenn1999 and @rmarlan - The engineering samples can have issues enumerating due to the underlying chipset of the R404 modules. As was mentioned in other threads you may have seen the following steps from the included insert to run once a Nova R404 sample is plugged in and powered from a Linux device:

$ sudo modprobe option
$ lsmod | grep optionoption328450usb_wwan94831 optionusbserial29943 2 option,usb_wwan
$ sudo sh -c 'echo -n 05c6 90b2 > /sys/bus/usb-serial/drivers/option1/new_id'
$ ls -l /dev/ttyUSB*/dev/ttyUSB0/dev/ttyUSB2/dev/ttyUSB3

While this config should enumerate the device properly, it may not persist upon reboot as described if the Nova remains powered on via the USB hub.
We will post an example udev rule to setup in a config file to mount the modem each time by running those commands above on reboot sometime this week.

Thanks for your feedback and testing on this as we work toward a production ready CAT-M series Nova. The module issue is something we’ve escalated to u-blox directly to match experience with the 3G Nova.

Unfortunately this does not work. Even with these commands it does not enumerate.

Interestingly, with a fresh download of raspain stretch with desktop 3-13-18, kernel 4.9 - on the first boot only - when the modem is inserted it will enumerate. Even without the modprobe commands. This only happens once. If the system is shutdown properly and rebooted - when the nova is inserted it will not enumerate. This is reproducible but I don’t understand why it works only on the initial boot - very strange. Hopefully u-blox can help. Do you have a timeframe from them for resolution? Thanks for the help.

Bob

Approach 1: One-time Driver Configuration (Best for Testing)

On Linux, after boot and after inserting the Cat-M1 Nova (u-blox SARA-R404M module), the following steps are working for me (including after multiple reboots):

$ sudo apt-get install cu
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  cu
...
Setting up cu (1.07-23) ...
$ lsmod | grep option
$ ls -l /dev/ttyUSB*
ls: cannot access '/dev/ttyUSB*': No such file or directory
$ sudo modprobe option
$ lsmod | grep option
option                 53248  3
usb_wwan               20480  1 option
usbserial              53248  8 option,usb_wwan
$ sudo sh -c 'echo -n 05c6 90b2 > /sys/bus/usb-serial/drivers/option1/new_id'
$ ls -l /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Apr 18 10:48 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 2 Apr 18 10:48 /dev/ttyUSB2
crw-rw---- 1 root dialout 188, 3 Apr 18 10:48 /dev/ttyUSB3
$ sudo cu -l /dev/ttyUSB2 -s 9600
Connected.
AT
OK
ATI
Manufacturer: u-blox
Model: SARA-R404M
Revision: SARA-R4.K0.0.00.00.06.07
IMEI: 35528XXXXXXXXXX

OK
~.
Disconnected.

(Note the ~. is the keystroke that is used to exit the cu program.)

If after running the above commands I remove and reinsert the Cat-M1 Nova, within a few seconds it enumerates and I can rerun cu -l /dev/ttyUSB2 -s 9600 and issue AT commands again to the modem.

One could, in theory, add some of these commands into /etc/rc.local to make their effects persistent, but there’s a better way…

Approach 2: Persistent udev Rule

To make these persistent rather than running the above commands every time, a udev rule can be added that will automatically add this device to the device IDs that are served by the option kernel module (driver).

Create a new file in /etc/udev/rules.d/70-hologram_nova_r404m.rules and add the following:

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="90b2", RUN+="/bin/bash -c 'modprobe option && echo 05c6 90b2 > /sys/bus/usb-serial/drivers/option1/new_id'"

Then, save the file. This tells udev to, essentially, do what we were doing in Approach 1 every time the device is detected (upon boot, upon insertion, or upon reinsertion).

Next, if we already tested Approach 1, we’ll want to clean up what we had done from before by removing the option module, and then reload the udev rules. Thus, run the following two commands:

$ sudo rmmod option
$ sudo udevadm control --reload-rules

At this point, I was able to see the device enumerated and then use cu to start a serial terminal and issue AT commands to the modem:

$ sudo cu -l /dev/ttyUSB2 -s 9600
Connected.
AT
OK
ATI
Manufacturer: u-blox
Model: SARA-R404M
Revision: SARA-R4.K0.0.00.00.06.07
IMEI: 35528XXXXXXXXXX

OK
~.
Disconnected.

After removing and reinserting the Cat-M1 Nova, I was able to repeat the above commands successfully, and observed that the automation persisted after reboot and power-cycling the system.

Would either of you be able to attempt the udev rule and report back your observations? TIA.

Best,
PFW

1 Like

I tried on the linux laptop first and after adding the rule and plugging in the r404m i run the cu command and i get:
cu: open (/dev/ttyUSB2) : permission denied
cu: open /dev/ttyUSB2 : Line in use
Doing the same sequence on the pi i get:
cu: open (/dev/ttyUSB2) : No such file or directory
cu: open /dev/ttyUSB2 : Line in use

Also to be noted every time i plug the r404m into the pi it reboots it.

@HologramPat

Are you using a linux box or a raspberry pi for these commands that worked?
Exactly which version / image of the OS are you using? I want to try to reproduce.

Thanks.

Bob

My main testing rig is an Ubuntu 16.04.4 LTS issue with a 4.4.0-116-generic #140-Ubuntu SMP x86_64 kernel.

That seems like a very strange behavior. Discussing your observations with our team currently.

@HologramPat

I have tried this using the latest version of Stretch with 2 different raspberry Pi units. They have a 2.5A power supply. I question if the issue with USB detection may be related to the fact that Raspberry uses USB-OTG ports vs true USB ports. Interestingly I have a USB SIMCOM SIM7000 based board that works fine (with hologram) on the raspberry. Have you tested the R404 on a Raspberry Pi with Stretch? I would be glad to share any log information if it would be helpful. When the board is not detected neither LED comes on. I have 2 R404’s and they both do the same thing.

Bob

@zenn1999

Regarding reboot when inserting usb board:
I experienced the same thing with an older version of Raspberry pi and the Zero W - even with a 2.5A power supply.

With a newer Raspberry Pi 3 B, I did not have the reboot issue. But it will only enumerate on the initial boot of the fresh OS. After that no luck.

Are you running an older Raspberry Pi or the Zero?

Bob

Most of my testing was on the older pi B and a pi zero w. My 3B+ arrived today but havent got it up and running yet. Will be trying it in an hour or so.

@zenn1999
I think the 3 B will fix the reboot issue - it did for me. But - pay attention. After my first boot of a fresh Stretch install - when I plugged in the R404 it enumerated fine. After that if I removed and plugged back in - or if I rebooted I could not get it to work. See if you have a similar result. Thanks. Bob

Tried it on the pi 3B+ i just got, confirmed the reboot does not happen, and these are the steps i followed:
downloaded and installed the newest raspbian stretch image on an sd card and booted the pi and did the normal steps one would follow to setup the pi the first time. I did an update and upgrade then installed the hologram cli. i inserted the r404m first the blue led came on then the red a couple seconds later. I did lsusb and the qualcomm device showed up. I then tried to send a message and the modem wasn’t found. I typed the modprobe option command tried to send a message again and it went through. Now to reboot… plug device back in … No led light up, the qualcomm device does not show up, and the system log shows no indication of anything being connected as i am monitoring it using tail -f.

@zenn1999
Your experience is 100% identical to mine. Hopefully hologram will develop a fix. Thanks.
Bob

Under certain loads, the Pi will reboot. The reality is modem power consumption needs to get better and module manufacturers are actively working on this. Until then there are a few things we can do to optimize our Pi and avoid reboots.

Below are some suggestions to make the most amount of power available to the Pi and Modem.

  1. Unplug all unnecessary peripherals such as keyboards, mice, dongles, etc
  2. Disable onboard LEDs. In /boot/config.txt add these two lines at the bottom then reboot the Pi.
    • dtparam=act_led_trigger=none
    • dtparam=act_led_activelow=on
  3. Disable the Pixel UI (only allow terminal). If you have Raspbian Lite installed then the UI is already removed. To disable the UI run the following:
    • sudo raspi-config
    • Under 3 Boot Options > B1 Desktop/CLI
    • Select only console B1 Console
  4. Disable HDMI by editing /etc/rc.local. At the bottom, but before exit 0 add this line:
    • /usr/bin/tvservice -o

I do appreciate the info on the power side but my concern is more on reliability. It has to be able to handle a reboot if no one is around and the R404m that we are using seems to pick and choose when it operates on the pi. When i tested it on the pi 3B+ i got yesterday it worked fine but then removing and reinserting or rebooting meant it not powering the modem back up. Today i added the udev rule, in the above post, to this pi and plugged it back in and it worked normally again and i could send a message. I haven’t rebooted the pi since testing yesterday, just added the rule. i removed and waited 30 seconds or so and reinserted it and no power. I say no power because no leds light up, no usb device is found and the last entry in the system log was the modem disconnecting the first time.

Quick update after posting this i reinserted it again and it powered up, it seems it needs a 5 minute break…