本文主要是介绍rk3566 klipper config can error,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
config can hw refer to :RK3568 & Ubuntu20.04调试can口_can0: flags=193<up,running,noarp> mtu 16 unspec 00-CSDN博客
check hw:
firefly@firefly:~$ ifconfig -a
can0: flags=128<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 68
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 4 bytes 32 (32.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2 bytes 2 (2.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
firefly@firefly:~$ ~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can1
Traceback (most recent call last):
File "/home/firefly/klippy-env/lib/python3.10/site-packages/can/interfaces/socketcan/socketcan.py", line 679, in _send_once
sent = self.socket.send(data)
OSError: [Errno 100] Network is down
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/firefly/klipper/scripts/canbus_query.py", line 64, in <module>
main()
File "/home/firefly/klipper/scripts/canbus_query.py", line 61, in main
query_unassigned(canbus_iface)
File "/home/firefly/klipper/scripts/canbus_query.py", line 25, in query_unassigned
bus.send(msg)
File "/home/firefly/klippy-env/lib/python3.10/site-packages/can/interfaces/socketcan/socketcan.py", line 658, in send
sent = self._send_once(data, msg.channel)
File "/home/firefly/klippy-env/lib/python3.10/site-packages/can/interfaces/socketcan/socketcan.py", line 681, in _send_once
raise can.CanError("Failed to transmit: %s" % exc)
can.CanError: Failed to transmit: [Errno 100] Network is down
fix:
firefly@firefly:~$
firefly@firefly:~$ sudo ip link set up can1 type can bitrate 500000
firefly@firefly:~$
firefly@firefly:~$
firefly@firefly:~$ ~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can1
Found canbus_uuid=bb6cbcb785a2, Application: Klipper
Found canbus_uuid=0463927eaa1e, Application: Klipper
Total 2 uuids found
firefly@firefly:~$
end:
menu->settings ->session and startup -> application autostart -> add new auto exec cmd: sudo ip link set up can1 type can bitrate 500000
这篇关于rk3566 klipper config can error的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!