Welcome to Firefly
中文
Firefly文档中心
最近更新: 2026-12-02 14:46:25

CAN-FD 使用

AIBOX-9075-KIT 提供 2 路 CAN-FD 接口(光耦隔离),可连接 CAN 总线设备进行通信。 接线时 CAN_H 接 CAN_H,CAN_L 接 CAN_L。 Ubuntu 系统可先执行 apt update && apt install can-utils 安装测试工具,通信测试命令如下:

# 关闭 can0 设备
ip link set can0 down
# 设置比特率为 250Kbps
ip link set can0 type can bitrate 250000
# 打开 can0 设备
ip link set can0 up
# 接收端执行 candump,阻塞等待报文
candump can0
# 发送端执行 cansend,发送报文
cansend can0 123#1122334455667788

更多 can 工具的使用, 详见 https://manpages.debian.org/testing/can-utils/index.html。

本页目录