PCAN-View :Not able to see the send message from PCANBASIC

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
U202457
Posts: 13
Joined: Fri 17. Sep 2021, 13:37

PCAN-View :Not able to see the send message from PCANBASIC

Post by U202457 » Fri 17. Sep 2021, 14:15

Hi,
I am using PEAK-USB, following setup installed
PCAN LINUX driver-"peak-linux-driver-8.12.0",
PCAN BASIC-"PCAN-Basic_Linux-4.4.2" and PCAN VIEW-"pcanview-ncurses_0.9.0-0_amd64.deb".
linux vesrion-5.4.0-84-generic

My steup-

PEAK USB (Char Dev)is connected one of my ECU and I am successfully able to see the messages from ECU into the PACN-VIEW.
I built a Linux application using pcan-basic and trying to send the command to the ECU, But these messages are not captured in PCAN-VIEW even though those messages are being sent to ECU.

Please help me to resolve this issue.

Thankyou in Advance

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

Re: PCAN-View :Not able to see the send message from PCANBASIC

Post by M.Maidhof » Fri 17. Sep 2021, 14:20

Hi,

your are using the chardev driver under Linux. This driver does not have a dispatcher included. So you can't see the messages you have sent with your PCANBasic application with pcanview, when using the same chardev device with both applications. If you want to see the data, connect another PCAN device to your CAN bus and use it with pcanview, or use the SocketCAN driver interface. With SocketCAN/Netdev there is a dispatcher included which will send the messages to all connected applications. See manual of our peak linux driver for more details.

regards

Mcihael

U202457
Posts: 13
Joined: Fri 17. Sep 2021, 13:37

Re: PCAN-View :Not able to see the send message from PCANBASIC

Post by U202457 » Fri 17. Sep 2021, 14:30

HI,
Thankyou so much for quick reply.

I have one query, the PEAK USB will be compatible with "SocketCAN/Netdev" driver?
and using the SocketCAN/Netdev, I can able to see the messages from both the application using single "PCAN device"?

Thankyou

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

Re: PCAN-View :Not able to see the send message from PCANBASIC

Post by M.Maidhof » Fri 17. Sep 2021, 15:58

Hi,

yes correct, but you have to use the SocketCAN tools instead of the PCANBasic and pcanview. There is no extra driver installation necessary for the SocketCAN driver, the PCAN-USB is supported by the kernel since kernel version 3.2. To use the SocketCAN driver of the kernel, you have to remove the peak-linux driver with sudo make uninstall and reboot your system once.

Have a look on the SocketCAN documentation for more details on how to use SocketCAN:

https://www.kernel.org/doc/Documentatio ... ng/can.txt

The can-utils applications are available with apt or from github.

regards

Michael

U202457
Posts: 13
Joined: Fri 17. Sep 2021, 13:37

Re: PCAN-View :Not able to see the send message from PCANBASIC

Post by U202457 » Tue 21. Sep 2021, 13:21

Thankyou for reply will try to configure this setup and check the behavior.

U202457
Posts: 13
Joined: Fri 17. Sep 2021, 13:37

Re: PCAN-View :Not able to see the send message from PCANBASIC

Post by U202457 » Wed 22. Sep 2021, 06:41

Hi,
Using Socket CAN, how to take the trace?
PCANVIEW will work for the same? or any other tool need to be install?

Thankyou in Advance

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

Re: PCAN-View :Not able to see the send message from PCANBASIC

Post by M.Maidhof » Wed 22. Sep 2021, 11:59

Hi,

pcanview or pcanbasic could not be used with SocketCAN. To trace the CAN data under SocketCAN you can use the candump application, which is part of the can-utils package.

regards

Michael

U202457
Posts: 13
Joined: Fri 17. Sep 2021, 13:37

Re: PCAN-View :Not able to see the send message from PCANBASIC

Post by U202457 » Wed 22. Sep 2021, 14:46

Hi,

Thankyou So much for the solution.


It is working for me Now !!! :D

Following link I have followed for adding PEAK USB in module:

** Links changed by Admin **


h**ps://blog.mbedded.ninja/programming/operating-systems/linux/how-to-use-socketcan-with-the-command-line-in-linux/

h**p://codingadventures.org/2018/10/03/peak-can-usb-with-socketcan/

Thankyou

Post Reply