i am successfully running the Sierra Wireless MC7710 LTE module with ModemManager and mmcli, but i have one problem. I want to have the LTE connection always-on, but after some hours, the connection is lost. I guess, it has something todo with power saving or idle features...
Latest QMI Firmware (Version 03.05.29.03) is flashed onto the module.
Here's the output of cat /sys/kernel/debug/usb/devices:
I found this Thread from you, and the symptomes are 100% identical to my problem. I read the whole thread and the outcome was, that the XHCI controller was the reason in your case? In my case, it's not XHCI. I use a Fritzbox 3370 with USB 2.0, so it should be EHCI.
But Aleksander has made major improvements to the ModemManager disconnect handling and other stuff r in OpenWrt recently. See for example:
So you might want to test a current master snapshot to see if any of this fixes the issues. Or wait until it ends up in a release if you feel uncomfortable running bleeding edge images...
Wrt the root cause of the disconnects, I suspect they are network initiated. Many operators to this to avoid a large number of stale sessions or something. If possible, you could test that theory temporarily switching to a SIM from another operator. Depending on what options you have in your area of course.
Can't really think of anything else causing such issues. The MC7710 is getting old. but it was very stable in my experience. The only time I can remember having problems with unwanted disconnects was with a long and thin USB extension cable. This resulted in brownouts as soon as the modem tried to register in the LTE network. Not likely the cause of your issues of the connection is stable for hours before disconnecting.
I don't believe power saving problems is likely either with such long stable periods. The drivers and firmware supports USB autosuspend just fine, even while being connected.(using the Remote Wakeup USB feature). And if active, that's usually set up with a timeout of a few seconds. Not hours.
FWIW, the MC7710 was one of the modems I used to test and verify autosuspend with the qmi_wwan and cdc_mbim drivers.
try another router with a different USB Host controller. If i understood you correctly, that was the cause in your case. Maybe the "DWC OTG Controller" in my Fritzbox 3370 or it's driver causes this problems.
try the latest version of ModemManager you linked. But this would be a workaround, actually. The real problem (modem disconnect) would still be existent. If i am informed right, ModemManager would only handle the problems in a different way.
try 'QMI Cellular' protocol instead of ModemManager, and see what happens.
Since you wrote the MC7710 is a well tested device, i think i'll try a different router first.
Also: i don't think the problem is related to the mobilenetwork or operator. I used the same SIM Card with other routers/modems before without any disconnect problems.
I agree with @bmork that it is quite common that the operator disconnect your session time to time.
If you use 'QMI Cellular' you can verify the status of your connection with:
uqmi -d /dev/cdc-wdm0 --get-current-settings
ubus call network.interface.'name of your interface' status
If your modem is not connected then you have been disconnected , if it´s connected but the IP-address in modem is different from what you have on the interface, then you have been dis-connected and the modem has re-connect.
QMI does not handle this in a good way. I don´t know how the ModemManager handle this scenario.
Hey @bmork everytime i search on the internet to troubleshoot things regarding this topic, i find your name on various forums or mailinglists. You seem to be a real expert on this! I appreciate your help
Thanks to your explanation here and here, i now know how to switch between QMI and MBIM modes. But i have two questions left, if you allow:
AT Command Reference guide states:
The modem has 2 MB of non-volatile memory that is used to store: • Factory calibration data • Settings made in a host application such as Watcher
I bought the MC7710 used from ebay. Is it possible, that there are old config parameters left on the device? If yes, is there a way to perform a factory reset? Maybe using a special AT command?
I want to use the MBIM mode. I understood, which USB comp value i have to pick, but i don't know which Product-ID i have to choose. I have the latest firmware installed (03.05.29.03). These are the available IDs:
68A3 (Direct IP mode?)
68A2 (QMI, i think?)
There are commands to backup and restore NVRAM mentioned in section 6 "Memory Management Commands" of the Extended AT Command Reference (doc id 2130616). I have never tried them and won't repeat them here due to the risk involved. Better read that document including the big fat warning in there...
Personally I would not try to mess with the NVRAM unless I had specific problems. And DO NOT try to erase/reset all of it. The NVRAM includes factory calibration data and other data specific to your module. This cannot be restored unless you have a backup, and the modem will probably not work at all without it.
MBIM shares the 68A2 device ID with QMI. MBIM was added in one of the last firmware releases for this modem and is therefore often not mentioned in the docs.
You're correct that 68A3 is DirecIP. I don't know anything about the other device IDs. But I see that 68AA is included in the sierra_net driver so that's another DirectIP mode. And 68A9 is included in qmi_wwan do that's another QMI mode.
Just use 68A2 unless you have reasons to do something else.
Switching to MBIM worked well, i think. After entering AT!UDUSBCOMP=6 i did not get a "OK" response... I waited for some time, but the Modem did not respond to any other AT Commands. I powercyled the router. And everything seems to work well, but do you know, why there are 3 MBIM devices now? Is that normal?
I assume you mean those 3 "Driver=cdc_mbim" lines? If so, then yes, that's normal.
It's not 3 devices. It's one MBIM function using 2 USB interfaces, where one of those interfaces have 2 alt settings. The driver has attached to all of them, which is why Linux shows the 3 lines.
This is how MBIM works and similar to many other USB CDC variants (ECM, NCM, etc). There is a control interface with a single interrupt endpoint and a data interface with 2 bulk endpoints (in/out). The data interface also has a default alt setting with no endpoints. This setting is inactive after the driver has loaded. But it is still under control by the driver.
This is just a way to organize the endpoints. If you look at a QMI function, you'll see that it use a similar set of endpoints (one interrupt and bulk in/out), but they are all associated with a single USB interface.
Old topic, but i finally found the reason. The power supply was insufficient! I bought a new USB adapter from Aliexpress, and since then, it works flawless. I wasted a lot of time for this. Hopefully it will help someone.
old (green): Mini PCI-E to USB Adapter (With SIM Card) Version 2.0
new (blue): Mini PCI-E to USB Adapter (With SIM Card) Version 5.0
I also noticed, that there are big differences regarding the routers. Some routers have big capacitors and coils which provide electric power for the USB ports, whilst other routers have a minimalistic component design. Perhaps this also has an effect