宝哥 发表于 2023-4-28 14:15:10

rk3568平台,can使用报错

ip link set can0 type can bitrate 500000,出错了,请问大家这是什么原因?

root@RK356X:/# ifconfig -a
can0      Link encap:UNSPECHWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          NOARPMTU:16Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10
          RX bytes:0 (0.0 B)TX bytes:0 (0.0 B)
          Interrupt:60


root@RK356X:/# ip link set can0 down

root@RK356X:/# ip link set can0 type can bitrate 500000
ip: either "dev" is duplicate, or "type" is garbage

root@RK356X:/# ip -details link show can0
BusyBox v1.34.1 (2023-03-08 11:11:56 CST) multi-call binary.

Usage: ip address|route|link|tunnel|neigh|rule

OPTIONS := -f inet|inet6|link | -o

ip addr add|del IFADDR dev IFACE | show|flush
ip route list|flush|add|del|change|append|replace|test ROUTE
ip link set IFACE
      
      
ip tunnel add|change|del|show
      
ip neigh show|flush
ip rule | add|del SELECTOR ACTION

root@RK356X:/# ip link set can0 up      
ip: SIOCSIFFLAGS: Invalid argument


skyzhao 发表于 2023-5-6 10:10:52

是自己编译的buildroot吗, buildroot默认生成的ip命令不支持配置can。构建root时,在Target ->Networking->勾选iproute2选项,再次编译生成的文件系统里的ip命令就可以执行了。
页: [1]
查看完整版本: rk3568平台,can使用报错