[技术问答] ifconfig can0 up无法启动nuc972的can。

[复制链接]
 楼主| jcky001 发表于 2021-4-14 14:40 | 显示全部楼层 |阅读模式
自己做的板子,用的can1,管脚是ph14,ph15。
命令行里输入ifconfig can0 up后,打不开can。

  • root@nuc972 /# ifconfig can0 up
  • nuc970-can1 nuc970-can1 can0: bit-timing not yet defined
  • nuc970-can1 nuc970-can1 can0: failed to open can device
  • ifconfig: SIOCSIFFLAGS: Invalid argument


[color=rgb(51, 102, 153) !important]复制代码



使用 ip link set can0 type can bitrate 125000 设置速率,结果也不成功。

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


[color=rgb(51, 102, 153) !important]复制代码



但是ifconfig -a倒是可以看到有can0,不过好奇为什么是can0?我硬件上用的是can1啊?
  • root@nuc972 /# 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:59
  • 。。。


[color=rgb(51, 102, 153) !important]复制代码

[color=rgb(51, 102, 153) !important]


您需要登录后才可以回帖 登录 | 注册

本版积分规则

1636

主题

5575

帖子

6

粉丝
快速回复 在线客服 返回列表 返回顶部