Hey,
here are the results:
I shorted pin5 and pin7 from J26 (30 pin header) and ran the above commands.
rover@rover:~$ sudo modprobe can
[sudo] password for rover:
rover@rover:~$ sudo modprobe can_raw
rover@rover:~$ sudo modprobe mttcan
rover@rover:~$ sudo ip link set can0 type can bitrate 1000000 loopback on
rover@rover:~$ sudo ip link set up can0
rover@rover:~$ candump can0 &
[1] 7727
rover@rover:~$ cansend can0 123#abcdabcd
can0 123 [4] AB CD AB CD
can0 123 [4] AB CD AB CD
rover@rover:~$ ifconfig
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 10 (UNSPEC)
RX packets 1 bytes 4 (4.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1 bytes 4 (4.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 131
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:04:4b:c5:ee:49 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 41
l4tbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.55.1 netmask 255.255.255.0 broadcast 192.168.55.255
inet6 fe80::1 prefixlen 128 scopeid 0x20<link>
inet6 fe80::28f5:efff:fed7:170b prefixlen 64 scopeid 0x20<link>
ether 52:ab:49:5f:3e:f1 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12 bytes 1804 (1.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 192 bytes 14196 (14.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 192 bytes 14196 (14.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
rndis0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 52:ab:49:5f:3e:f1 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
usb0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 52:ab:49:5f:3e:f3 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.233 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::7391:a08c:3289:7849 prefixlen 64 scopeid 0x20<link>
ether 00:04:4b:c5:ee:47 txqueuelen 1000 (Ethernet)
RX packets 31 bytes 2947 (2.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 52 bytes 6208 (6.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
dmesg
[ 64.857680] can: controller area network core (rev 20120528 abi 9)
[ 64.859238] NET: Registered protocol family 29
[ 66.785815] can: raw protocol (rev 20120528)
[ 70.224911] CAN device driver interface
[ 70.232219] Message RAM Configuration
| base addr |0x0c312000|
| sidfc_flssa |0x00000000|
| xidfc_flesa |0x00000040|
| rxf0c_f0sa |0x000000c0|
| rxf1c_f1sa |0x00000300|
| rxbc_rbsa |0x00000540|
| txefc_efsa |0x00000780|
| txbc_tbsa |0x00000800|
| tmc_tmsa |0x00000c80|
[ 70.232391] Release 3.2.0 from 19.12.2014
[ 70.232835] net can0: mttcan device registered (regs=ffffff8011c5f000, irq=387)
[ 70.234703] Message RAM Configuration
| base addr |0x0c322000|
| sidfc_flssa |0x00000000|
| xidfc_flesa |0x00000040|
| rxf0c_f0sa |0x000000c0|
| rxf1c_f1sa |0x00000300|
| rxbc_rbsa |0x00000540|
| txefc_efsa |0x00000780|
| txbc_tbsa |0x00000800|
| tmc_tmsa |0x00000c80|
[ 70.234875] Release 3.2.0 from 19.12.2014
[ 70.235325] net can1: mttcan device registered (regs=ffffff8011c87000, irq=388)
[ 77.981889] mttcan c310000.mttcan can0: Bitrate set
[ 81.153418] mttcan_controller_config: ctrlmode 1
[ 81.153454] mttcan c310000.mttcan can0: Bitrate set
With this, I was able to use canopend to see the heartbeat of the Jetson CAN-node. Each heartbeat was shown in the log twice a time.
I also tried it again (now with loopback on) with our transceiver and connected a single motor to the Jetson, representing the first scenario when everything worked. In this case, I was also not able to read the external motor heartbeat. So nothing changed.
I then un-shorted the RX and TX pin and get the exact same result.
Afterwards I deleted âloopback onâ from the commands and came back to the old results, where no candump is shown.
over@rover:~$ sudo modprobe can
[sudo] password for rover:
rover@rover:~$ sudo modprobe can_raw
rover@rover:~$ sudo modprobe mttcan
rover@rover:~$ sudo ip link set can0 type can bitrate 1000000
rover@rover:~$ sudo ip link set up can0
rover@rover:~$ candump can0 &
[1] 7824
rover@rover:~$ cansend can0 123#abcdabcd
rover@rover:~$ ip -d -s link show can0
8: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-PASSIVE (berr-counter tx 128 rx 0) restart-ms 0
bitrate 1000000 sample-point 0.750
tq 25 prop-seg 14 phase-seg1 15 phase-seg2 10 sjw 1
mttcan: tseg1 2..255 tseg2 0..127 sjw 1..127 brp 1..511 brp-inc 1
mttcan: dtseg1 1..31 dtseg2 0..15 dsjw 1..15 dbrp 1..15 dbrp-inc 1
clock 40000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1 1 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
16 2 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
dmesg
[ 49.981947] ifidx:0 DHCP - REQUEST [RX]
[ 50.674472] can: controller area network core (rev 20120528 abi 9)
[ 50.675693] NET: Registered protocol family 29
[ 52.805492] can: raw protocol (rev 20120528)
[ 55.877340] CAN device driver interface
[ 55.883429] Message RAM Configuration
| base addr |0x0c312000|
| sidfc_flssa |0x00000000|
| xidfc_flesa |0x00000040|
| rxf0c_f0sa |0x000000c0|
| rxf1c_f1sa |0x00000300|
| rxbc_rbsa |0x00000540|
| txefc_efsa |0x00000780|
| txbc_tbsa |0x00000800|
| tmc_tmsa |0x00000c80|
[ 55.883601] Release 3.2.0 from 19.12.2014
[ 55.883984] net can0: mttcan device registered (regs=ffffff8011ce0000, irq=387)
[ 55.886634] Message RAM Configuration
| base addr |0x0c322000|
| sidfc_flssa |0x00000000|
| xidfc_flesa |0x00000040|
| rxf0c_f0sa |0x000000c0|
| rxf1c_f1sa |0x00000300|
| rxbc_rbsa |0x00000540|
| txefc_efsa |0x00000780|
| txbc_tbsa |0x00000800|
| tmc_tmsa |0x00000c80|
[ 55.886807] Release 3.2.0 from 19.12.2014
[ 55.887325] net can1: mttcan device registered (regs=ffffff80121cc000, irq=388)
[ 60.583333] mttcan c310000.mttcan can0: Bitrate set
[ 69.367951] mttcan_controller_config: ctrlmode 0
[ 69.367973] mttcan c310000.mttcan can0: Bitrate set
[ 75.921563] mttcan c310000.mttcan can0: entered error warning state
[ 75.927877] mttcan c310000.mttcan can0: entered error passive state