Mobile Radio Monitor

mrm-launcher

The Mobile Radio Monitor is a new (GPLv3+ licensed) application I wrote this summer, which lets you grab signal and power information from QMI-powered modems, and displays it in time-based graphs. I really wanted to use some of the shiny new things available in GTK+ 3.9.x, so this application seemed a good excuse to play around with the GtkStack, GtkListBox, templates and such.

Internally, this application does not talk to ModemManager at all. The other thing that I wanted to try out with this application was the use of the ‘qmi-proxy‘ approach in libqmi, which lets you share a QMI port between different processes, and therefore this UI application can run alongside ModemManager without much collision between the two.

Launching

The Mobile Radio Application installs a desktop file, so it can be launched directly from the desktop shell. It needs to run as root, so “pkexec” takes care of requesting user authentication to gain privileges through polkit. The other option, of course is to just launch it from the command line using “sudo” or the like.

BTW, yes, the icon is the same one from gnome-system-monitor with just different colors. Quick and dirty hack, but looks good to me. Thanks to jimmac, who I think draw the icon originally ;)

Device list

When the application starts you’ll be greeted with the QMI device list detected by the application. Unusable modems will be shown as deactivated items (e.g. when modem requires a SIM but there is no SIM inserted), and for the usable ones you’ll be able to insert the PIN if required.

mrm-device-list

Signal information

Once a device has been selected, the application will switch to the Signal information tab, where you can see graphs for things like RSSI, Ec/Io, S/N, RSRP and RSRQ

mrm-signal-tab

Not every technology exposes all the previous values, though. GSM will only show RSSI, while UMTS/HSPA will show RSSI and Ec/Io. In addition to the graphs, the current instant value of each signal property is also given in the legend box.

Hiding/showing graphs based on the current used access technology was an idea, but I left it out because you can actually switch the preferred technology using e.g. qmicli’s --nas-set-system-selection-preference, and therefore you would be able to see graphs with both access technologies.

Power information

In addition to signal information, the application also exposes receiver and transmitter power values in the Power information tab.

mrm-power-tab

Thanks to being able to have ModemManager running at the same time, you can actually get the modem connected and see how both the RX and TX power values go up and down.

Want to try it?

You can grab the sources from the following gitorious.org repo:
https://gitorious.org/aleksander/mobile-radio-monitor.

As said previously, it uses unstable GTK+ plus unstable libqmi, so you’ll need these sorted out before trying to compile the project. I have tried it myself both in a Fedora 19 setup (under jhbuild to get latest GTK+ and self-compiled libqmi from git master) and in a Fedora 20 (just grab these packages).

As always, comments and patches welcome :)

About these ads

