Can't read data from canbus

sudo busybox devmem 0x0c303020 w 0x458
sudo busybox devmem 0x0c303018 w 0x400
sudo /opt/nvidia/jetson-io/jetson-io.py


Screenshot from 2022-08-11 15-27-40
Screenshot from 2022-08-11 15-27-57
Screenshot from 2022-08-11 15-27-10

there is no can name listed, then I run command:
sudo modprobe can
sudo modprobe can_raw
sudo modprobe mttcan
ip link set can0 up type can bitrate 500000 dbitrate 1000000 berr-reporting on fd on
cansend can0 123#R
another terminal type:candump can0
there is no message, how to resolve the problem?

hello hulugaga1111,

are you able to test with loopback mode to check the functionality?
please also check $ dmesg --follow to see if there’re error logs.

loopback is ok,
here is dmesg
1.txt (114.3 KB)

hello hulugaga1111,

may I also know what’s the kernel messages for CAN sending data?

when I type cansend can0 123#R, the dmesg shows nothing just
[ 577.077739] can: raw protocol (rev 20120528)
[ 584.910834] CAN device driver interface
[ 584.919496] Message RAM Configuration
| base addr |0x0c312000|
| sidfc_flssa |0x00000000|
| xidfc_flesa |0x00000040|
| rxf0c_f0sa |0x000000c0|
| rxf1c_f1sa |0x000009c0|
| rxbc_rbsa |0x000009c0|
| txefc_efsa |0x000009c0|
| txbc_tbsa |0x00000a40|
| tmc_tmsa |0x00000ec0|
[ 584.919661] Release 3.2.0 from 19.12.2014
[ 584.920368] net can0: mttcan device registered (regs=ffffff800b34c000, irq=63)
[ 609.830077] mttcan c310000.mttcan can0: Bitrate set
[ 609.830221] mttcan_controller_config: ctrlmode 30
[ 609.830251] mttcan c310000.mttcan can0: Bitrate set
[ 609.830333] IPv6: ADDRCONF(NETDEV_UP): can0: link is not ready
[ 609.830378] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready

I changed the devmem to
sudo busybox devmem 0x0c303018 w 0x458
sudo busybox devmem 0x0c303010 w 0x400
another can device sends message , jetson recevices OK,but
jetson sends message , another can device receives nothing.
I find the difference between the l4t32.71 and l4t34.1 about CAN implementation detail .
l4t32.71 shows canIn 0x0c303020 0x458 and canOut 0x0c303018 0x400,
l4t34.1 shows canIn Addr: 0x0c303018 Value: 0x458and canOut Addr: 0x0c303010Value: 0x400,
I use l4t32.71 for jetson now. could anyone tell me the right address? what’s the problem?

I resoved the problem just now , thx

Glad to know issue resolved, it iwll be helpful to other developers if can share the cause and how it’s fixed. thanks

sudo busybox devmem 0x0c303018 w 0x458
sudo busybox devmem 0x0c303020 w 0x400
these two commands are OK

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.