Tuesday, June 28, 2016

Separate But Equal III

I'm making it a hobby to notice when data communications technologies move to separate control and data into independent channels, a common architecture pattern I've written about here more than once. A little more than a year ago I was writing software to control a Sierra Wireless MC7354 cellular modem in an Internet of Things project for which, somewhat remarkably, the Thing was going to be an aircraft on the ground.

After the usual noodling around and web searches I discovered that to use the modem in LTE mode, the usual serial port and PPP wasn't going to hack it: too slow. Instead I entered the (for me anyway) brave new world of QMI (Qualcomm MSM Interface) and RMNET, proprietary Qualcomm modem interfaces supported by both a software stack from Qualcomm for their "Gobi" family of devices, and an open source software stack consisting of the libqmi library, the qmicli command line tool, and the qmi_wwan driver, for your favorite Linux distro.

In PPP mode, the control of the modem is done using variants of the Hayes modem AT commands from the 1970s that we old folks all know and love. Once the data call was set up, a data channel using Point to Point Protocol was established over the same serial port, and IP packets were tunneled through it to the far end. Lots of layers of bits on top of bits there, all limited by the baud rate of the serial port.

But when using QMI and RMNET, the device exposes a control channel using Qualcomm's QMI messaging protocol, and a data channel using Qualcomm's RMNET virtual USB Ethernet framework. Once the appropriate QMI messaging is exchanged with the modem, the RMNET interface appears as just another Ethernet dongle. Except this Ethernet cable terminates wirelessly somewhere else in the world.

Again: separation of control and data. The old serial port interface is exposed via USB as well, and in fact has its own uses which can be exploited even while a data call is up over the QMI and RMNET channels. But it was another great example of optimizing a control channel for small packets with low latency, and a data channel for big packets with high bandwidth.