After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 703023 - [MM 0.8] Icera plugin fails to retrieve supported modes when device does not support CNTI or WS46
[MM 0.8] Icera plugin fails to retrieve supported modes when device does not ...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: ModemManager
unspecified
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-06-25 04:40 UTC by Dan Williams
Modified: 2013-06-26 09:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch. (7.92 KB, patch)
2013-06-25 09:48 UTC, Aleksander Morgado
committed Details | Review

Description Dan Williams 2013-06-25 04:40:19 UTC
So the Nokia 21M (an Icera device) doesn't support either *CNTI or WS46, and that makes this code in the plugins/icera/mm-broadband-modem-icera.c trigger:

static void
parent_load_supported_modes_ready (MMIfaceModem *self,
                                   GAsyncResult *res,
                                   GSimpleAsyncResult *simple)
{
    ...

    all = iface_modem_parent->load_supported_modes_finish (self, res, &error);
<all is NULL>
    if (!all) {
        g_simple_async_result_take_error (simple, error);
        g_simple_async_result_complete (simple);
        g_object_unref (simple);
        return;
    }

and thus this device doesn't support any modes:

  -------------------------
  Modes    |      supported: 'allowed: any; preferred: none'
           |        current: 'allowed: any; preferred: none'

debug logs:

[mm-broadband-modem.c:1574] modem_load_supported_modes(): loading supported modes...
[mm-serial-port.c:958] mm_serial_port_open(): (ttyACM1) device open count is 3 (open)
[mm-serial-port.c:1003] mm_serial_port_close(): (ttyACM1) device open count is 2 (close)
[mm-at-serial-port.c:408] debug_log(): (ttyACM1): --> 'AT*CNTI=2<CR>'
[mm-at-serial-port.c:408] debug_log(): (ttyACM1): <-- '<CR><LF>ERROR<CR><LF>'
[mm-serial-parsers.c:363] mm_serial_parser_v1_parse(): Got failure code 100: Unknown error
[mm-broadband-modem.c:1508] supported_modes_cnti_ready(): Generic query of supported 3GPP networks with *CNTI failed: 'Unknown error'
[mm-serial-port.c:958] mm_serial_port_open(): (ttyACM1) device open count is 3 (open)
[mm-serial-port.c:1003] mm_serial_port_close(): (ttyACM1) device open count is 2 (close)
[mm-at-serial-port.c:408] debug_log(): (ttyACM1): --> 'AT+WS46=?<CR>'
[mm-at-serial-port.c:408] debug_log(): (ttyACM1): <-- '<CR><LF>ERROR<CR><LF>'
[mm-serial-parsers.c:363] mm_serial_parser_v1_parse(): Got failure code 100: Unknown error
[mm-broadband-modem.c:1456] supported_modes_ws46_test_ready(): Generic query of supported 3GPP networks with WS46=? failed: 'Unknown error'
ModemManager[31869]: parent_load_supported_modes_ready: all is NULL!
[mm-iface-modem.c:3750] load_supported_modes_ready(): couldn't load Supported Modes: 'Couldn't retrieve supported modes'

The output of %IPSYS=? would show us the supported modes, eg:

%IPSYS: (0-3,5),(0-3)

where for the first number:
0 = 2G only
1 = 3G only
2 = 2G + 3G, 2G preferred
3 = 2G + 3G, 3G preferred
5 = 2G + 3G, any preferred

So maybe the Icera plugin should just totally ignore the parent supported modes detection and run %IPSYS=? and use the result of that?  I'm 99% sure I tested the supported modes branch with two different Icera devices before you merged it, but I didn't test it with the Nokia 21M or the Nokia CS-18 unfortunately.

In any case, this is a minor bug and I don't think it should block the 0.8 release.
Comment 1 Aleksander Morgado 2013-06-25 09:48:27 UTC
Created attachment 247713 [details] [review]
Patch.

Implemented loading supported modes with AT%IPSYS=?, let me know what you think.
Comment 2 Dan Williams 2013-06-25 14:25:24 UTC
Looks good, and tested OK on my Nokia 21M and Sierra USB305.
Comment 3 Aleksander Morgado 2013-06-26 09:10:01 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.