Posted on September 17, 2013, in Development, FreeDesktop Planet, GNOME Planet, Lanedo Planet, Planets and tagged , , , , . Bookmark the permalink. 19 Comments.

  1. Hi Aleksander,

    When using the mobile-radio-monitor I receive the following warning:
    * (mobile-radio-monitor:15156): WARNING **: Error loading signal info: Cannot send message: QMI service ‘nas’ version ‘1.8’ required, got version ‘1.0’
    The result is that the GUI is displayed but the graphs are not populated with data.

    I tried with two different USB modems (ZTE MF 190 and Huawei E160G) both give the same error.
    Using qmicli the USB modems are available:
    $s udo qmicli -d /dev/cdc-wdm0 –nas-get-signal-strength
    [/dev/cdc-wdm0] Successfully got signal strength
    Current:
    Network ‘umts': ‘-97 dBm’

    Is this maybe caused by a limitation in the QMI operations these USB modems support ?
    There are quite some operations on the qmicli that return InvalidQmiCommand. E.g:
    sudo qmicli -d /dev/cdc-wdm0 –nas-get-signal-info
    error: couldn’t get signal info: QMI protocol error (71): ‘InvalidQmiCommand’

    Is there such a thing as a “Get Version Info” command in the qmicli to see which versions of the different QMI services a device supports ?

    What are my options with these modems ( as updated firmware of these modems to the latest version the manufacturs provide did not help) or should I just simply acquire USB modems with nas 1.8 support. How could I know in advance which USB modem is suitable for your tool ?

    [For completeless :
    -dmesg
    [ 2163.696898] qmi_wwan 2-1.4:1.3: cdc-wdm0: USB WDM device
    [ 2163.697572] qmi_wwan 2-1.4:1.3 wwan0: register ‘qmi_wwan’ at usb-0000:00:1d.0-1.4, WWAN/QMI device, 2a:a4:17:71:85:81

    – uname -r
    : 3.11.0-12-generic
    , I am on Ubuntu 13.10
    – qmicli version (qmicli -V
    qmicli 1.7.0)
    – kernel drivers
    /lib/modules/3.11.0-12-generic/kernel/drivers/net/usb$ ls *qmi*
    qmi_wwan.ko
    $ lsmod | grep qmi
    qmi_wwan 17363 0
    cdc_wdm 18399 1 qmi_wwan
    usbnet 37607 1 qmi_wwan
    ]
    – ldd /usr/local/bin/mobile-radio-monitor | grep qmi
    libqmi-glib.so.1 => /usr/local/lib/libqmi-glib.so.1 (0xb7625000), also libqmi is version 1.7.0)

    Thanks for your great work,
    BR
    /Arjen

  2. “NAS Get Signal Info” is only available in QMI devices with NAS >= 1.8; your modems probably support an older NAS version. You can get the list of supported versions with qmicli --get-service-version-info. I could have developed it using “NAS Get Signal Strength”, which is available in all QMI modems, even if those with NAS 1.0, but at the end this was a proof-of-concept so I just used the newest commands. The Power info is only available in even newer NAS versions (1.9? IIRC).

    You could try to update the firmware of your devices, as that usually gets you newer NAS versions. Or if you’re into hacking, adding support for “NAS Get Signal Strength” shouldn’t be a big deal; I actually did that for ModemManager, which supports both.

  3. Dear Aleksander,

    I got the following error messages while building Mobile-Radio-Monitor

    ———————————————————————————————————–

    mrm-signal-tab.c:467:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:468:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:469:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:470:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:471:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:472:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:473:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:474:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:475:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:476:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:477:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:478:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:479:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:480:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:481:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:482:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:483:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:484:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:485:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:486:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:487:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:488:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:489:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:490:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:491:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:492:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:493:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:494:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:495:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:496:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:497:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:498:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:499:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:500:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:501:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:502:65: error: expected expression before 「MrmSignalTab」
    mrm-signal-tab.c:503:65: error: expected expression before 「MrmSignalTab」

    ————————————————————————————————————

    I didn’t modify anything in source code and the version of gtk+-3.0 is 3.9.8.

    Do you know what happened for this situation??

    Thanks.

    Regards,
    Jake

  4. Hum… maybe gtk_widget_class_bind_template_child() is not available yet in 3.9.8? I’m using 3.10 here; and actually the docs say “Since 3.10″ for that version, although that’s normal as 3.9.x was the unstable version. Could you try with 3.10?

  5. Dear Aleksander,

    Thanks for your kindly help.
    Currently, the Mobile Radio Monitor could be compiled and installed.

    But I met another question that Mobile Radio Monitor couldn’t detect my device by itself.
    I’m sure that the device has been mounted by system and I could get some information via qmicli application.

    ——————————————————————————————————————-

    kernel log

    [ 831.927883] usbcore: registered new interface driver cdc_wdm
    [ 831.952340] qmi_wwan 1-1:1.5: cdc-wdm0: USB WDM device
    [ 831.952839] qmi_wwan 1-1:1.5 wwan0: register ‘qmi_wwan’ at usb-0000:02:03.0-1, WWAN/QMI device, aa:37:5d:af:fd:31
    [ 831.952947] usbcore: registered new interface driver qmi_wwan

    ********************************************************************************************************************

    qmicli version

    jake1223@jake1223-virtual-machine:/dev$ qmicli -V

    qmicli 1.8.0
    Copyright (2012) Aleksander Morgado

    ********************************************************************************************************************

    mobile-radio-monitor init log

    Gtk-Message: Failed to load module “overlay-scrollbar”
    Gtk-Message: Failed to load module “canberra-gtk-module”

    (mobile-radio-monitor:5888): Gtk-WARNING **: Child name ‘signal_box’ not found in GtkStack

    ** (mobile-radio-monitor:5888): WARNING **: Cannot create MRM device: Cannot open QMI device file: Couldn’t spawn the qmi-proxy

    ——————————————————————————————————————–

    Do I need to change anything according to the above information??

    Thanks.

    Regards,
    Jake

  6. Where did you install libqmi? Which –prefix did you use in configure? Try with –prefix=/usr. Problem seems to be that the qmi-proxy isn’t found where expected.

  7. Dear Aleksander,

    I’ve already installed libqmi and the version is 1.6.0.
    The symptom is the same although I added –prefix=/usr during libqmi installation.

    Do I need to add –prefix parameter during mobile-radio-monitor installation??

    Thanks.

    Regards,
    Jake

  8. Oh wait, 1.6.0 is not good enough, you need >= 1.7.0, which is the one coming with the qmi-proxy.

  9. Dear Aleksander,

    The symptom is the same although I upgraded libqmi from 1.6.0 to 1.8.0.
    Could you share you installation step to me??

    Thanks.

    Regards,
    Jake

  10. I usually just configure with “–prefix=/usr –sysconfdir=/etc –localstatedir=/var –libdir=/usr/lib64″ and then make && make install

  11. Hi!

    Mobile Radio Monitor works with wvdial? I have Sierra Wireless AirCard 310U and 320U.
    Since kernel 3.9 I’m not able to connect with NM/MM (on any distro: Mint, Arch, Fedora etc.). You also have Sierra device, maybe You know this problem with “DHCP timeout” since kernel >3.9 (https://bbs.archlinux.org/viewtopic.php?pid=1351740)?

    I would be grateful for any advice.

  12. Mobile Radio Monitor works with libqmi, it has really nothing to do with wvdial.

    As for the ModemManager issues, always run MM/NM with debug logs on, so that we can know better what could be happening, see:
    http://www.freedesktop.org/wiki/Software/ModemManager/Debugging/

    You can then send your comments or issues to the ModemManager mailing list (please subscribe before posting):
    http://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

  13. Hi Aleksander

    Will this work on kernel <3.4

    Regards
    Vipin

  14. You’ll need to port the qmi_wwan driver to that kernel first, otherwise no.

  15. Hi Alexander,
    This look very nice. Two questions:
    1) How did you obtain the TX power?
    2) Would it be possible to compile something like this for Android? (What would it take to do so?)

  16. aleksander

    1) Using the QMI protocol and libqmi
    2) Possible, yes. But no idea how long it would take, likely not much if the GobiAPI library can be used.

  17. Hi Aleksander

    It’s cool application. Could you give the cue what the IDE and wich OS do you use for that ?

  18. The toolkit I use is GTK+3, and this app runs on GNU/Linux systems.

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 42 other followers

%d bloggers like this: