[SOLVED]Naming udev devices

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED]Naming udev devices

Postby mackowiakp » Aug 12th, '16, 08:17

Another my personal problem with UDEV.
I have USB connected module with 4 opto isolated inputs and 4 relay outputs. The definition of such module is not included in udev rules. Of course each time I connect this module to PC, it install itself on random USB device bus/port, depending on physical port it is connected to. So I want to see this module with constant name device. Below output from udevadm:

Code: Select all
[root@Piotr ~]# /sbin/udevadm info -q all -n /dev/bus/usb/005/004                       
P: /devices/pci0000:00/0000:00:1c.4/0000:05:00.0/usb5/5-1
N: bus/usb/005/004
E: BUSNUM=005
E: DEVNAME=/dev/bus/usb/005/004
E: DEVNUM=004
E: DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:05:00.0/usb5/5-1
E: DEVTYPE=usb_device
E: DRIVER=usb
E: ID_BUS=usb
E: ID_MODEL=DIG_IO_USB
E: ID_MODEL_ENC=DIG_IO_USB
E: ID_MODEL_ID=0001
E: ID_REVISION=0600
E: ID_SERIAL=ARCO_DIG_IO_USB_DIG_IO_0
E: ID_SERIAL_SHORT=DIG_IO_0
E: ID_USB_INTERFACES=:ffffff:
E: ID_VENDOR=ARCO
E: ID_VENDOR_ENC=ARCO
E: ID_VENDOR_FROM_DATABASE=Epiphan Systems Inc.
E: ID_VENDOR_ID=5555
E: MAJOR=189
E: MINOR=515
E: PRODUCT=5555/1/600
E: SUBSYSTEM=usb
E: TYPE=0/0/0
E: USEC_INITIALIZED=901677791


And output from journalctl during disconnect/connect of this module:

Code: Select all
sie 12 08:05:11 Piotr kernel: usb 5-1: USB disconnect, device number 4
sie 12 08:05:17 Piotr kernel: usb 5-1: new full-speed USB device number 5 using xhci_hcd
sie 12 08:05:17 Piotr kernel: usb 5-1: New USB device found, idVendor=5555, idProduct=0001
sie 12 08:05:17 Piotr kernel: usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
sie 12 08:05:17 Piotr kernel: usb 5-1: Product: DIG_IO_USB
sie 12 08:05:17 Piotr kernel: usb 5-1: Manufacturer: ARCO
sie 12 08:05:17 Piotr kernel: usb 5-1: SerialNumber: DIG_IO_0
sie 12 08:05:17 Piotr mtp-probe[5454]: checking bus 5, device 5: "/sys/devices/pci0000:00/0000:00:1c.4/0000:05:00.0/usb5/5-1"
sie 12 08:05:17 Piotr mtp-probe[5454]: bus: 5, device: 5 was not an MTP device


I wrote udev rule as below:

Code: Select all
[root@Piotr rules.d]# cat 11-usb-ftd.rules
SUBSYSTEM=="usb" , ACTION=="add" , ATTRS{idVendor}=="5555", ATTRS{idProduct}=="0001" , ATTRS{SerialNumber}=="DIG_IO_0" , SYMLINK+="arco"


As all manuals stands, now should be created /dev/arco each time I connect device to any USB port - but it doesnt. Any idea what I am doing wrong?
Last edited by mackowiakp on Aug 12th, '16, 11:58, edited 1 time in total.
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Naming udev devices

Postby doktor5000 » Aug 12th, '16, 11:43

Why open a separate thread, when this is also about udev persistent devicenode naming, and your other thread isn't solved yet?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18057
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Naming udev devices

Postby mackowiakp » Aug 12th, '16, 11:57

This topic I will mark as SOLVED, but the second one is partially solved, just update in several minutes.
So in this topic, after several hours of work, I created such udev rule:

Code: Select all
[root@mackowiak rules.d]# cat 11-usb-arco.rules
SUBSYSTEM=="usb" , ACTION=="add" , ATTRS{idVendor}=="5555", ATTRS{idProduct}=="0001" , OWNER="media" , GROUP="media" , SYMLINK+="arco"


and than:

Code: Select all
udevadmin trigger


And after unplug/plug, /dev/arco appears as should be.
But I dont feel the udev mechanisms....
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron