Firefly开源社区

标题: rk3568平台,can使用报错 [打印本页]

作者: 宝哥    时间: 2023-4-28 14:15
标题: rk3568平台,can使用报错
ip link set can0 type can bitrate 500000,出错了,请问大家这是什么原因?

root@RK356X:/# ifconfig -a
can0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          NOARP  MTU:16  Metric: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 [OPTIONS] address|route|link|tunnel|neigh|rule [ARGS]

OPTIONS := -f[amily] inet|inet6|link | -o[neline]

ip addr add|del IFADDR dev IFACE | show|flush [dev IFACE] [to PREFIX]
ip route list|flush|add|del|change|append|replace|test ROUTE
ip link set IFACE [up|down] [arp on|off] [multicast on|off]
        [promisc on|off] [mtu NUM] [name NAME] [qlen NUM] [address MAC]
        [master IFACE | nomaster]
ip tunnel add|change|del|show [NAME]
        [mode ipip|gre|sit] [remote ADDR] [local ADDR] [ttl TTL]
ip neigh show|flush [to PREFIX] [dev DEV] [nud STATE]
ip rule [list] | add|del SELECTOR ACTION

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



作者: skyzhao    时间: 2023-5-6 10:10
是自己编译的buildroot吗, buildroot默认生成的ip命令不支持配置can。构建root时,在Target ->Networking->勾选iproute2选项,再次编译生成的文件系统里的ip命令就可以执行了。




欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1