Re: finding corresponding udev rule for device

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



Am 19.06.2013 23:04, schrieb Damjan Georgievski:
hi all,
i want to customize the udev rule, that assigns my garmin gps device with a
device name. permissions need to be set different, so users have read/write
access.
the only problem is, that i dont know, which rule it is i have to customize.
is there any way to determine, which standard udev rule applies for which
device?
What you need to do is create your own rules file in
/etc/udev/rules.d/
something with a big number, let's say 99-my-garmin.rules

To find out how to make the rule (I suspect it's an usb device)... first run
`udevadm monitor` then plug the device you will get the device path
... something like
/devices/pci0000:00/0000:00:12.2/usb1/.../.../...

Then run `udevadm info --attribute-walk --path=/devices/.../.../...`
and you'll get a bunch of properties that you can match in your own rule file.



thanks for answering.
its a serial device, which is connected via serial-to-usb-adapter.
i created a file /etc/udev/rules.d/99-serial-to-usb-4-garmin.rules und tried a lot of rules, like
DRIVERS=="ch341-uart",ATTRS{idVendor}=="1a86",NAME="usbserial"
(see http://pastie.org/8061009 for 'udevadm info ...' output)
then i reloaded udev rules with
'udevadm control --reload'
and checked result with
'udevadm monitor'
i always get ttyUSB0, but not usbserial as i expected.
am i missing something?


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux