Page 1 of 1

RTNETLINK answers: Operation not supported for listen-only

Posted: Mon 10. Apr 2017, 21:30
by tkutscha
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

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

Posted: Tue 11. Apr 2017, 14:21
by M.Maidhof
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

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

Posted: Tue 11. Apr 2017, 17:05
by tkutscha
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

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

Posted: Wed 6. Jan 2021, 16:57
by adeboever
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

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

Posted: Wed 6. Jan 2021, 18:10
by adeboever
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"

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

Posted: Thu 7. Jan 2021, 15:49
by M.Heidemann
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

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

Posted: Thu 7. Jan 2021, 22:11
by adeboever
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

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

Posted: Fri 8. Jan 2021, 13:53
by M.Heidemann
Hello Adam,

Please contact us via email regarding this issue:

support[at]peak-system.com


Best Regards

Marvin

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

Posted: Fri 8. Jan 2021, 14:01
by adeboever
Done.
Thanks.