QMI vs. Direct IP

Hi all, I’m working on integrating an AirPrime MC7700 with a Debian-based ARM system. I have successfully connected using PPP mode, and am now investigating Direct IP and QMI. Currently the card is in QMI mode, on bootup I see:

qmi_wwan 1-1.4:1.8: cdc-wdm0: USB WDM device
qmi_wwan 1-1.4:1.8: wwan0: register 'qmi_wwan' at usb-orion-ehci.0-1.4, Sierra Wireless wwan/QMI device, xx:xx:xx:xx:xx:xx

My questions are:

  1. Can this device be switched to Direct IP mode? Or is that the main difference between the MC7700 and MC7710?
  2. Are there Linux userspace tools available for QMI, or should I be using libqmi-glib, as referenced here?
  3. Is one mode recommended over the other?

Thank you!

Blake

Right. That is the driver in linux mainline. Should work very well, since I wrote it :slight_smile:

But you probably won’t get much official support for it…

The device can be switched between QMI and DirectIP mode, but the details on how to do that is only provided under NDA as far as I know. That means that it cannot be discussed in an open forum like this. You will have to ask your Sierra Wireless distributor.

The differences between MC7700 and MC7710 are the supported frequency bands. See the datasheet for details. It has nothing to do with QMI or DirectIP. The MC7710 is sold both in a QMI version and in a DirectIP version, and I assume the same goes for the MC7700.

Those are the tools currently available for the driver in Linux mainline. It is a bit rough as a user interface, as it is really intended as a library for ModemManager or other modem management applications. I don’t know if that is an option for you embedded platform?

There is also a Linux QMI SDK available from Sierra Wireless, but that will require the out-of-tree driver from Sierra Wireless as well. The mainline driver is not compatible with the SDK. Had to be like that because the SDK relies on private IOCTLs and a bit of QMI inside the driver, both unacceptable for mainline.

Needless to say, I recommend libqmi. But I am a bit biased…

You may also want to check out oFono. I believe it may have QMI support now. Or write your own simple QMI application. It’s not magic. You can find all the necessary documentation released as GPLv2 source over at codeaurora.org

I believe the reason for the two distinct modes is that there are different use cases with very different requirements. So the answer to that question is bound to be: “Depends”

My impression based on what laptop vendors (Lenovo, Sony, Panasonic) integrating these modules have done, is that QMI is the recommended mode for new PCs. This may shift to MBIM if/when firmware supporting that becomes available. Questions I cannot seem to get a final answer to…

If you have an application using an older DirectIP module, then that mode will of course be recommended when upgrading to a MC77xx module. I assume compatibility with other Sierra Wireless modules will be the primary reason for using DirectIP.

My personal experience using a MC7710 in both modes in a Linux laptop for a while is that it doesn’t really matter much for normal usage. The module works very well in either mode. But QMI mode will give you access to more commands and settings, if you are into that. And it will not tie up the AT serial port for the command channel.

I’ve signed the NDA, after looking closer at the command references I found the command I was looking for and switched the modem to PID 68a3. sierra_net was throwing all sorts of errors:

Dec  3 21:41:11 localhost kernel: sierra_net 1-1.4:1.7: wwan0: Submit SYNC failed -32
Dec  3 21:41:11 localhost kernel: sierra_net 1-1.4:1.7: wwan0: Send SYNC failed, status -32

And I couldn’t access the control channel. This was kernel 3.4.19 with the stock sierra.c/sierra_net.c. I grabbed the updated sierra drivers from here and manually merged in the usb-serial changes to get them to compile (usb driver registration APIs had changed). I can now successfully connect to a cellular network with Direct IP.

Now this is a new platform with no legacy compatibility to deal with, so I don’t have anything invested in either technology. I will investigate ModemManager, when I had initially looked at building libqmi it looked to have fairly heavy Gnome dependencies that substantially increased our filesystem image size. I will talk to our rep about the Linux QMI SDK, that sounds promising.

I don’t think my requirements are anything special, I’d like to:

  • create a reliable persistent connection to a cell network for M2M TCP traffic
  • have the driver deal with reconnection logic so I don’t have to constantly validate network connectivity and reconnect when the connection drops
  • poll connection statistics (RSSI, bytes transferred) on a fixed interval

And of course, being a lazy programmer I would like to have as much of this handled by existing libraries as possible :slight_smile:

Thanks for all your help!

Blake