GNOME Bugzilla – Bug 723906
Add the ability to recognize tethered phones
Last modified: 2020-11-12 14:30:11 UTC
See bug 723570 for the background and for the API user. The actual udev rule file is really just a proof of concept. I have no idea where we can find the relevant data.
Created attachment 268497 [details] [review] Add the ability to recognize tethered phones Include a udev rule that tags USB ethernet devices that are actually phones by looking at the driver, vendor and product id, and add a simple utility function to query udev for this property.
Comment on attachment 268497 [details] [review] Add the ability to recognize tethered phones I feel like the udev rules would make more sense in ModemManager, but I'm not sure about that. (dcbw is on vacation right now but he can chime in when he gets back). >+# Put this file in /etc/udev/rules.d /usr/lib/udev/rules.d. /etc is for local overrides >+gboolean nma_utils_is_usb_tethering (NMDevice *device); Note that all of the other functions here have been migrated to libnm-util and libnm-glib in git master, and will eventually be removed from libnm-gtk, so this should probably be added to libnm-glib instead (probably to NMDeviceEthernet I guess?). Also, re: all the NM versioning fun, you should probably probe to see if the function is available before calling it, rather than assuming you can require a version of NM that has it.
The reason I chose network-manager-applet instead of NetworkManager is that this is quite hackish and very UI-oriented. NM and its users, should keep thinking in terms of ethernet devices, even if they have the magic udev property. OTOH, having NM expose an ethernet device with a knob saying "this is not really ethernet" seems wrong to me.
bugzilla.gnome.org is being shut down in favor of a GitLab instance. We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time. If you still use NetworkManager and if you still see this bug / want this feature in a recent and supported version of NetworkManager, then please feel free to report it at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/ Thank you for creating this report and we are sorry it could not be implemented (workforce and time is unfortunately limited).