I had already built the IOT CANBUS extension card driver from the article Running the MCP2515 CAN driver for mangOH Red. And I can also setup the can0 device in the linux. But when I use the cansend from the can-utils, I cannot get the message from candump(No output message).
Here is my platform and the test steps:
legato version: 19.07
platform: mangOH Red + WP7702
firmware : R12
network device:
root@swi-mdm9x28-wp:~# ip -details -statistics link show can0
10: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 3069410876
can <LOOPBACK,TRIPLE-SAMPLING> state ERROR-ACTIVE restart-ms 0
bitrate 125000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
mcp251x: tseg1 3..16 tseg2 2..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 0 0 0 numtxqueues 3069410876
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 2 2 0 0
root@swi-mdm9x28-wp:~# lsmod
Tainted: G
can_iot 1308 0 - Live 0xbf166000 (O)
mt7697serial 8102 0 - Live 0xbf051000 (O)
mt7697q 19679 0 - Live 0xbf047000 (O)
mcp251x 9652 0 - Live 0xbf040000 (O)
mangoh_red 9590 0 - Live 0xbf039000 (O)
ltc294x 5575 0 - Live 0xbf034000 (O)
led 2100 0 - Live 0xbf030000 (O)
cp2130 20342 1 mt7697q, Live 0xbf027000 (O)
bq27xxx_battery 25295 0 - Live 0xbf01b000 (O)
bq24296 10836 0 - Live 0xbf014000 (O)
bmp280_i2c 2607 0 - Live 0xbf010000 (O)
bmp280 9509 1 bmp280_i2c, Live 0xbf009000 (O)
bmi160_i2c 1851 0 - Live 0xbf005000 (O)
bmi160 5432 1 bmi160_i2c, Live 0xbf000000 (O)
Test steps:
setup can device with loopback mode
ip link set can0 down
ip link set can0 type can loopback on
ip link set can0 type can bitrate 125000 triple-sampling on
ifconfig can0 up
In sender terminal:
$ cansend can0 001#1122334455667788
In receiver terminal:
$ candump can0 --> nothing to show