Sending real time data from PCAN USB to Raspberry pi4

This forum covers issues concerning multiple hardware products.
Post Reply
shekhar191
Posts: 4
Joined: Tue 4. Aug 2020, 13:37

Sending real time data from PCAN USB to Raspberry pi4

Post by shekhar191 » Tue 4. Aug 2020, 13:48

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

M.Heidemann
Sales & Support
Sales & Support
Posts: 486
Joined: Fri 20. Sep 2019, 13:31

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

Post by M.Heidemann » Tue 4. Aug 2020, 14:38

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

shekhar191
Posts: 4
Joined: Tue 4. Aug 2020, 13:37

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

Post by shekhar191 » Wed 5. Aug 2020, 10:20

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
Attachments
20200805_100702.jpg
20200805_100702.jpg (3.33 MiB) Viewed 2582 times

M.Heidemann
Sales & Support
Sales & Support
Posts: 486
Joined: Fri 20. Sep 2019, 13:31

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

Post by M.Heidemann » Wed 5. Aug 2020, 11:34

Hello,

Try, for example:

Code: Select all

candump can0

Best Regards

Marvin

shekhar191
Posts: 4
Joined: Tue 4. Aug 2020, 13:37

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

Post by shekhar191 » Wed 5. Aug 2020, 13:51

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.
Attachments
20200805_134951.jpg
20200805_134951.jpg (3.35 MiB) Viewed 2566 times
20200805_134500.jpg
20200805_134500.jpg (3.42 MiB) Viewed 2566 times

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

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

Post by M.Maidhof » Wed 5. Aug 2020, 13:57

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

Ava111-
Posts: 1
Joined: Mon 17. Aug 2020, 11:42

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

Post by Ava111- » Mon 17. Aug 2020, 11:46

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
Jerry

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

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

Post by M.Maidhof » Mon 17. Aug 2020, 13:44

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

shekhar191
Posts: 4
Joined: Tue 4. Aug 2020, 13:37

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

Post by shekhar191 » Wed 19. Aug 2020, 00:31

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
Attachments
20200819_001731.jpg
20200819_001731.jpg (3.18 MiB) Viewed 2229 times
20200819_001709.jpg
20200819_001709.jpg (4.44 MiB) Viewed 2229 times
20200819_001721.jpg
20200819_001721.jpg (3.64 MiB) Viewed 2229 times
20200819_001641.jpg
20200819_001641.jpg (3.91 MiB) Viewed 2229 times

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

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

Post by M.Maidhof » Wed 19. Aug 2020, 10:28

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

Post Reply