PCAN-Linux: Permanent assignment of canx (PCAN-USB)

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
CM.TRP.Labs
Posts: 1
Joined: Tue 27. Feb 2024, 19:54

PCAN-Linux: Permanent assignment of canx (PCAN-USB)

Post by CM.TRP.Labs » Tue 27. Feb 2024, 20:01

Hello,
I'm running Linux redhat 8 and I have 5 adapters on one system that need to stay labeled as the netdev can# they are set to. Can0 is one sensor, can1 is a power supply, etc. when I reboot all the can#'s get scrambled across all the adapters so I have to unplug and plug them all in and figure out what's what every time. I've given them unique ID's but my system doesn't use udev so I'm not able to create a rule to link them. Any ideas how I can keep the net dev can interface from renumbering every time?

Thanks,
CM

G.Lang
Support
Support
Posts: 169
Joined: Wed 22. Sep 2010, 14:58

Re: PCAN-USB netdev/usb

Post by G.Lang » Wed 28. Feb 2024, 07:06

Hi,

if you are using the kernel integrated netdev driver (SocketCAN) and you use a kernel 6.3 or higher then you can fix the canX names via the following instructions :
https://www.peak-system.com/fileadmin/m ... /index.htm

canX_naming_kernel_6_3.jpg
canX_naming_kernel_6_3.jpg (171.63 KiB) Viewed 2551 times


If you use our proprietary netdev driver then you must use the assign parameter, for more infos please take a look into the PCAN_Linux driver manual:
https://www.peak-system.com/fileadmin/m ... an_eng.pdf

canX_naming_PEAK_driver.jpg
canX_naming_PEAK_driver.jpg (176.84 KiB) Viewed 2549 times

Post Reply