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 702678 - [MM 0.8] expose a modem's port list?
[MM 0.8] expose a modem's port list?
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: 702220
 
 
Reported: 2013-06-19 18:11 UTC by Dan Williams
Modified: 2013-06-24 17:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch. (24.99 KB, patch)
2013-06-21 12:37 UTC, Aleksander Morgado
committed Details | Review

Description Dan Williams 2013-06-19 18:11:08 UTC
One issue we have in NetworkManager is with net ports that aren't tagged DEVTYPE=wwan in the kernel.  ModemManager knows they belong to the modem because it's using the parent/child relationships.  But NetworkManager only knows about the primary port.  So if eg 'usb0' shows up from a cdc-ether device, ModemManager assigns it to the modem but doesn't expose that until the bearer is created.  But NetworkManager gets the kernel/udev add event for usb0 and since it doesn't have DEVTYPE=wwan, has no idea that it's a WWAN device and attempts to use it like a USB ethernet interface.

Maybe we could add a property to MM to indicate all the ports assigned to the modem, even before a bearer is created, which NM could listen to and then ignore any net device that shows up in that list?

Obviously stuff should get tagged DEVTYPE=wwan in the kernel but that's a losing battle because it's all based on USB VID/PID and new devices appear every day :(
Comment 1 Aleksander Morgado 2013-06-20 08:05:19 UTC
Sounds good to me; a new "Ports" property with signature "as" should do it. Will try to add it today/tomorrow.
Comment 2 Dan Williams 2013-06-20 17:15:41 UTC
Do we care about representing the type, eg "net" or "tty" or whatever else?  These days since stuff doesn't need to be in /dev I think you could technically rename differnet subsystem ports to the same name.  Maybe a(su) where the 'u' is an enum for subsystem or something?  I don't know if it's worth the code but maybe.
Comment 3 Aleksander Morgado 2013-06-21 06:51:59 UTC
Yeah, not a bad idea as well.
Comment 4 Aleksander Morgado 2013-06-21 12:37:23 UTC
Created attachment 247430 [details] [review]
Patch.

There you go, let me what you think.
Comment 5 Aleksander Morgado 2013-06-21 12:39:11 UTC
(In reply to comment #4)
> Created an attachment (id=247430) [details] [review]
> Patch.
> 
> There you go, let me what you think.

let me *know* what you think :)
Comment 6 Dan Williams 2013-06-24 17:33:19 UTC
Review of attachment 247430 [details] [review]:

Yeah, looks good.
Comment 7 Aleksander Morgado 2013-06-24 17:54:54 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.