Page 1 of 1

Sending real time data from PCAN USB to Raspberry pi4

Posted: Tue 4. Aug 2020, 13:48
by shekhar191
Hello Everyone,
I am currently doing a project where I have to stream real-time vehicle data and send the data to raspberry pi4. I want to use PCAN USB adapter to send the signals from vehicle can to raspberry pi. I am relatively new to PCAN USB and need your assistance in this regard.
Thanks

Re: Sending real time data from PCAN USB to Raspberry pi4

Posted: Tue 4. Aug 2020, 14:38
by M.Heidemann
Hello!

A good starting point is this forum thread started by my colleague Michael,
which explains in detail how to set up our devices drivers on a Raspberry-Pi running Raspbian:

viewtopic.php?f=59&t=3381&p=11967&hilit=raspbian#p11967

Please report back to me, if this was helpful to you.

Best Regards


Marvin

Re: Sending real time data from PCAN USB to Raspberry pi4

Posted: Wed 5. Aug 2020, 10:20
by shekhar191
Hi Marvin,
I did follow the thread and have implemented it on the raspberry pi. Below attached is the screenshot of the same. I want to test if the actually being sent through the USB to Rpi. Need your assistance in this regard.
Thanks

Re: Sending real time data from PCAN USB to Raspberry pi4

Posted: Wed 5. Aug 2020, 11:34
by M.Heidemann
Hello,

Try, for example:

Code: Select all

candump can0

Best Regards

Marvin

Re: Sending real time data from PCAN USB to Raspberry pi4

Posted: Wed 5. Aug 2020, 13:51
by shekhar191
Thanks for your reply.
When I do candump can0, the screen freezes and I can't do anything. I have posted a picture of my setup below. One port of PCAN USB is connected to Raspberry Pi and another port( I am using two PCAN USB's) is connected to my laptop(windows) and I am trying to send the data from laptop to the raspberry pi.

Re: Sending real time data from PCAN USB to Raspberry pi4

Posted: Wed 5. Aug 2020, 13:57
by M.Maidhof
Hi,

please check your CAN cables for 120Ohms termination resistors on both ends. Next, please send a screenshot of the Windows PCAN-View showing the frames you are transmitting and the status bar. Please also post the ip link command you have used to configure can0 on your pi.

BTW: in a linux console it is not a freezing, it is just working, but as long as there are no frames you will see nothing ;) . Use CTRL-C to break candump again

regards

Michael

Re: Sending real time data from PCAN USB to Raspberry pi4

Posted: Mon 17. Aug 2020, 11:46
by Ava111-
Hello Everyone,
I am currently doing a project where I have to stream real-time vehicle data and send the data to raspberry pi4. I want to use PCAN USB adapter to send the signals from vehicle can to raspberry pi. I am relatively new to PCAN USB and need your assistance in this regard.
Thanks

Re: Sending real time data from PCAN USB to Raspberry pi4

Posted: Mon 17. Aug 2020, 13:44
by M.Maidhof
Hi,

when you start with Linux and PCAN-USB, please read first the manual of our Linux driver: https://www.peak-system.com/fileadmin/m ... an_eng.pdf

and see here: viewtopic.php?f=59&t=3381

regards

Michael

Re: Sending real time data from PCAN USB to Raspberry pi4

Posted: Wed 19. Aug 2020, 00:31
by shekhar191
Hi Michael,
Please find below attached the screenshots of my setup.
I have checked the termination resistors. The status bar of PCAN shows 'OK' and unable to receive any messages at the terminal of RPi. Also, when I do candump can0, I cannot stop the process using CTRL+C. The Rpi just stops working and I have to start again by unplugging and plugging the power. Need you assistance in this regard.
Thanks

Re: Sending real time data from PCAN USB to Raspberry pi4

Posted: Wed 19. Aug 2020, 10:28
by M.Maidhof
Hi,

as I can see on those pictures you are using 1MBit/s under Windows, while you have configured your PI to 500k....please use the same baudrate on both systems to be able to communicate.

Please also post the output of cat /proc/pcan again after your test

regards

Michael