mona@ubuntu:~$ sudo ip link set can1 down
mona@ubuntu:~$ sudo ip link set can1 type can bitrate 500000
mona@ubuntu:~$ sudo ip link set can1 up
mona@ubuntu:~$ candump can1
^^ entering the last command in Jetson AGX Orin gets stuck with a blinking cursor. If I use the dmesg
after it being stuck, I see this:
mona@ubuntu:~$ sudo dmesg | grep -i can
[sudo] password for mona:
[ 11.047496] drm drm: [drm] Cannot find any crtc or sizes
[ 11.613840] CAN device driver interface
[ 11.643441] TT CAN feature is not supported
[ 11.665356] net can0: mttcan device registered (regs=00000000efbd2394, irq=212)
[ 11.678048] TT CAN feature is not supported
[ 11.712623] net can1: mttcan device registered (regs=00000000c3569254, irq=213)
[ 13.522492] rtk_btusb: btusb_probe can_wakeup 1, may wakeup 0
[ 516.357263] mttcan c310000.mttcan can0: Bitrate set
[ 522.932154] mttcan c320000.mttcan can1: bit-timing not yet defined
[ 522.932167] mttcan c320000.mttcan can1: failed to open can device
[ 551.219318] mttcan c320000.mttcan can1: Bitrate set
[ 559.148868] mttcan_controller_config: ctrlmode 0
[ 559.148892] mttcan c320000.mttcan can1: Bitrate set
[ 559.148984] IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready
[ 563.775024] can: controller area network core
[ 563.775124] NET: Registered PF_CAN protocol family
[ 563.781966] can: raw protocol
[ 586.275336] mttcan c320000.mttcan can1: Bitrate set
[ 590.091980] mttcan_controller_config: ctrlmode 0
[ 590.092006] mttcan c320000.mttcan can1: Bitrate set
Here is what I see in Jetson:
mona@ubuntu:~$ ifconfig
can1: 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 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 213
Using the same pcan-usb in my ubuntu 22.04 laptop, I see this for can0:
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 140547 bytes 1124376 (1.1 MB)
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
and after
529 sudo ip link set can0 down
530 sudo ip link set can0 type can bitrate 500000
531 sudo ip link set can0 up
532 candump can0
I see live data that looks like
@KevinFFF Could you suggest how to fix this problem and get the data on Jetson AGX Orin?
Some more info:
mona@ubuntu:~$ sudo modprobe can
mona@ubuntu:~$ sudo modprobe can_raw
mona@ubuntu:~$ sudo modprobe mttcan
mona@ubuntu:~$ lsmod | grep can
can_raw 28672 1
can 28672 1 can_raw
mttcan 65536 0
nvpps 28672 2 mttcan,nvethernet
can_dev 36864 1 mttcan
mona@ubuntu:~$ sudo journalctl -xe | grep -i can1
Sep 24 10:25:32 ubuntu sudo[4841]: mona : TTY=pts/0 ; PWD=/home/mona ; USER=root ; COMMAND=/usr/sbin/ip link set can1 down
Sep 24 10:25:51 ubuntu sudo[4999]: mona : TTY=pts/0 ; PWD=/home/mona ; USER=root ; COMMAND=/usr/sbin/ip link set can1 up
Sep 24 10:25:51 ubuntu kernel: mttcan c320000.mttcan can1: bit-timing not yet defined
Sep 24 10:25:51 ubuntu kernel: mttcan c320000.mttcan can1: failed to open can device
Sep 24 10:26:19 ubuntu sudo[5283]: mona : TTY=pts/0 ; PWD=/home/mona ; USER=root ; COMMAND=/usr/sbin/ip link set can1 type can bitrate 500000
Sep 24 10:26:19 ubuntu kernel: mttcan c320000.mttcan can1: Bitrate set
Sep 24 10:26:27 ubuntu sudo[5286]: mona : TTY=pts/0 ; PWD=/home/mona ; USER=root ; COMMAND=/usr/sbin/ip link set can1 up
Sep 24 10:26:27 ubuntu kernel: mttcan c320000.mttcan can1: Bitrate set
Sep 24 10:26:27 ubuntu kernel: IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready
Sep 24 10:26:50 ubuntu sudo[5302]: mona : TTY=pts/0 ; PWD=/home/mona ; USER=root ; COMMAND=/usr/sbin/ip link set can1 down
Sep 24 10:26:54 ubuntu sudo[5305]: mona : TTY=pts/0 ; PWD=/home/mona ; USER=root ; COMMAND=/usr/sbin/ip link set can1 type can bitrate 500000
Sep 24 10:26:54 ubuntu kernel: mttcan c320000.mttcan can1: Bitrate set
Sep 24 10:26:58 ubuntu sudo[5310]: mona : TTY=pts/0 ; PWD=/home/mona ; USER=root ; COMMAND=/usr/sbin/ip link set can1 up
Sep 24 10:26:58 ubuntu kernel: mttcan c320000.mttcan can1: Bitrate set
mona@ubuntu:~$ sudo dmesg | tail
[ 551.219318] mttcan c320000.mttcan can1: Bitrate set
[ 559.148868] mttcan_controller_config: ctrlmode 0
[ 559.148892] mttcan c320000.mttcan can1: Bitrate set
[ 559.148984] IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready
[ 563.775024] can: controller area network core
[ 563.775124] NET: Registered PF_CAN protocol family
[ 563.781966] can: raw protocol
[ 586.275336] mttcan c320000.mttcan can1: Bitrate set
[ 590.091980] mttcan_controller_config: ctrlmode 0
[ 590.092006] mttcan c320000.mttcan can1: Bitrate set
mona@ubuntu:~$ sudo dmesg | grep -i can
[ 11.047496] drm drm: [drm] Cannot find any crtc or sizes
[ 11.613840] CAN device driver interface
[ 11.643441] TT CAN feature is not supported
[ 11.665356] net can0: mttcan device registered (regs=00000000efbd2394, irq=212)
[ 11.678048] TT CAN feature is not supported
[ 11.712623] net can1: mttcan device registered (regs=00000000c3569254, irq=213)
[ 13.522492] rtk_btusb: btusb_probe can_wakeup 1, may wakeup 0
[ 516.357263] mttcan c310000.mttcan can0: Bitrate set
[ 522.932154] mttcan c320000.mttcan can1: bit-timing not yet defined
[ 522.932167] mttcan c320000.mttcan can1: failed to open can device
[ 551.219318] mttcan c320000.mttcan can1: Bitrate set
[ 559.148868] mttcan_controller_config: ctrlmode 0
[ 559.148892] mttcan c320000.mttcan can1: Bitrate set
[ 559.148984] IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready
[ 563.775024] can: controller area network core
[ 563.775124] NET: Registered PF_CAN protocol family
[ 563.781966] can: raw protocol
[ 586.275336] mttcan c320000.mttcan can1: Bitrate set
[ 590.091980] mttcan_controller_config: ctrlmode 0
[ 590.092006] mttcan c320000.mttcan can1: Bitrate set
mona@ubuntu:~$ lsusb
Bus 002 Device 003: ID 05e3:0626 Genesys Logic, Inc. USB3.1 Hub
Bus 002 Device 002: ID 0bda:0420 Realtek Semiconductor Corp. 4-Port USB 3.0 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 008: ID 0c72:000c PEAK System PCAN-USB
Bus 001 Device 007: ID 0bfd:0120 Kvaser AB Kvaser Leaf Light v2
Bus 001 Device 006: ID 1248:1061 Vector Informatik GmbH Vector VN1630A
Bus 001 Device 005: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 003: ID 0bda:5420 Realtek Semiconductor Corp. 4-Port USB 2.0 Hub
Bus 001 Device 002: ID 13d3:3549 IMC Networks Bluetooth Radio
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
mona@ubuntu:~$ ip -details -statistics link show can1
3: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
link/can promiscuity 0 minmtu 0 maxmtu 0
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 500000 sample-point 0.870
tq 20 prop-seg 43 phase-seg1 43 phase-seg2 13 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 50000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 parentbus platform parentdev c320000.mttcan
RX: bytes packets errors dropped missed mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
mona@ubuntu:~$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
link/can
3: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
link/can