I bumped into this question while trying to figure out how to connect Custom IMU to Driveworks. I am trying to connect the IMU_CAN interface and run ./sample_can_interpreter using a real CAN device.
My problem is I am using slcand and not able to configure it right. The transceiver I am using is CANalyst-ii which is USB-CAN. Usb connecting to the host. This device doesn’t have documentation to work with linux but from other online resources (mainly this link: https://nick-black.com/dankwiki/index.php/CANalyst_II) I got to the point where I can see slcan0 when in ifconfig.
slcan0: 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 10 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 1
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
When i do candump slcan0, i see the cursor blinking and not printing anything. I am prety sure CAN IMU is sending out data. Because I am able to do the candump can0 in my raspberrypi (using pyCAN board there). Maybe this is a bit rate issue. CAN device baudrate is 250000.
I used following commands to get this far,
sudo modprobe can
**pi@raspberrypi** : **~ $** sudo modprobe can-raw
**pi@raspberrypi** : **~ $** sudo modprobe slcan
**pi@raspberrypi** : **~ $** sudo modprobe usbserial vendor=0x04d8 product=0x0053
**pi@raspberrypi** : **~/Documents/CAN-TEST_PI2/can-test_pi2 $** sudo slcand -o -s5 -t hw -S 2500000 /dev/ttyUSB0
**pi@raspberrypi** : **~/Documents/CAN-TEST_PI2/can-test_pi2 $** sudo ip link set up slcan0
**pi@raspberrypi** : **~/Documents/CAN-TEST_PI2/can-test_pi2 $** ./candump slcan0
Trying to get candump work in my Rpi before I make it work with DriveWorks.
Maybe this is not the right thread to post this but clearly you guys know more than I thought posting here might help. Let me know if you want me to create a new post.
Thanks in advence.