c++ receivetest error: Resource temporarily unavailable
Posted: Thu 20. Sep 2018, 10:43
Hi all,
I am trying to test the receivetest c++ example in an ARM board, and when running it I receive a 'Resource temporarily unavailable' in LINUX_CAN_Read() function.
So, I am going to explain the environment and all the steps I have done:
I have:
- An ARM board with own Linux distribution created with Yocto Project 1.6.
- PCAN-USB X6
- PCAN-USB
First of all, I have cross-compiled and installed the Peak Linux Drivers in my ARM board (v8.6.0 http://layers.openembedded.org/layerind ... peak-linux ). The drivers are loaded properly in my board (checked with 'lsmod | grep pcan').
The second step has been to crosscompile and install receivetest example on the board. Crosscompiled and installed without errors, time to test it.
I have connected the PCAN-USB from the laptop to PCAN-USB X6 and the PCAN-USB X6 to the ARM board. I am transmitting a message every second to the PCAN-USB X6 using the PCAN-View software ( configured to 500kBit/s) (see the attached picture). Status is OK in PCAN-View
I have also upped the interface in my board (ip link set can2 up type can bitrate 500000). The green LED of the CAN1 is blinking quickly, so data is transmitted via the connected CAN bus. If I do candump can2 the message is there every second.
So I run the receive_test example like this way: can_receive_test -f="/dev/pcan-usb_x6/0/can0" -e -n=100 , and the output of the program is the next one:
receivetest Version "Release_20150611_n" (http://www.peak-system.com)
------- Copyright (C) 2004-2009 PEAK System-Technik GmbH ------
receivetest comes with ABSOLUTELY NO WARRANTY. This is free
software and you are welcome to redistribute it under certain
conditions. For details see attached COPYING file.
receivetest: device node="/dev/pcan-usb_x6/0/can0"
Extended frames are accepted, init with 500 kbit/sec.
receivetest: driver version = Release_20180720_n
receivetest: LINUX_CAN_Read(): Resource temporarily unavailable
receivetest: type = usbfd
Serial Number = 0x18392e0b
Device Number = 0
count of reads = 0
count of writes = 0
count of errors = 0
count of irqs = 2727
last CAN status = 0x0020
last error = 0
open paths = 2
driver version = Release_20180720_n
receivetest: finished (11): 0 message(s) received
I also attach the output of cat /proc/pcan:
*------------- PEAK-System CAN interfaces (http://www.peak-system.com) -------------
*------------- Release_20180720_n (8.6.0) Sep 13 2018 13:35:15 --------------
*---------------- [mod] [isa] [pci] [pec] [dng] [usb] [net] -----------------
*--------------------- 6 interfaces @ major 246 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32 usbfd can2 18392e0b 000 0x001c 000014e6 00000000 000014d3 00000000 0x0000
33 usbfd can3 18392e0b 000 0x001c 00000000 00000000 00000000 00000000 0x0000
34 usbfd can4 18392e0b 000 0x001c 00000000 00000000 00000000 00000000 0x0000
35 usbfd can5 18392e0b 000 0x001c 00000000 00000000 00000000 00000000 0x0000
36 usbfd can6 18392e0b 000 0x001c 00000000 00000000 00000000 00000000 0x0000
37 usbfd can7 18392e0b 000 0x001c 00000000 00000000 00000000 00000000 0x0000
What am I doing wrong?
Thank you in advance.
Best,
Jokin
(Edit by ADMIN - resize Picture)
I am trying to test the receivetest c++ example in an ARM board, and when running it I receive a 'Resource temporarily unavailable' in LINUX_CAN_Read() function.
So, I am going to explain the environment and all the steps I have done:
I have:
- An ARM board with own Linux distribution created with Yocto Project 1.6.
- PCAN-USB X6
- PCAN-USB
First of all, I have cross-compiled and installed the Peak Linux Drivers in my ARM board (v8.6.0 http://layers.openembedded.org/layerind ... peak-linux ). The drivers are loaded properly in my board (checked with 'lsmod | grep pcan').
The second step has been to crosscompile and install receivetest example on the board. Crosscompiled and installed without errors, time to test it.
I have connected the PCAN-USB from the laptop to PCAN-USB X6 and the PCAN-USB X6 to the ARM board. I am transmitting a message every second to the PCAN-USB X6 using the PCAN-View software ( configured to 500kBit/s) (see the attached picture). Status is OK in PCAN-View
I have also upped the interface in my board (ip link set can2 up type can bitrate 500000). The green LED of the CAN1 is blinking quickly, so data is transmitted via the connected CAN bus. If I do candump can2 the message is there every second.
So I run the receive_test example like this way: can_receive_test -f="/dev/pcan-usb_x6/0/can0" -e -n=100 , and the output of the program is the next one:
receivetest Version "Release_20150611_n" (http://www.peak-system.com)
------- Copyright (C) 2004-2009 PEAK System-Technik GmbH ------
receivetest comes with ABSOLUTELY NO WARRANTY. This is free
software and you are welcome to redistribute it under certain
conditions. For details see attached COPYING file.
receivetest: device node="/dev/pcan-usb_x6/0/can0"
Extended frames are accepted, init with 500 kbit/sec.
receivetest: driver version = Release_20180720_n
receivetest: LINUX_CAN_Read(): Resource temporarily unavailable
receivetest: type = usbfd
Serial Number = 0x18392e0b
Device Number = 0
count of reads = 0
count of writes = 0
count of errors = 0
count of irqs = 2727
last CAN status = 0x0020
last error = 0
open paths = 2
driver version = Release_20180720_n
receivetest: finished (11): 0 message(s) received
I also attach the output of cat /proc/pcan:
*------------- PEAK-System CAN interfaces (http://www.peak-system.com) -------------
*------------- Release_20180720_n (8.6.0) Sep 13 2018 13:35:15 --------------
*---------------- [mod] [isa] [pci] [pec] [dng] [usb] [net] -----------------
*--------------------- 6 interfaces @ major 246 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32 usbfd can2 18392e0b 000 0x001c 000014e6 00000000 000014d3 00000000 0x0000
33 usbfd can3 18392e0b 000 0x001c 00000000 00000000 00000000 00000000 0x0000
34 usbfd can4 18392e0b 000 0x001c 00000000 00000000 00000000 00000000 0x0000
35 usbfd can5 18392e0b 000 0x001c 00000000 00000000 00000000 00000000 0x0000
36 usbfd can6 18392e0b 000 0x001c 00000000 00000000 00000000 00000000 0x0000
37 usbfd can7 18392e0b 000 0x001c 00000000 00000000 00000000 00000000 0x0000
What am I doing wrong?
Thank you in advance.
Best,
Jokin
(Edit by ADMIN - resize Picture)