RTNETLINK answers: Operation not supported for listen-only

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
tkutscha
Posts: 3
Joined: Mon 10. Apr 2017, 20:06

RTNETLINK answers: Operation not supported for listen-only

Post by tkutscha » Mon 10. Apr 2017, 21:30

Hello,

I'm getting an error when trying to put one of the PCAN adapters into listen-only mode:
Here's what I've don:
- loaded the Peak Linux drivers 8.3.1, compiled for "netdev" mode
- Used "pcan-settings -f=/dev/pcanusb# -d 42"
- edited the /etc/modprobe.d/pcan.conf file options to "options pcan assign=devid"

Here is my /proc/pcan file:

Code: Select all

*------------- PEAK-System CAN interfaces (http://www.peak-system.com) -------------
*------------- Release_20170214_n (8.3.1) Apr 10 2017 12:11:37 --------------
*---------- [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] [net] -----------
*--------------------- 3 interfaces @ major 245 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32    usb  can42 ffffffff 042 0x001c 00000000 00000000 00000000 00000000 0x0000
33  usbfd  can45 ffffffff 045 0x001c 00000000 00000000 00000000 00000000 0x0000
34  usbfd  can46 ffffffff 046 0x001c 00000000 00000000 00000000 00000000 0x0000
After rebooting, I can now use "ip link" to set the bitrate:

Code: Select all

root@vulcan-slicer-2:/etc/modprobe.d# ip link set can42 type can bitrate 1000000
However, I cannot put the PCAN-USB into listen only mode:

Code: Select all

root@vulcan-slicer-2:/etc/modprobe.d# ip link set can42 type can listen-only on
RTNETLINK answers: Operation not supported
I've seen in a different message that "ip link" is only supported in the default LINUX driver, not the custom Peak driver. I need the Peak driver for the unique device ids. How would you recommend I put the device into listen-only mode for sniffing the CAN bus? Will I have to use "chardev" mode with the pcanfd_init() function?

Thanks for your time,
Tim

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

Re: RTNETLINK answers: Operation not supported for listen-on

Post by M.Maidhof » Tue 11. Apr 2017, 14:21

Hi,

this option is not available with the peak-linux-driver at the moment. You have to switch to the kernel driver to use the "listen-only" mode under Linux.

regards

Michael

tkutscha
Posts: 3
Joined: Mon 10. Apr 2017, 20:06

Re: RTNETLINK answers: Operation not supported for listen-on

Post by tkutscha » Tue 11. Apr 2017, 17:05

Hi Michael,

Thanks for your reply. I'll attempt to use the chardev Linux driver for listen-only mode because I need control over the device-IDs that are only present in the Linux driver.

Cheers,
Tim

adeboever
Posts: 4
Joined: Wed 6. Jan 2021, 16:54

Re: RTNETLINK answers: Operation not supported for listen-only

Post by adeboever » Wed 6. Jan 2021, 16:57

Is there any update on this? I am having the same issue trying to use listen-only with socketcan with peak-linux-driver 8.9.3

Thanks,
Adam

adeboever
Posts: 4
Joined: Wed 6. Jan 2021, 16:54

Re: RTNETLINK answers: Operation not supported for listen-only

Post by adeboever » Wed 6. Jan 2021, 18:10

The release notes for 8.6.0 mentions CTRL_MODE_LISTEN, is this the same thing as the iproute2 "listen-only" flag?

"netdev: fixed usage of CTRLMODE_LISTEN_ONLY and _FD_NON_ISO socket-CAN flags"

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

Re: RTNETLINK answers: Operation not supported for listen-only

Post by M.Heidemann » Thu 7. Jan 2021, 15:49

Hello,

Is this issue also replicable with the current Version 8.10.2?

http://www.peak-system.com/fileadmin/me ... 0.2.tar.gz

Can you also provide us with the output for:

Code: Select all

uname -a
?

Best Regards

Marvin
---
Marvin Heidemann
PEAK-Support Team

adeboever
Posts: 4
Joined: Wed 6. Jan 2021, 16:54

Re: RTNETLINK answers: Operation not supported for listen-only

Post by adeboever » Thu 7. Jan 2021, 22:11

Hi Marvin,

I installed the latest driver 8.10.2 and had the same issue.

Code: Select all

$ uname -a
Linux 5.4.79-v7l+ #1373 SMP Mon Nov 23 13:27:40 GMT 2020 armv7l GNU/Linux
Note this is running on a raspberry pi 4 with PCAN-Chip usb Pro FD.

Is there another more permanent way to enable listen only mode in the kernel, before bringing up the device?

Thanks,
Adam

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

Re: RTNETLINK answers: Operation not supported for listen-only

Post by M.Heidemann » Fri 8. Jan 2021, 13:53

Hello Adam,

Please contact us via email regarding this issue:

support[at]peak-system.com


Best Regards

Marvin
---
Marvin Heidemann
PEAK-Support Team

adeboever
Posts: 4
Joined: Wed 6. Jan 2021, 16:54

Re: RTNETLINK answers: Operation not supported for listen-only

Post by adeboever » Fri 8. Jan 2021, 14:01

Done.
Thanks.

Post Reply