【问题标题】:How to send and receive CAN message using ISOTP protocol in Python-can which uses CANard library?如何在使用 CANard 库的 Python-can 中使用 ISOTP 协议发送和接收 CAN 消息?
【发布时间】:2019-03-09 05:26:24
【问题描述】:

我想发送一个长度超过 8 个字节的 CAN 消息。我在 SocketCAN isotpsendisotprecv 中使用了 CAN-ISOTP 协议来发送和接收 CAN 消息,它工作正常。同样,如何在使用 CANard 库的 python-can 中发送和接收 CAN 消息?此外,在接收方接收到的消息是否会被分段,或者它将如何在发送方接收,因为在 SocketCAN 中,当我使用isotprecv 时,消息是这样接收的,它是如何在发送方发送的并且没有碎片化。

【问题讨论】:

    标签: python can-bus python-can


    【解决方案1】:

    查看can-isotpisotp.TransportLayer 对象在 Python 中实现 ISO-TP,并且不依赖于硬件。

    您必须提供 2 个回调来与 Canard 交互(发送和接收)。其余的由 TranportLayer 对象处理。

    【讨论】:

      猜你喜欢
      • 2015-05-06
      • 2021-12-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-31
      • 1970-01-01
      • 1970-01-01
      • 2014-07-15
      相关资源
      最近更新 更多