Card identification

20 views
Skip to first unread message

Christoph Bensegger

unread,
May 26, 2020, 6:16:02 AM5/26/20
to Comedi: Linux Control and Measurement Device Interface
I have 8 Advantech IO PCI Cards. (6xDIO 1756, 1x AI 1713, 1x AO 1724)
Linux Kernel (Centos 8, compiled with staged comedi drivers) shows all 8 devices :  /dev/comedi0 .. /dev/comedi7

But order of devices changes somtimes!
E.g.  /dev/comedi0 is most of the time is Card 1724, but sometimes its 1713 or 1756!

I gave all cards a different ID  (dip switches). 

How can I read this board ID with comedi ?



Дмитрий Филь

unread,
May 26, 2020, 9:20:54 AM5/26/20
to comed...@googlegroups.com
You have to make setting for udev rules:
1) make file "91-persistent-comedi.rules" in folder /etc/udev/rules.d/ with next source:
ACTION=="remove", GOTO="persistent_comedi_end"
SUBSYSTEM!="comedi", GOTO="persistent_comedi_end"
KERNEL!="comedi[0-9]*", GOTO="persistent_comedi_end"
KERNEL=="comedi[0-9]*_*", GOTO="persistent_comedi_end"
KERNEL=="comedi*", SUBSYSTEMS=="pci", DRIVERS=="?*", SYMLINK+="comedi/by-path/pci-$id"
LABEL="persistent_comedi_end"
2) After reboot, you will see your devices in /dev/comedi/by-path with an order like PCI order number 

вт, 26 мая 2020 г. в 13:16, Christoph Bensegger <cbens...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "Comedi: Linux Control and Measurement Device Interface" group.
To unsubscribe from this group and stop receiving emails from it, send an email to comedi_list...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/comedi_list/cf232169-3f29-421c-ac67-afca7770d36d%40googlegroups.com.


--
Best regards,
Dmytro Fil    

Industrial software engineer

Reply all
Reply to author
Forward
0 new messages