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 696593 - [MM 0.8] nozomi devices crash on AT+CLCK="PS",2
[MM 0.8] nozomi devices crash on AT+CLCK="PS",2
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: ModemManager
unspecified
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
: 682643 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-03-25 22:06 UTC by Dan Williams
Modified: 2013-04-01 14:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dan Williams 2013-03-25 22:06:17 UTC
An Option GT 3G+ (early Option UMTS hardware driven by the nozomi kernel driver) reports:

+CLCK: ("AB","AC","AG","AI","AO","IR","OI","OX","SC","FD","PN","PU","PP","PC","PS")

But the firmware really, really doesn't like being asked about the PS (PH_SIM) lock and crashes:

ModemManager[3563]: <debug> [1364248783.329130] [mm-at-serial-port.c:397] debug_log(): (noz2): --> 'AT+CLCK="FD",2<CR>'
ModemManager[3563]: <debug> [1364248783.415336] [mm-at-serial-port.c:397] debug_log(): (noz2): <-- '<CR><LF>+CLCK:'
ModemManager[3563]: <debug> [1364248783.415646] [mm-at-serial-port.c:397] debug_log(): (noz2): <-- ' 0<CR><LF><CR><LF>OK'
ModemManager[3563]: <debug> [1364248783.415878] [mm-at-serial-port.c:397] debug_log(): (noz2): <-- '<CR><LF>'
ModemManager[3563]: <debug> [1364248783.416099] [mm-serial-port.c:958] mm_serial_port_open(): (noz2) device open count is 3 (open)
ModemManager[3563]: <debug> [1364248783.416193] [mm-serial-port.c:1003] mm_serial_port_close(): (noz2) device open count is 2 (close)
ModemManager[3563]: <debug> [1364248783.416276] [mm-at-serial-port.c:397] debug_log(): (noz2): --> 'AT+CLCK="PS",2<CR>'
ModemManager[3563]: <debug> [1364248786.378610] [mm-serial-port.c:958] mm_serial_port_open(): (noz2) device open count is 3 (open)
ModemManager[3563]: <debug> [1364248786.378770] [mm-serial-port.c:1003] mm_serial_port_close(): (noz2) device open count is 2 (close)
ModemManager[3563]: <debug> [1364248786.378866] [mm-at-serial-port.c:397] debug_log(): (noz2): --> 'AT+CLCK="PN",2<CR>'
ModemManager[3563]: <debug> [1364248789.375960] [mm-serial-port.c:958] mm_serial_port_open(): (noz2) device open count is 3 (open)

Removing the "PS" check but permitting all the subsequent facility lock checks works just fine.

So I guess we need a nozomi plugin that skips the PS lock...

These cards are really, really old, from 2005/2006, so this bug is more a nice-to-have; filing so it doesn't get lost.
Comment 1 Aleksander Morgado 2013-03-26 11:15:50 UTC
Instead of a whole new plugin, why not just override the lock status loading in the Option plugin, so that we don't check the PS lock if the modem reports nozomi driver?
Comment 2 Dan Williams 2013-03-27 13:25:58 UTC
(In reply to comment #1)
> Instead of a whole new plugin, why not just override the lock status loading in
> the Option plugin, so that we don't check the PS lock if the modem reports
> nozomi driver?

Yeah, probably a better idea.
Comment 3 Aleksander Morgado 2013-03-27 14:18:15 UTC
Could you test with the 'aleksander/nozomi-fix' branch to see if it fixed the issue?
Comment 4 Dan Williams 2013-03-27 21:34:50 UTC
Looks ok, but I can't test due to other problems; nozomi cards aren't driven by Option, not sure why I didn't catch this earlier.

1) mm-device.c doesn't get IDs from PCI devices.  I've pushed a fix for this to your nozomi branch

2) the 'option' plugin specifies both vendor and product filters; the vendor filter is 0x0af0, while the product filter is { 0x1931, 0x000c }.  The nozomi card is 1931/000c.  But failing either the vendor or product check appears to fail the device:

    /* If we got filtered by vendor or product IDs  and we do not have vendor
     * or product strings to compare with: unsupported */
    if ((vendor_filtered || product_filtered) &&
        !self->priv->vendor_strings &&
        !self->priv->product_strings &&
        !self->priv->forbidden_product_strings) {
        mm_dbg ("(%s) [%s] filtered by vendor/product IDs",
                self->priv->name,
                g_udev_device_get_name (port));
        return TRUE;
    }

