【问题标题】:How to get CANbus working on beaglebone green如何让 CANbus 在 beaglebone green 上工作
【发布时间】:2019-12-10 17:32:52
【问题描述】:

我无法使用 can-utils 让 CAN 在我的 beaglebone green 上工作。我有一个连接到 CAN 引脚的位镜,但我没有看到任何输出..

Beaglebone 版本:

$ uname -a
Linux beaglebone 4.4.155-ti-r152

设置can1接口:

$ config-pin p9.24 can
$ config-pin -q p9.24
P9_24 Mode: can
$ config-pin p9.26 can
$ config-pin -q p9.26
P9_26 Mode: can

$ sudo ip link set can1 up type can bitrate 125000
$ sudo ifconfig can1
can1      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          UP RUNNING 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:196

使用can-utils 传输单个CAN 帧:

$ cansend can1 123#1122334455667788
$ cansend can1 5A1#00.01.02.03.04

我至少应该看到引脚 p9.24 p9.26 的输出,但我没有,而且我不知道为什么..

感谢任何帮助!

【问题讨论】:

  • 您是否使用 120 欧姆电阻终止线路?
  • 谢谢!这解决了问题。我以前试过这个,但我认为我连接不正确。

标签: linux can-bus beagleboard canutils


【解决方案1】:

感谢 Benoît 的建议:

我不得不用一个 120 欧姆的电阻终止引脚 p9.24 和 p9.26,以便让任何消息显示在我的 bitscope 上。

如果canbus 没有终止,can 接口将失败并且任何消息传输都将不起作用。 can 接口需要重新设置和重新设置才能尝试发送另一条消息。

【讨论】:

    猜你喜欢
    • 2023-03-03
    • 1970-01-01
    • 2018-11-09
    • 2018-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-16
    相关资源
    最近更新 更多