Re: Preventing modem-manager from accessing specific serial ports?

On Sun 20 Oct 2013 08:43:57 NZDT +1300, Dan Williams wrote:

Thank you very much Dan, adding ID_MM_DEVICE_IGNORE is trivial once one
knows that is the trick to use.

Are there *any* modems using any of the FTDI USB/serial converters? Or
does MM handle the old serial port modems too? Because if not, modem
manager should perhaps be shipped with a blacklist rule for those
because it can never do any good with them.

copy that file, change it as appropriate, and put it
into /etc/udev/rules.d.  Note the match on "usb_device", which is the
key part here that applies the tag to the usb device object instead of
the TTYs that hang off it.

Here's a snag:

I use rules like (1 line)

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001",
ATTRS{manufacturer}=="FTDI", ATTRS{product}=="FT232R USB UART",
ATTRS{serial}=="A60xxxxx", SYMLINK+="ttyUSB_somename"

without any other qualification so I can access my hardware by
ttyUSB_somename without having to care what number the kernel assigned
this time.

Appending ENV{ID_MM_DEVICE_IGNORE}="1" to that keeps MM off.

Bracketing this with

  ACTION!="add|change", GOTO="AVR_FTDI_rules_end"

is fine, however, bracketing this with either one of

  SUBSYSTEM!="usb", GOTO="AVR_FTDI_rules_end"
  ENV{DEVTYPE}!="usb_device", GOTO="AVR_FTDI_rules_end"

causes the symlinks to be created like this:

  crw-rw----  /dev/ttyUSB0
  lrwxrwxrwx  /dev/ttyUSB_somename -> bus/usb/001/041

which is useless.

What happens exactly if I don't qualify the symlink rule by
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device"? I don't currently have a
modem to try this with.

Thanks again,


Volker Kuhlmann     Please do not CC list postings to me.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]