Hello,
I am trying to connect the IMU_CAN interface and run ./sample_can_interpreter using a real CAN device. I am running into problem when trying to interface CAN bus on linux with slcand. Candump doesn’t print any data.
I did two experiments with two different transceiver and the issue persisted, while on RaspberryPi it seems to be working alright with PyCAN board and same IMU device.
Experiment 1:
I used CANalyst-ii transciver 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: CANalyst II - dankwiki, the wiki of nick black) 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. Maybe this is a bit rate issue. CAN device baudrate is 250000.
I used following commands to get this far,
sudo modprobe can
sudo modprobe can-raw
sudo modprobe slcan
sudo modprobe usbserial vendor=0x04d8 product=0x0053
sudo slcand -o -s5 -t hw -S 2500000 /dev/ttyUSB0
sudo ip link set up slcan0
./candump slcan0
Experiment 2:
I am using CANUSB tool (LAWICEL CANUSB | canusb.com) and get that to work with slcan0 (using these steps: All miscellanous tech articles: Step-by-step guide: Installing the Lawicel CANUSB adapter on Linux) and same problem, don’t see any data on candump slcan0. output of ip addr
is as follows:
4: slcan0: <NOARP,UP,LOWER_UP> mtu 16 disc fq_codel state UNKNOWN group default qlen10
link/can
Maybe this is not the right thread to post this but clearly you guys know more than I do, so I thought posting here might help.
Thanks in advence.
Regrds,
Rishit