ip: either “dev“ is duplicate, or “type“ is garbageip: either “dev“ is duplicate, or “txqueuelen“ i

登录Buildroot后,打印出这个

ip: either "dev" is duplicate, or "type" is garbage
ip: either "dev" is duplicate, or "txqueuelen" is garbage

[   12.695775] c_can_platform ffc00000.can can0: bit-timing not yet defined
[   12.705218] c_can_platform ffc00000.can can0: failed to open can device
ifconfig: SIOCSIFFLAGS: Invalid argument
[root@buildroot]:~$:terminate called after throwing an instance of 'std::string'

我在启动脚本里有配置can波特率,但是无法生效,手动设置波特率,执行

ip link set can0 type can bitrate 1000000

回复ip: either "dev" is duplicate, or "type" is garbage

但是ifconfig -a倒是可以看到有can0
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:33 

解决方法:执行 ip link set can0 type can bitrate 125000 命令不成功,是因为buildroot默认生成的ip命令不支持配置can。构建root时,在Target ->Networking->勾选iproute2选项,再次编译生成的文件系统里的ip命令就可以执行了。

  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值