in our case, the nozomi card does not match the vendor filter, so vendor_filtered == TRUE, but product_filtered == FALSE, and thus the device is marked unsupported by the option plugin.

But we can't just change to (vendor_filtered && product_filtered) since that will make every other plugin claim to support the device (tried it).  Are the vendor + product filters supposed to be logical AND, or logical OR?  If they're logical OR we have more extensive fixes to do, so I'd rather punt that if we can.

The quick fix is to just add 0x1931 to the Option plugins' vendor IDs, since that is Option's assigned PCI VID (0x0af0 is their USB VID) and remove the product match.  This does work.

3) with 1 & 2 done, I get:

WARNING **: g_object_new_valist: object class 'MMBroadbandModemOption' has no property named 'iface-modem-3gpp-ignored-facility-locks'

I spent 2 minutes trying to find that and failed; usually that's because of a missing override, but the override is already there in mm-broadband-modem.c so I don't know.
Comment 5 Aleksander Morgado 2013-03-28 16:56:11 UTC
(In reply to comment #4)
> Looks ok, but I can't test due to other problems; nozomi cards aren't driven by
> Option, not sure why I didn't catch this earlier.
> 
> 1) mm-device.c doesn't get IDs from PCI devices.  I've pushed a fix for this to
> your nozomi branch

Great.

> 
> 2) the 'option' plugin specifies both vendor and product filters; the vendor
> filter is 0x0af0, while the product filter is { 0x1931, 0x000c }.  The nozomi
> card is 1931/000c.  But failing either the vendor or product check appears to
> fail the device:
> 
>     /* If we got filtered by vendor or product IDs  and we do not have vendor
>      * or product strings to compare with: unsupported */
>     if ((vendor_filtered || product_filtered) &&
>         !self->priv->vendor_strings &&
>         !self->priv->product_strings &&
>         !self->priv->forbidden_product_strings) {
>         mm_dbg ("(%s) [%s] filtered by vendor/product IDs",
>                 self->priv->name,
>                 g_udev_device_get_name (port));
>         return TRUE;
>     }
> 
> in our case, the nozomi card does not match the vendor filter, so
> vendor_filtered == TRUE, but product_filtered == FALSE, and thus the device is
> marked unsupported by the option plugin.
> 
> But we can't just change to (vendor_filtered && product_filtered) since that
> will make every other plugin claim to support the device (tried it).  Are the
> vendor + product filters supposed to be logical AND, or logical OR?  If they're
> logical OR we have more extensive fixes to do, so I'd rather punt that if we
> can.
> 
> The quick fix is to just add 0x1931 to the Option plugins' vendor IDs, since
> that is Option's assigned PCI VID (0x0af0 is their USB VID) and remove the
> product match.  This does work.

I think that the original idea was to have either vendor filter or product filter; a merged logic would end up being more complex I think. For now, I think that adding 0x1931 to the vendor filter, and removing the product filter, should be more than enough.


> 
> 3) with 1 & 2 done, I get:
> 
> WARNING **: g_object_new_valist: object class 'MMBroadbandModemOption' has no
> property named 'iface-modem-3gpp-ignored-facility-locks'
> 
> I spent 2 minutes trying to find that and failed; usually that's because of a
> missing override, but the override is already there in mm-broadband-modem.c so
> I don't know.

enums vs flags... :) Fixed that, I believe.

I pushed a couple of commits to the branch. If you think it looks good, I'll rebase them to remove the fixup! and merge them to master.
Comment 6 Dan Williams 2013-03-28 17:39:20 UTC
Pushed a quick fixup for a stray }.  It all works now, feel free to rebase and merge.
Comment 7 Aleksander Morgado 2013-03-28 19:09:02 UTC
Rebased and merged now.
Comment 8 Aleksander Morgado 2013-04-01 14:22:47 UTC
*** Bug 682643 has been marked as a duplicate of this bug. ***