linux网络驱动发送超时,Linux CAN总线传输超时(Linux CAN bus transmission timeout)

在Linux设备连接的CAN总线上,当设备断开连接一段时间后,CAN控制器无法发送积压的CAN消息。恢复连接时,会导致旧消息传输,丢失最新有效消息,并引起瞬时流量高峰。解决方案可能包括定义消息传输超时或手动丢弃过期消息,但不清楚如何在SocketCAN中设置TX超时或是否有其他解决策略。
摘要由CSDN通过智能技术生成

Scenario

There is a Linux-powered device connected to a CAN bus. The device periodically transmits the CAN message. The nature of the data carried by this message is like measurement rather than command, i.e. only the most recent one is actually valid, and if some messages are lost that is not an issue as long as the latest one was received successfully.

Then the device in question is being disconnected from the CAN bus for some amount of time that is much longer than the interval between subsequent message transmissions. The device logic is still trying to transmit the messages, but since the bus is disconnected the CAN controller is unable to transmit any of them so the messages are being accumulated in the TX queue.

Some time later the CAN bus connection is restored, and all the accumulated messages are being kicked on the bus one by one.

Problem

When the CAN bus connection is restored, undefined amount

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值