Re: PCAN USB Multiple Hardware same PC
Posted: Fri 4. Dec 2020, 16:22
Hello John,
I would suggest the following approach:
Get the latest PCAN-Linux Driver package:
http://www.peak-system.com/fileadmin/me ... 0.2.tar.gz
PCAN-Linux driver Documentation:
http://www.peak-system.com/fileadmin/m ... an_eng.pdf
Note: Please see the requirements in chapter 2.2
Install the CharDev-variant of the PCAN-Linux driver, by executing in the extracted PCAN-Linux driver-folder:
Load the driver:
With
you'll be to see the available devices.
you can use the read/write interface to identfiy the device, like so (will initialize the device with 500k and starts reading, the LED will blink):
Afterwards you can assign a device-ID to the device by using the pcan-settings-tool described in the chapter 4.7.3 of the PCAN-Linux documentation:
sudo test/pcan-settings -f=/dev/pcanusbX -d=0
sudo test/pcan-settings -f=/dev/pcanusbY -d=1
etc...
This device-id is written into the non-volatile memory of the interface.
you can now uninstall the CharDev-driver by calling this from the driver directory:
sudo make uninstall
Now you can set up the SocketCAN-compatible NetDev driver:
and load the driver
sudo modprobe pcan
Now use the "assign"-parameter to fix the device assignment of channels (can0, can1, etc) to a device-ID
Edit the file:
/etc/modprobe.d/pcan.conf
and add the following line
"pcan options assign=devid"
This will make sure the channels assignment is tied to the device-id
Now either reboot or reload the the driver
this feature is not available in the mainline-kernel driver.
Alternatively we do offer a PCIe chip solutions,
for more information in that regard, please contact us at support[at]peak-system.com
Best Regards
Marvin
I would suggest the following approach:
Get the latest PCAN-Linux Driver package:
http://www.peak-system.com/fileadmin/me ... 0.2.tar.gz
PCAN-Linux driver Documentation:
http://www.peak-system.com/fileadmin/m ... an_eng.pdf
Note: Please see the requirements in chapter 2.2
Install the CharDev-variant of the PCAN-Linux driver, by executing in the extracted PCAN-Linux driver-folder:
Code: Select all
make clean
make
sudo make install
Code: Select all
sudo modprobe pcan
Code: Select all
cat /proc/pcan
you can use the read/write interface to identfiy the device, like so (will initialize the device with 500k and starts reading, the LED will blink):
Code: Select all
cat /dev/pcanusbX
sudo test/pcan-settings -f=/dev/pcanusbX -d=0
sudo test/pcan-settings -f=/dev/pcanusbY -d=1
etc...
This device-id is written into the non-volatile memory of the interface.
you can now uninstall the CharDev-driver by calling this from the driver directory:
sudo make uninstall
Now you can set up the SocketCAN-compatible NetDev driver:
Code: Select all
make clean
make NET=NETDEV_SUPPORT
make install
sudo modprobe pcan
Now use the "assign"-parameter to fix the device assignment of channels (can0, can1, etc) to a device-ID
Edit the file:
/etc/modprobe.d/pcan.conf
and add the following line
"pcan options assign=devid"
This will make sure the channels assignment is tied to the device-id
Now either reboot or reload the the driver
Code: Select all
sudo rmmod pcan
sudo modprobe pcan
Alternatively we do offer a PCIe chip solutions,
for more information in that regard, please contact us at support[at]peak-system.com
Best Regards
Marvin