I am using PEAK-USB on Linux using the netdev drivers included in the kernel. I just have the USB connected with terminators at both ends of a empty CAN line. There are no other devices on the bus, just trying to get this to be able to broadcast messages first. I am able to set up the device:
Code: Select all
sudo ip link set can0 type can bitrate 1000000
sudo ifconfig can0 txqueuelen 1000
sudo ip link set up can0
Code: Select all
i=1
while (( $i<50 ))
do
cansend can0 1FF#FFFFF00000000000
sleep 1
((++i))
done
Code: Select all
candump can0
Code: Select all
candump can0
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
can0 1FF [8] FF FF F0 00 00 00 00 00
Code: Select all
ip -details -statistics link show can0
5: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/can promiscuity 0 minmtu 0 maxmtu 0
can state ERROR-PASSIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 1000000 sample-point 0.750
tq 125 prop-seg 2 phase-seg1 3 phase-seg2 2 sjw 1
pcan_usb: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 51 51 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
816 102 0 0 0 0
TX: bytes packets errors dropped carrier collsns
Code: Select all
ifconfig can0
can0: flags=193<UP,RUNNING,NOARP> mtu 16
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 102 bytes 816 (816.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 111 bytes 888 (888.0 B)
TX errors 0 dropped 20 overruns 0 carrier 20 collisions 0
Thank you,
Alex