can-utils

can utils

打印接收或者发送
candump -x can0



带时间戳dump
candump -t A can0



cansend can0 213##3112233445566778899aabbccddeeffaa
cansend can2 213##3112233445566778899aabbccddeeffaa



后台采集、过滤id 123,124

#!/bin/bash

sleep 20

BOOT_CNT=$(cat /log/boot_count.txt)
CURRENT_TIME=$(date "+%Y%m%d_%H%M%S")
LOG_FILE="/log/a01-timesync_can-${BOOT_CNT}-${CURRENT_TIME}.log"
echo "${LOG_FILE}"

nohup candump -x -t a can_mcu,123:fff,124:fff > ${LOG_FILE} 2>&1 &


posted @ 2025-08-05 10:37  王阳开  阅读(25)  评论(0)    收藏  举报