您尚未登录。

楼主 #1 2020-04-30 11:20:59

smartcar
会员
注册时间: 2018-02-19
已发帖子: 735
积分: 735

Ubuntu测试can协议栈

1. 添加虚拟can网络, 参考can.html:

ip link add type vcan

指定名称的can网络:

ip link add dev vcan42 type vcan

2. 使能 can 网络:
https://www.technexion.com/support/knowledgebase/using-the-can-bus-from-linux-shell/

http://codingadventures.org/2018/10/01/setting-and-testing-a-can-bus-connection-in-linux/

ip link set vcan0 type can bitrate 125000
ifconfig vcan0 up

3. 测试
先抓包:

candump can0 &

再发送:

cansend can1 123#CAFEBABE

离线

#2 2022-12-01 17:33:56

taotieren
会员
注册时间: 2020-05-19
已发帖子: 108
积分: 148

Re: Ubuntu测试can协议栈

有详细内容介绍吗?

离线

#3 2022-12-03 15:19:17

小熊猫
会员
注册时间: 2020-05-21
已发帖子: 71
积分: 65.5

Re: Ubuntu测试can协议栈

你这个 物理链路是 怎么构建的?

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn