ModemManager is fun

These last weeks I’ve been out of my usual Tracker work, and have been hacking on NetworkManager/ModemManager so that they can work properly with Sierra Wireless Airlink Fastrack Xtend modems.

Ended up writing a new wavecom plugin for this purpose (Wavecom was bought by Sierra Wireless in 2009), which Dan already merged in the master branch of ModemManager.

The changes in the new wavecom plugin with respect to the generic GSM plugin are:

  1. AT+CPIN? replies are not ended with OK. A custom regex match was added to support CPIN? replies without OK (also had to hack the generic MM code to handle plugin-provided regular expressions).
  2. Disabled default power-up comand, AT+CFUN=1. This command does a full software reset in the device, including the USB stack, so the connection is closed. No additional command seems to be needed, as the modem wakes up by default in CFUN=1 (full functionality) mode. Anyway, an additional check was added during initialization so that this mode is ensured.
  3. Enabled RTS/CTS instead of XOFF/XON flow control.
  4. Implemented access technology retrieval using AT+WGPRS=9,2 to query network capabilities
  5. Ensure the modem uses the highest possible mobile class. These modems can be configured to use different mobile classes. For each kind of modem, the best mobile class is the highest one available, in the following order:
    • Class A (3G only mode)
    • Class B (PS or CS, GPRS/EDGE or GSM)
    • Class CG (PS only, GPRS/EDGE)
    • Class CC (CS only, GSM)
  6. Implemented setting and getting allowed mode, for both 2G and 3G based modems (using AT+WWSM command in the 3G case).
  7. Implemented setting and getting frequency bands for 2G modems (with AT+WMBS) and 3G modems (with AT+WUBS).

Still, the plugin could be improved even more. For example, there is no secondary port handling in the current plugin implementation, which means that signal strength value will not be updated while the modem is in connected state. This kind of modems support setting up virtual ports by multiplexing the serial channel (CMUX), but ModemManager doesn’t handle this yet.

If anyone has one of this Wavecom/SierraWireless modems at home, please test it with latest ModemManager and report any errors found.

About these ads

Posted on May 5, 2011, in Development, GNU Planet, Lanedo Planet, Planets and tagged , , , , , . Bookmark the permalink. 2 Comments.

  1. Hi Aleksander,

    for me ModemManager is _not_ fun.

    I came across your site because the last Ubuntu my Sierra MC8780 worked with was Karmic. All newer versions including Natty failed for some reason. For details please see
    https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/784573
    or
    https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/459052
    or
    https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/376361

    All these bugs are unresolved.

    Can you give me any advice ?

    Gerd

  2. aleksander

    The issue with AT+CFUN=1 getting the port closed is very similar to what I saw in the Wavecom plugin. The patch Alexander Sack provided in the bug is exactly what I did for Wavecom modems. Without a Sierra modem to test here it’s difficult to say what the problem is. I would suggest you to email the NM mailing list with your issue, if not already done before.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 36 other followers

%d bloggers like this: