Can't Recieve Data on CAN

This forum covers PCAN-Linux and Linux development issues concerning our products
vivekjaiswal1
Posts: 8
Joined: Thu 25. Feb 2021, 04:38

Can't Recieve Data on CAN

Post by vivekjaiswal1 » Fri 26. Feb 2021, 12:49

I have PCAN-PCI Express FD Device. I installed the drivers as mentioned in the manual.

Code: Select all

 cd ~/PCAN-Driver
make NET=NETDEV_SUPPORT PCI=PCI_SUPPORT PCIEC=PCIEC_SUPPORT
sudo make install 
But While using PCANVIEW I am getting following error
Screenshot from 2021-02-26 17-04-35.png
Screenshot from 2021-02-26 17-04-35.png (45.19 KiB) Viewed 447 times
And while using the terminal commands to see the data. There no data is published
Screenshot from 2021-02-26 17-10-46.png
Screenshot from 2021-02-26 17-10-46.png (14.73 KiB) Viewed 447 times
Any help would be highly appreciated.
Screenshot from 2021-02-26 17-13-53.png
Screenshot from 2021-02-26 17-13-53.png (31.91 KiB) Viewed 447 times

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

Re: Can't Recieve Data on CAN

Post by M.Heidemann » Fri 26. Feb 2021, 12:58

Hi,

PCAN-View for Linux is not compatible with the NetDev-Driver (SocketCAN) and only works with the CharDev-variant of our proprietary Linux driver exclusively.

As to why there are no messages displayed with candump:

1) Is your CAN-bus properly terminated (120 Ohms) on both bus-ends?

2) Does the bitrate match the biotrate used by alll other CAN-nodes on the bus?

3) What kind of CAN-data are you expecting to see, are you sure there are any messages transmit at the moment of reading?

Best Regards

Marvin

vivekjaiswal1
Posts: 8
Joined: Thu 25. Feb 2021, 04:38

Re: Can't Recieve Data on CAN

Post by vivekjaiswal1 » Fri 26. Feb 2021, 13:22

Hi Marvin,

Thank you for the prompt reply. Actually initially installing the driver. I installed in the drivers without NETDEV_SUPPORT. At that time pcanview was working fine and displaying the data also.
I wanted to use SOCKETCAN so I installed drivers with NETDEV but no data is being published.

Regards,
Vivek

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

Re: Can't Recieve Data on CAN

Post by M.Heidemann » Fri 26. Feb 2021, 13:35

Hello,

Thank you for your response.

As mentioned earlier:

- Does the bitrate match the bitrate used by alll other CAN-nodes on the bus?

- What kind of CAN-data are you expecting to see, are you sure there are any messages transmit at the moment of reading?

We need more information on what exactly are the conditions at the very moment to provide adequate support.

Furthermore it would be helpful to know, which bitrate configuration you have used with PCANView previously.

Best Regards

Marvin

vivekjaiswal1
Posts: 8
Joined: Thu 25. Feb 2021, 04:38

Re: Can't Recieve Data on CAN

Post by vivekjaiswal1 » Fri 26. Feb 2021, 13:49

I have currently attached only a Continental RADAR on CAN bus 0. As prescribed by the sensor manufacturer I am using 500k bitrate.
And there is no transmitting of any message while receiving data. However, is there any way to verify this?

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

Re: Can't Recieve Data on CAN

Post by M.Heidemann » Fri 26. Feb 2021, 14:28

Hello,

If there is no message present on the bus, candump will be unable to display anything as there is nothing to display...

Well, you could verfiy using a know working configuration and see if the radar transmits data in this state.

However you could try, this, as you were previously to see can-traffic with PCAN-View:

Code: Select all

sudo ip link set can0 up type can bitrate 500000 sample-point 0.8
As PCAN-View seems to have used 500k with a sample-point of 80% previously,
you should try the same configuration when using socketcan.

Please report back to us, if this has solved the issue.

Best Regards

Marvin

vivekjaiswal1
Posts: 8
Joined: Thu 25. Feb 2021, 04:38

Re: Can't Recieve Data on CAN

Post by vivekjaiswal1 » Fri 26. Feb 2021, 14:39

I am new to using PCAN Converters. Do I need to somehow link /dev/pcan0 to can0. Or is it automatically done while installing drivers.

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

Re: Can't Recieve Data on CAN

Post by M.Heidemann » Fri 26. Feb 2021, 14:50

When installing the driver as netdev,
this is automatically configured accordingly.


Best Regards

Marvin

vivekjaiswal1
Posts: 8
Joined: Thu 25. Feb 2021, 04:38

Re: Can't Recieve Data on CAN

Post by vivekjaiswal1 » Fri 26. Feb 2021, 15:41

Please correct me If I am wrong in the following procedure for initializing the CAN drivers:

Code: Select all

 sudo modprobe pcan
 sudo ip link set can0 up type can bitrate 500000 sample-point 0.8
 candump can0

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

Re: Can't Recieve Data on CAN

Post by M.Heidemann » Mon 1. Mar 2021, 07:14

Hello,

This is the correct order, however:

Code: Select all

sudo modprobe pcan
will only be necessary once, right after the driver has been installed.

On the next boot the driver will automatically be loaded.

Please report back to us, if the bitrate configuration we've suggested worked

Best Regards

Marvin

Post Reply