PEAK-Linux Driver on Raspberry Pi

This forum covers PCAN-Linux and Linux development issues concerning our products
dan.gert
Posts: 2
Joined: Wed 1. Mar 2017, 14:23

Re: PEAK-Linux Driver on Raspberry Pi

Post by dan.gert » Wed 1. Mar 2017, 15:35

Thanks for the fast Help.
I didn't saw this... :roll:

Have a nice Day
Daniel

Kubi85
Posts: 2
Joined: Wed 10. May 2017, 14:29

Re: PEAK-Linux Driver on Raspberry Pi

Post by Kubi85 » Wed 10. May 2017, 14:41

Hi,

is there something special to consider using the PCAN-Chip USB and the PCAN-Chip USB Evaluation Kit?

I use a RaspberryPi CM3 with kernel 4.4.44-v7+ and the driver included in the mainline kernel. Using a PCAN-USB FD (IPEH-004022) with canutils and socketCAN works just fine. However, the PCAN-Chip USB Evaluation Kit is not recognized (e.g. as can0).

Thanks in advance!

Regards
Kubi

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: PEAK-Linux Driver on Raspberry Pi

Post by M.Maidhof » Wed 10. May 2017, 15:32

Hi,

the PCAN-USB Chip solution is very new, and will be supported by the kernel driver with kernel 4.11 or higher. As a workaround, you can install our peak-linux-driver 8.4-beta, which is available on request (by email, use our support address).

regards

Michael

Kubi85
Posts: 2
Joined: Wed 10. May 2017, 14:29

Re: PEAK-Linux Driver on Raspberry Pi

Post by Kubi85 » Thu 11. May 2017, 12:13

Hi,

i have received and compiled the driver successfully. Now, cansend etc. is working with the PCAN-Chip USB Eval Kit on the Raspberry Pi CM3 as well.

Thank You very much!!!

Regards
Kubi

haseel
Posts: 9
Joined: Thu 27. Jul 2017, 09:09

Re: PEAK-Linux Driver on Raspberry Pi

Post by haseel » Tue 1. Aug 2017, 13:40

Hi,

I just set up the PEAK CAN USB and RPI3, now i can read the can signals using candump command and send the signals using cansend command. Anybody knows how to send/read through python program, i understood that these commands are not available in python.

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: PEAK-Linux Driver on Raspberry Pi

Post by M.Maidhof » Tue 1. Aug 2017, 16:33

Hi,

if you want to use the SocketCAN driver, ask the SocketCAN maintainers for python support.

When using our peak-linux-driver with chardev interface, you can use the PCANBasic API. With that API you will also get python examples.

regards

Michael

haseel
Posts: 9
Joined: Thu 27. Jul 2017, 09:09

Re: PEAK-Linux Driver on Raspberry Pi

Post by haseel » Wed 2. Aug 2017, 07:32

Hi,

Thanks for your reply. I have already installed the PCANBasic API and ran the test program also.
I want to send the can signal as well as read the specific can message from python program. I was using "PCANBasic.object.Write()" function, but failed to get the output.

Rgs,
HASEEL

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: PEAK-Linux Driver on Raspberry Pi

Post by M.Maidhof » Wed 2. Aug 2017, 11:15

Hi,

please post output of cat /proc/pcan to see that you use the chardev driver interface

regards

Michael

haseel
Posts: 9
Joined: Thu 27. Jul 2017, 09:09

Re: PEAK-Linux Driver on Raspberry Pi

Post by haseel » Wed 9. Aug 2017, 08:50

Hi Michael,

Please find below the output.

####################################################################

pi@raspberrypi:~ $ cat /proc/pcan

*------------- PEAK-System CAN interfaces (http://www.peak-system.com) -------------
*------------- Release_20160608_n (8.1.0) Aug 1 2017 14:03:34 --------------
*---------------------------- [mod] [usb] [net] -----------------------------
*--------------------- 1 interfaces @ major 243 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32 usb can0 ffffffff 000 0x001c 0031ade5 00000000 00039bf9 00000000 0x0000

####################################################################

Right now i am able to send the CAN messages through Write function in python. Now i want to read the specific can messages then need to copy the data into one variable using python. Any idea?

Thanks in advance.

Rgs,
HASEEL

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: PEAK-Linux Driver on Raspberry Pi

Post by M.Maidhof » Wed 9. Aug 2017, 14:17

Hi,

you have build a netdev driver ;) , to use the PCANBasic API you have to build a chardev driver.

regards

Michael

Post Reply