CAN Mini PCIe w/Linux Debian 9: operation not supported
-
- Posts: 3
- Joined: Thu 28. Jun 2018, 17:34
CAN Mini PCIe w/Linux Debian 9: operation not supported
I'm hoping reaching out for technical assistance with our CAN-MINI-PCI-E-1 card. I'm using Linux Debian 9 for my OS. I have installed peak-linux-driver-8.5.1.
Specifically, I've configured the device for netdev support (confirmed with cat /proc/pcan and saw ndev with device name can0). I'm attempting to use the iproute2 tools to configure my can0 interface and configure a bitrate of 125k.
When I do sudo ip link set can0 up type can bitrate 125000, I get a response as RTNETLINK answers: Operation not supported. When I do sudo ip link add dev can0 type can, I do get a positive response as RTNETLINK answers: File exists. Lastly, I've also tried ip link set can0 up type can bitrate 125000, and got a response stating can0: bit-timing not yet defined. ifconfig can0 up also did not work.
I have confirmed that Linux's CAN Device Drivers are configured as CONFIG_CAN_CALC_BITTIMING=y. Perhaps I'm missing some other configuration step for netdev support's bit timing? candump and other SocketCAN commands will not show a network as functional until I figure this out.
I'm referencing the PCAN Driver for Linux v8 - User Manual pages 34 and 35. Any point in the right direction would be greatly appreciated!
Specifically, I've configured the device for netdev support (confirmed with cat /proc/pcan and saw ndev with device name can0). I'm attempting to use the iproute2 tools to configure my can0 interface and configure a bitrate of 125k.
When I do sudo ip link set can0 up type can bitrate 125000, I get a response as RTNETLINK answers: Operation not supported. When I do sudo ip link add dev can0 type can, I do get a positive response as RTNETLINK answers: File exists. Lastly, I've also tried ip link set can0 up type can bitrate 125000, and got a response stating can0: bit-timing not yet defined. ifconfig can0 up also did not work.
I have confirmed that Linux's CAN Device Drivers are configured as CONFIG_CAN_CALC_BITTIMING=y. Perhaps I'm missing some other configuration step for netdev support's bit timing? candump and other SocketCAN commands will not show a network as functional until I figure this out.
I'm referencing the PCAN Driver for Linux v8 - User Manual pages 34 and 35. Any point in the right direction would be greatly appreciated!
- S.Grosjean
- Software Development
- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Re: CAN Mini PCIe w/Linux Debian 9: operation not supported
Hello,
Please give us the output of:
Then:
Then, copy-paste the real "ip link" commands you do, as well as their answer.
Also, give us the output of:
and:
Regards,
Stéphane
Please give us the output of:
Code: Select all
$ uname -a
Code: Select all
$ cat /proc/pcan
Also, give us the output of:
Code: Select all
$ grep CONFIG_CAN /boot/config-`uname -r`
Code: Select all
$ dmesg | grep pcan
Stéphane
— Stéphane
-
- Posts: 3
- Joined: Thu 28. Jun 2018, 17:34
Re: CAN Mini PCIe w/Linux Debian 9: operation not supported
Thanks for the reply!
Output of
Linux mvp-0002 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux
Output of
*------------- PEAK-System CAN interfaces (http://www.peak-system.com) --------------
*------------- Release_20171027_n (8.5.1) Jun 21 2018 16:28:57 -------------------
*----------- [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] [net] --------------
*------------------------- 1 interfaces @ major 249 found ------------------------------
*n -type -ndev- --base-- irq --btr- --read-- --write-- --irqs-- -errors- status
0 pci can0 81800000 016 0x031c 00000000 00000000 00000000 00000000 0x0000
Output of
RTNETLINK answers: Operation not supported
Output of
[ 870.766042] can0: bit-timing not yet defined
SIOCSIFFLAGS: Invalid argument
Output of
CONFIG_CAN=m
CONFIG_CAN_RAW=m
CONFIG_CAN_BCM=m
CONFIG_CAN_GW=m
CONFIG_CAN_VCAN=m
CONFIG_CAN_SLCAN=m
CONFIG_CAN_DEV=m
CONFIG_CAN_CALC_BITTIMING=y
# CONFIG_CAN_LEDS is not set
CONFIG_CAN_SJA1000=m
CONFIG_CAN_SJA1000_ISA=m
# CONFIG_CAN_SJA1000_PLATFORM is not set
CONFIG_CAN_EMS_PCMCIA=m
CONFIG_CAN_EMS_PCI=m
CONFIG_CAN_PEAK_PCMCIA=m
CONFIG_CAN_PEAK_PCI=m
CONFIG_CAN_PEAK_PCIEC=y
CONFIG_CAN_KVASER_PCI=m
CONFIG_CAN_PLX_PCI=m
# CONFIG_CAN_C_CAN is not set
# CONFIG_CAN_CC770 is not set
# CONFIG_CAN_MCP251X is not set
CONFIG_CAN_EMS_USB=m
CONFIG_CAN_ESD_USB2=m
CONFIG_CAN_GS_USB=m
CONFIG_CAN_KVASER_USB=m
CONFIG_CAN_PEAK_USB=m
CONFIG_CAN_8DEV_USB=m
CONFIG_CAN_SOFTING=m
CONFIG_CAN_SOFTING_CS=m
# CONFIG_CAN_DEBUG_DEVICES is not set
Output of
[ 3.185403] pcan: Release_20171027_n (le)
[ 3.185820] pcan: driver config [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] [net]
[ 3.191749] pcan: pci device minor 0 found
[ 3.192261] pcan: isa SJA1000 device minor 8 expected (io=0x0300, irq=10)
[ 3.192875] pcan: isa CAN device creation failed (err -6)
[ 3.193492] usbcore: registered new interface driver pcan
[ 3.194433] pcan: registered CAN netdevice can0 for pci hw (249, 0)
[ 3.197536] pcan: major 249.
I've also attached a picture of my setup, which reflects the PEAK System IPEH-003048 (single channel) setup found here: https://www.peak-system.com/PCAN-miniPC ... .html?&L=1
Thanks in advance for your help!
Output of
Code: Select all
uname -a
Output of
Code: Select all
cat /proc/pcan
*------------- Release_20171027_n (8.5.1) Jun 21 2018 16:28:57 -------------------
*----------- [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] [net] --------------
*------------------------- 1 interfaces @ major 249 found ------------------------------
*n -type -ndev- --base-- irq --btr- --read-- --write-- --irqs-- -errors- status
0 pci can0 81800000 016 0x031c 00000000 00000000 00000000 00000000 0x0000
Output of
Code: Select all
ip link set can0 type can bitrate 125000
Output of
Code: Select all
ifconfig can0 up
SIOCSIFFLAGS: Invalid argument
Output of
Code: Select all
grep CONFIG_CAN /boot/config-`uname -r`
CONFIG_CAN_RAW=m
CONFIG_CAN_BCM=m
CONFIG_CAN_GW=m
CONFIG_CAN_VCAN=m
CONFIG_CAN_SLCAN=m
CONFIG_CAN_DEV=m
CONFIG_CAN_CALC_BITTIMING=y
# CONFIG_CAN_LEDS is not set
CONFIG_CAN_SJA1000=m
CONFIG_CAN_SJA1000_ISA=m
# CONFIG_CAN_SJA1000_PLATFORM is not set
CONFIG_CAN_EMS_PCMCIA=m
CONFIG_CAN_EMS_PCI=m
CONFIG_CAN_PEAK_PCMCIA=m
CONFIG_CAN_PEAK_PCI=m
CONFIG_CAN_PEAK_PCIEC=y
CONFIG_CAN_KVASER_PCI=m
CONFIG_CAN_PLX_PCI=m
# CONFIG_CAN_C_CAN is not set
# CONFIG_CAN_CC770 is not set
# CONFIG_CAN_MCP251X is not set
CONFIG_CAN_EMS_USB=m
CONFIG_CAN_ESD_USB2=m
CONFIG_CAN_GS_USB=m
CONFIG_CAN_KVASER_USB=m
CONFIG_CAN_PEAK_USB=m
CONFIG_CAN_8DEV_USB=m
CONFIG_CAN_SOFTING=m
CONFIG_CAN_SOFTING_CS=m
# CONFIG_CAN_DEBUG_DEVICES is not set
Output of
Code: Select all
dmesg | grep pcan
[ 3.185820] pcan: driver config [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] [net]
[ 3.191749] pcan: pci device minor 0 found
[ 3.192261] pcan: isa SJA1000 device minor 8 expected (io=0x0300, irq=10)
[ 3.192875] pcan: isa CAN device creation failed (err -6)
[ 3.193492] usbcore: registered new interface driver pcan
[ 3.194433] pcan: registered CAN netdevice can0 for pci hw (249, 0)
[ 3.197536] pcan: major 249.
I've also attached a picture of my setup, which reflects the PEAK System IPEH-003048 (single channel) setup found here: https://www.peak-system.com/PCAN-miniPC ... .html?&L=1
Thanks in advance for your help!
- Attachments
-
- PCAN_setup.jpg (108.45 KiB) Viewed 8670 times
- S.Grosjean
- Software Development
- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Re: CAN Mini PCIe w/Linux Debian 9: operation not supported
Hello,
First of all, except if you really have a PCAN-ISA board plugged in your host, check your /etc/modprobe.d/pcan.conf file and remove "options" like "type=isa irq=10 io=0x300" because your pcan driver tries (and fails) to probe such an ISA board when it is loaded by the system:
Then, reboot your PC and the system will automatically load the peak_pci driver and should offer to your application the native and complete socket-can interface over the PCAN-miniPCIe available for this Kernel.
Regards,
Stéphane
First of all, except if you really have a PCAN-ISA board plugged in your host, check your /etc/modprobe.d/pcan.conf file and remove "options" like "type=isa irq=10 io=0x300" because your pcan driver tries (and fails) to probe such an ISA board when it is loaded by the system:
Next, since you want to use the socket-can interface, why don't you use the mainline driver peak_pci instead of the pcan one? The PCAN-miniPCIe is natively supported by the Kernel since version 3.4:[ 3.185403] pcan: Release_20171027_n (le)
[ 3.185820] pcan: driver config [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] [net]
[ 3.191749] pcan: pci device minor 0 found
[ 3.192261] pcan: isa SJA1000 device minor 8 expected (io=0x0300, irq=10)
[ 3.192875] pcan: isa CAN device creation failed (err -6)
[ 3.193492] usbcore: registered new interface driver pcan
[ 3.194433] pcan: registered CAN netdevice can0 for pci hw (249, 0)
[ 3.197536] pcan: major 249.
Please uninstall the pcan driver:CONFIG_CAN_EMS_PCI=m
CONFIG_CAN_PEAK_PCMCIA=m
CONFIG_CAN_PEAK_PCI=m
CONFIG_CAN_PEAK_PCIEC=y
CONFIG_CAN_KVASER_PCI=m
Code: Select all
$ cd peak-linux-driver-8.5.1
$ sudo make uninstall
Regards,
Stéphane
— Stéphane
-
- Posts: 3
- Joined: Thu 28. Jun 2018, 17:34
Re: CAN Mini PCIe w/Linux Debian 9: operation not supported
Stephane,
I cannot thank you enough! The native kernel is working quite nicely now
Many thanks!
I cannot thank you enough! The native kernel is working quite nicely now
