RAK2013 - Problems with USB and quectel-CM repository

Greetings!

I currently have two setups:

  1. RPi3B+ + RAK2245 LoRa + RAK2013:
  • RAK7243C Firmware - Stack previously worked before with no cable between RPi and RAK2013. Using the rak-pppd.service configuration for 4G/LTE connection.
  • Trying testing with USB cable between RPi and RAK2013 to see if this improves LTE connection speeds.
  • Using this repository as suggested by RAK: GitHub - RAKWireless/quectel-CM-for-rpi
  • Device connects properly using a SIM card.
  • RAK2245 works as well, devices can join, send and are detected.
  1. RPi3B+ + RAK5146 LoRa + RAK2013 + RAK Poe Hat:
  • RAK5146 firmware.
  • Same repository: GitHub - RAKWireless/quectel-CM-for-rpi
  • Using microUSB cable between RPi and RAK2013
  • Device connects properly using a SIM card.
  • RAK5146 works as well, devices can join, send and are detected.

PROBLEMS:

So far I’ve had both setups running for a few days. I’ve this issue before with the RAK5146 setup but I am also seeing it right now with the RAK2245 setup.

At some point, it stops reading the USB connection properly or “disconnects”, making the qmi_connect.service bug out and send a loop of the same error messages per second, filling the memory of the RPi or straight up crashing the device.

At first, I could see the errors showing up and I could recover the service resetting the USB connection via commands (unbind-bind USB device) but in the case of a full memory, the USB connection wasn’t detected anymore so I had to unplug-plug the device or reboot the RPi. I had this issue before with a RAK5146 setup where complete gateways started crashing randomly because of this and I have not been able to figure out how to fix this.

This morning I saw that my RAK2245 setup was out of space. Checking the syslog I had the following message on loop since last week

qmi_rak2013[408]: [08-09_13:41:40:000] QmiWwanThread poll err/hup/inval
qmi_rak2013[408]: [08-09_13:41:40:000] poll fd = 7, events = 0x0008
qmi_rak2013[408]: [08-09_13:41:40:000] QmiWwanThread poll err/hup/inval
qmi_rak2013[408]: [08-09_13:41:40:000] poll fd = 7, events = 0x0008
qmi_rak2013[408]: [08-09_13:41:40:000] QmiWwanThread poll err/hup/inval
qmi_rak2013[408]: [08-09_13:41:40:000] poll fd = 7, events = 0x0008
qmi_rak2013[408]: [08-09_13:41:40:000] QmiWwanThread poll err/hup/inval
qmi_rak2013[408]: [08-09_13:41:40:000] poll fd = 7, events = 0x0008
qmi_rak2013[408]: [08-09_13:41:40:000] QmiWwanThread poll err/hup/inval
qmi_rak2013[408]: [08-09_13:41:40:000] poll fd = 7, events = 0x0008

This message repeats between 50 to 100 times per second so it is no surprise it ran out of space with a log so big. The surprise comes from the fact that the qmi_connect.service was still working and the LTE connection was still in place, reading the SIM card and connected to the internet.

The second message comes from doing a journalctl on the qmi_connect.service in this current state:

[08-09_09:12:32:958] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
[08-09_09:12:32:958] ./quectel-CM profile[1] = m2m.movistar.es///0, pincode = (null)
[08-09_09:12:32:959] Find /sys/bus/usb/devices/1-1.1.2 idVendor=2c7c idProduct=0195
[08-09_09:12:32:959] Find /sys/bus/usb/devices/1-1.1.2:1.4/net/wwan0
[08-09_09:12:32:959] Find usbnet_adapter = wwan0
[08-09_09:12:32:959] Find /sys/bus/usb/devices/1-1.1.2:1.4/usbmisc/cdc-wdm0
[08-09_09:12:32:959] Find qmichannel = /dev/cdc-wdm0
[08-09_09:12:32:996] cdc_wdm_fd = 7
[08-09_09:12:33:096] Get clientWDS = 20
[08-09_09:12:33:129] Get clientDMS = 1
[08-09_09:12:33:162] Get clientNAS = 4
[08-09_09:12:33:195] Get clientUIM = 1
[08-09_09:12:33:228] Get clientWDA = 1
[08-09_09:12:33:261] requestBaseBandVersion EG95EFBR06A06M4G
[08-09_09:12:33:393] requestGetSIMStatus SIMStatus: SIM_READY
[08-09_09:12:33:393] requestSetProfile[1] m2m.movistar.es///0
[08-09_09:12:33:459] requestGetProfile[1] m2m.movistar.es///0
[08-09_09:12:33:492] requestRegistrationState2 MCC: 214, MNC: 3, PS: Attached, DataCap: LTE
[08-09_09:12:33:525] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[08-09_09:12:33:591] requestRegistrationState2 MCC: 214, MNC: 3, PS: Attached, DataCap: LTE
[08-09_09:12:33:624] requestSetupDataCall WdsConnectionIPv4Handle: 0x87260fa0
[08-09_09:12:33:689] requestQueryDataCall IPv4ConnectionStatus: CONNECTED
[08-09_09:12:33:722] ifconfig wwan0 up
[08-09_09:12:33:734] busybox udhcpc -f -n -q -t 5 -i wwan0
[08-09_09:12:41:367] QmiWwanThread poll err/hup/inval
[08-09_09:12:41:367] poll fd = 7, events = 0x0018
[08-09_09:12:41:367] QmiWwanThread exit
[08-09_09:12:41:367] ifconfig wwan0 down
[08-09_09:12:41:393] ifconfig wwan0 0.0.0.0
[08-09_09:12:41:434] main exit
[08-09_09:13:03:011] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
** [08-09_09:13:03:012] ./quectel-CM profile[1] = m2m.movistar.es///0, pincode = (null)**
** [08-09_09:13:03:012] Find /sys/bus/usb/devices/1-1.1.2 idVendor=2c7c idProduct=0195**
** [08-09_09:13:03:012] Cannot open directory: /sys/bus/usb/devices/1-1.1.2:1.4/net, errno: 2 (No such file or directory)**
[08-09_09:13:03:013] Cannot find qmichannel((null)) usbnet_adapter((null)) for Quectel modules
[08-09_09:13:33:064] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
[08-09_09:13:33:064] ./quectel-CM profile[1] = m2m.movistar.es///0, pincode = (null)
[08-09_09:13:33:065] Find /sys/bus/usb/devices/1-1.1.2 idVendor=2c7c idProduct=0195
[08-09_09:13:33:065] Cannot open directory: /sys/bus/usb/devices/1-1.1.2:1.4/net, errno: 2 (No such file or directory)
[08-09_09:13:33:065] Cannot find qmichannel((null)) usbnet_adapter((null)) for Quectel modules
[08-09_09:14:03:116] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
[08-09_09:14:03:116] ./quectel-CM profile[1] = m2m.movistar.es///0, pincode = (null)
[08-09_09:14:03:116] Find /sys/bus/usb/devices/1-1.1.2 idVendor=2c7c idProduct=0195
[08-09_09:14:03:116] Cannot open directory: /sys/bus/usb/devices/1-1.1.2:1.4/net, errno: 2 (No such file or directory)

The bolded section starts repeating because it can’t find the USB connection.


Is this problem related to hardware only? I’ve seen some posts that say that RPi USB ports tend to have issues with their connections and sometimes devices stop working or reboot by itself.

Is there any way to fix this? Is the problem with the RAK repository?

Any help is appreciated.