Page 1 of 1

pcan-usb Device number

Posted: Sun 12. Feb 2017, 21:03
by altran
When I plug in a PCAN-USB device and run dmesg, Linux recognizes the device number that is flashed to it and correlates it with a can network device number. Is there any way I can programatically get this info (can0 -> device 8)? It would be useful when I attached multiple PCAN-USB devices.

*Note, I am using the preinstalled Linux kernel drivers for use with SocketCAN.
See the attached image: dmesg says can0 is attached to device 8

Re: pcan-usb Device number

Posted: Mon 13. Feb 2017, 11:48
by S.Grosjean
Hello,

When running the mainline driver you won't have any possibility to attach a "canX" network interface a specific CAN channel. This is specifically true with hotplug interfaces like USB. canX enumeration depends only on the time the device has been probed.

*BUT* with using our "pcan" driver, you'll have the ability to always assign a specific PCAN-USB CAN channel to the same canX.

Regards,

Stéphane