[opensuse-support] NetworkManager filter usb device
Hi all, I'm trying to convince NetworkManager to not create a modem for a given USB device. For that I added a udev rule: ~/$ cat /etc/udev/rules.d/51-nm-blacklist.rules ATTR{idVendor}=="16d0", ATTR{idProduct}=="04b2", ENV{ID_MTP_DEVICE}="1", ENV{MTP_NO_PROBE}="1", ENV{NM_UNMANAGED}="1" But if I run journalctl -f while plugging in the device I still get: <copy> Mar 17 21:49:09 ziggy.stardust kernel: usb 1-1.2.1: new full-speed USB device number 19 using ehci-pci Mar 17 21:49:09 ziggy.stardust kernel: usb 1-1.2.1: New USB device found, idVendor=16d0, idProduct=04b2, bcdDevice= 0.01 Mar 17 21:49:09 ziggy.stardust kernel: usb 1-1.2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=220 Mar 17 21:49:09 ziggy.stardust kernel: usb 1-1.2.1: Product: Chameleon-Mini Mar 17 21:49:09 ziggy.stardust kernel: usb 1-1.2.1: Manufacturer: Kasper & Oswald GmbH Mar 17 21:49:09 ziggy.stardust kernel: usb 1-1.2.1: SerialNumber: 839523431373FFFFB0FF6100F000 Mar 17 21:49:09 ziggy.stardust kernel: cdc_acm 1-1.2.1:1.0: ttyACM0: USB ACM device Mar 17 21:49:10 ziggy.stardust gnome-shell[2826]: Unable to mount volume Chameleon Mini: Gio.IOErrorEnum: No MTP devices found Mar 17 21:49:27 ziggy.stardust ModemManager[1417]: <info> [device /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2.1] creating modem with plugin 'Generic' and '1' ports Mar 17 21:49:27 ziggy.stardust ModemManager[1417]: <warn> Could not grab port (tty/ttyACM0): 'Cannot add port 'tty/ttyACM0', unhandled serial type' Mar 17 21:49:27 ziggy.stardust ModemManager[1417]: <warn> Couldn't create modem for device '/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2.1': Failed to find primary AT port </copy> Which indicates me that ModemManager is still trying to send AT commands to the device, which I don't want it to do. Any idea what I'm missing here? Regards, Matthias -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
17.03.2020 23:53, Matthias Brugger пишет:
Hi all,
I'm trying to convince NetworkManager to not create a modem for a given USB device.
For that I added a udev rule: ~/$ cat /etc/udev/rules.d/51-nm-blacklist.rules
ATTR{idVendor}=="16d0", ATTR{idProduct}=="04b2", ENV{ID_MTP_DEVICE}="1", ENV{MTP_NO_PROBE}="1", ENV{NM_UNMANAGED}="1"
NM_UNMANAGED as name suggests is for NetworkManager, not ModemManager. https://www.freedesktop.org/software/ModemManager/api/latest/ModemManager-Co...
But if I run journalctl -f while plugging in the device I still get:
<copy> Mar 17 21:49:09 ziggy.stardust kernel: usb 1-1.2.1: new full-speed USB device number 19 using ehci-pci Mar 17 21:49:09 ziggy.stardust kernel: usb 1-1.2.1: New USB device found, idVendor=16d0, idProduct=04b2, bcdDevice= 0.01 Mar 17 21:49:09 ziggy.stardust kernel: usb 1-1.2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=220 Mar 17 21:49:09 ziggy.stardust kernel: usb 1-1.2.1: Product: Chameleon-Mini Mar 17 21:49:09 ziggy.stardust kernel: usb 1-1.2.1: Manufacturer: Kasper & Oswald GmbH Mar 17 21:49:09 ziggy.stardust kernel: usb 1-1.2.1: SerialNumber: 839523431373FFFFB0FF6100F000 Mar 17 21:49:09 ziggy.stardust kernel: cdc_acm 1-1.2.1:1.0: ttyACM0: USB ACM device Mar 17 21:49:10 ziggy.stardust gnome-shell[2826]: Unable to mount volume Chameleon Mini: Gio.IOErrorEnum: No MTP devices found Mar 17 21:49:27 ziggy.stardust ModemManager[1417]: <info> [device /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2.1] creating modem with plugin 'Generic' and '1' ports Mar 17 21:49:27 ziggy.stardust ModemManager[1417]: <warn> Could not grab port (tty/ttyACM0): 'Cannot add port 'tty/ttyACM0', unhandled serial type' Mar 17 21:49:27 ziggy.stardust ModemManager[1417]: <warn> Couldn't create modem for device '/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2.1': Failed to find primary AT port </copy>
Which indicates me that ModemManager is still trying to send AT commands to the device, which I don't want it to do.
Any idea what I'm missing here?
Regards, Matthias
-- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
participants (2)
-
Andrei Borzenkov
-
Matthias Brugger