GNOME Bugzilla – Bug 740966
[PATCH] Previously created GSM connections are not marked as available for my modem
Last modified: 2015-02-25 14:09:02 UTC
When I plug in my USB modem I don't see my previously configured GSM connections as available on DBus. I need to create a new one to see at least some connection available for my modem. This was working in F20 with NetworkManager-0.9.9.0-47.git20131003.fc20. Not sure if this works internally and it is not just propagated to DBus, but since DBus is the only way we (KDE NM applet) communicate with NetworkManager, we need this to be fixed. NetworkManager version: NetworkManager-0.9.10.0-14.git20140704.fc21
If you "nmcli show" the connection, does it have a "connection.interface-name" set? I'm pretty sure that normally shouldn't get set for mobile broadband connections, but if it did, and if the device naming rules changed somehow between F20 and F21, then that would make it no longer be recognized as a matching connection.
Nope, connection.interface-name is not set, but this doesn't work even if now I create a new mobile broadband connection which becomes immediately available for my modem until I remove it and plug it again.
Created attachment 295260 [details] Output from nmcli This is reproducible even with NetworkManager 1.0.0 and I think it's a high priority bug.
I can't seem to reproduce it here, can you grab some journal output when NM recognizes the modem? Whenever the modem device moves to 'disconnected' state it should recheck available connections...
Created attachment 295794 [details] Output from dbus-monitor
Created attachment 295795 [details] Output from /var/log/messages
Output from: qdbus --system --literal org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/Devices/6 org.freedesktop.NetworkManager.Device.AvailableConnections [Variant: [Argument: ao {}]] Output from: sudo nmcli connection show | grep gsm T-Mobile 1af498bb-75f2-44cd-934d-ba71ab1e9c93 gsm -- O2 10ad1692-9c8d-4806-b9e4-c6d90759a9da gsm -- You can see I have two mobile broadband connections which I used before, but none of them is marked as available when I plug in the modem.
Aha! The modem was locked when the NMdevice transitioned to the 'disconnected' state, so available connections were not being rechecked. Could you double-check for me that this patch makes things work? diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c index e876259..0a9dc1e 100644 --- a/src/devices/wwan/nm-device-modem.c +++ b/src/devices/wwan/nm-device-modem.c @@ -295,6 +295,9 @@ modem_state_cb (NMModem *modem, * device's enabled/disabled state. */ nm_modem_set_mm_enabled (priv->modem, priv->rf_enabled); + + /* Now allow connections without a PIN to be available */ + nm_device_recheck_available_connections (device); } if ((dev_state >= NM_DEVICE_STATE_DISCONNECTED) && !nm_device_is_available (device)) {
Confirming that the patch seems to work, after I unlocked the modem I see both my mobile connections.
master: f3b16fffbd842937b23bbac2e35c52f826bda275 nm-1-0: b0dc95f81650a4b496ad00596cf74e8b4d6e0761 nm-0-9-10: 86b0a3c06d28d29fbf7a798ade3dc519e7371165