transmitest und receivetest not working
Posted: Sat 27. Jan 2018, 14:40
I am using the PCAN-PCI Single Channel (IPEH-002064) with the library v8.5.1
./lspcan -T -t -i shows:
dmesg | grep pcan shows
ls -l /dev/pcan* shows
cat /proc/pcan shows
and my kernel is 4.13.0-32-generic and it is also up-to-date
I connected a device (with 120Ohm) to the can interface thats sends messages with a bitrate of 1Mbit/s
Unfortunately the receive and send tests do not seem to work:
./receivetest -f=/dev/pcan0 -b=0x0014 -e shows:
and once I terminate is adds
Same with
./transmitest hello.txt -f=/dev/pcanpci0 -b=0x0014 : first
and after terminating:
Also it always shows 501 counts of writes
I hope you can help me.
./lspcan -T -t -i shows:
Code: Select all
dev name port irq clock btrs bus
[PCAN-PCI Express 0]
|_ pcanpci0 CAN1 16 8MHz 1M CLOSED
Code: Select all
[ 1718.079499] pcan: Release_20171027_n (le)
[ 1718.079500] pcan: driver config [mod] [isa] [pci] [pec] [dng] [par] [pcc]
[ 1718.084587] pcan: pci device minor 0 found
[ 1718.084685] pcan: major 237.
[ 3816.932785] pcan: __pcan_ioctl(cmd=21505): unsupported cmd (dir=0 type=84 nr=1 size=0)
[ 4704.014557] pcan: bitrate error 0.0%
[ 4704.014584] pcan: bitrate error 0.0%
[ 4704.014599] pcan: bitrate error 0.0%
[ 4704.014623] pcan: bitrate error 0.0%
[ 4704.014640] pcan: bitrate error 0.0%
[ 4704.014665] pcan: bitrate error 0.0%
[ 4704.014679] pcan: bitrate error 0.0%
[ 4704.014701] pcan: bitrate error 0.0%
[ 4704.014714] pcan: bitrate error 0.0%
[ 4704.014739] pcan: bitrate error 0.0%
[ 4704.014753] pcan: bitrate error 0.0%
[ 4704.014774] pcan: bitrate error 0.0%
[ 4704.014787] pcan: bitrate error 0.0%
[ 4704.014810] pcan: bitrate error 0.0%
[ 4704.014824] pcan: bitrate error 0.0%
[ 4704.014848] pcan: bitrate error 0.0%
[ 4704.014860] pcan: bitrate error 0.0%
[ 4704.014883] pcan: bitrate error 0.1%
[ 4704.014894] pcan: bitrate error 0.1%
[ 4704.014919] pcan: bitrate error 0.2%
Code: Select all
crw-rw-rw- 1 root root 237, 0 Jan 27 11:45 /dev/pcan0
crw-rw-rw- 1 root root 237, 16 Jan 27 11:45 /dev/pcan16
crw-rw-rw- 1 root root 237, 24 Jan 27 11:45 /dev/pcan24
crw-rw-rw- 1 root root 237, 32 Jan 27 11:45 /dev/pcan32
crw-rw-rw- 1 root root 237, 40 Jan 27 11:45 /dev/pcan40
crw-rw-rw- 1 root root 237, 8 Jan 27 11:45 /dev/pcan8
crw-rw-rw- 1 root root 237, 0 Jan 27 11:40 /dev/pcanpci0
/dev/pcan-pci:
total 0
drwxr-xr-x 2 root root 60 Jan 27 11:40 0
Code: Select all
*------------- PEAK-System CAN interfaces (http://www.peak-system.com) -------------
*------------- Release_20171027_n (8.5.1) Jan 27 2018 11:37:35 --------------
*---------------- [mod] [isa] [pci] [pec] [dng] [par] [pcc] -----------------
*--------------------- 1 interfaces @ major 237 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
0 pci -NA- df200000 016 0x0014 00000001 00000000 00000000 00000000 0x0000
I connected a device (with 120Ohm) to the can interface thats sends messages with a bitrate of 1Mbit/s
Unfortunately the receive and send tests do not seem to work:
./receivetest -f=/dev/pcan0 -b=0x0014 -e shows:
Code: Select all
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/pcanpci0"
Extended frames are accepted, init with BTR0BTR1=0x0014
receivetest: driver version = Release_20171027_n
936727944.635 receivetest: m s 0x00000001 4 00 00 00 00
receivetest: pending CAN status 0x0020 read.
Code: Select all
^Creceivetest: type = pci
io = 0xdf200000
irq = 16
count of reads = 1
count of writes = 0
count of errors = 0
count of irqs = 0
last CAN status = 0x0020
last error = 0
open paths = 1
driver version = Release_20171027_n
receivetest: finished (0): 1 message(s) received
./transmitest hello.txt -f=/dev/pcanpci0 -b=0x0014 : first
Code: Select all
transmitest Version "Release_20150610_n" (http://www.peak-system.com)
------- Copyright (C) 2004-2009 PEAK System-Technik GmbH ------
transmitest 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.
transmitest: device node="/dev/pcanpci0"
Only standard frames are sent, init with BTR0BTR1=0x0014
Data will be read from "hello.txt".
transmitest: driver version = Release_20171027_n
Code: Select all
^Ctransmitest: type = pci
io = 0xdf200000
irq = 16
count of reads = 2
count of writes = 501
count of errors = 1
count of irqs = 0
last CAN status = 0x0081
last error = 0
open paths = 1
driver version = Release_20171027_n
transmitest: finished (0).
I hope you can help me.