博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
I.MX6 Android CAN 命令行测试
阅读量:6800 次
发布时间:2019-06-26

本文共 4145 字,大约阅读时间需要 13 分钟。

/********************************************************************* *                 I.MX6 Android CAN 命令行测试 * 说明: *     这里使用can-utils测试一下CAN驱动。 * *                                    2016-8-9 深圳 南山平山村 曾剑锋 ********************************************************************/一、shell 命令流程:    1. netcfg can0 down    2. ip link set can0 type can bitrate 1000000 triple-sampling on(或者:ip link set can0 up type can bitrate 1000000)    3. ip -details -statistic link show can0    4. netcfg can0 up    5. ./cansend can0 111#1122334455667788    6. ip -details -statistic link show can0    7. ./canfdtest -vv can0    8. ip -details -statistic link show can0二、运行流程:    root@android:/ # netcfg can0 down    root@android:/ # ip link set can0 type can bitrate 1000000 triple-sampling on    root@android:/ # ip -details -statistic link show can0    2: can0: 
mtu 16 qdisc noop state DOWN qlen 10 link/can can
state STOPPED (berr-counter tx 0 rx 0) restart-ms 0 bitrate 1000000 sample-point 0.733 tq 66 prop-seg 5 phase-seg1 5 phase-seg2 4 sjw 1 flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1 clock 30000000 re-started bus-errors arbit-lost error-warn error-pass bus-off 0 0 0 0 0 0 RX: bytes packets errors dropped overrun mcast 0 0 0 0 0 0 TX: bytes packets errors dropped carrier collsns 0 0 0 0 0 0 root@android:/ # netcfg can0 up flexcan imx6q-flexcan.0: writing ctrl=0x01232084 127|root@android:/ # cd /data/local root@android:/data/local # ./cansend can0 111#1122334455667788 root@android:/data/local # ip -details -statistic link show can0 2: can0:
mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10 link/can can
state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0 bitrate 1000000 sample-point 0.733 tq 66 prop-seg 5 phase-seg1 5 phase-seg2 4 sjw 1 flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1 clock 30000000 re-started bus-errors arbit-lost error-warn error-pass bus-off 0 0 0 0 0 0 RX: bytes packets errors dropped overrun mcast 0 0 0 0 0 0 TX: bytes packets errors dropped carrier collsns 8 1 0 0 0 0 root@android:/data/local # ip -details -statistic link show can0 2: can0:
mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10 link/can can
state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0 bitrate 1000000 sample-point 0.733 tq 66 prop-seg 5 phase-seg1 5 phase-seg2 4 sjw 1 flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1 clock 30000000 re-started bus-errors arbit-lost error-warn error-pass bus-off 0 0 0 0 0 0 RX: bytes packets errors dropped overrun mcast 8 1 0 0 0 0 TX: bytes packets errors dropped carrier collsns 8 1 0 0 0 0 root@android:/data/local # ./canfdtest -vv can0 interface = can0, family = 29, type = 3, proto = 1 0037: [8] 37 37 37 37 37 70 c9 00 0037: [8] 37 37 37 37 37 70 c9 00 0037: [8] 37 37 37 37 37 70 c9 00 0037: [8] 37 37 37 37 37 70 c9 00 ^Crecv failed: Bad file number Exiting... 255|root@android:/data/local # ip -details -statistic link show can0 2: can0:
mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10 link/can can
state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0 bitrate 1000000 sample-point 0.733 tq 66 prop-seg 5 phase-seg1 5 phase-seg2 4 sjw 1 flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1 clock 30000000 re-started bus-errors arbit-lost error-warn error-pass bus-off 0 0 0 0 0 0 RX: bytes packets errors dropped overrun mcast 40 5 0 0 0 0 TX: bytes packets errors dropped carrier collsns 40 5 0 0 0 0 root@android:/data/local #

 

转载于:https://www.cnblogs.com/zengjfgit/p/5754277.html

你可能感兴趣的文章
Elementary Methods in Number Theory Exercise 1.2.17
查看>>
认识拨号计划 - Dialplan
查看>>
DataTable 的数据导出到 Excel
查看>>
委托由浅入深学习
查看>>
BZOJ 1012 [JSOI2008]最大数maxnumber
查看>>
权限管理[Linux]
查看>>
unity3d优化总结篇(二)
查看>>
自定义view,实现文本自动换行
查看>>
查看网页自动保存的密码
查看>>
【题解】【区间】【二分查找】【Leetcode】Insert Interval & Merge Intervals
查看>>
Hello,C++(7)函数模板和类模板
查看>>
网站使用https协议
查看>>
git 使用
查看>>
对软件工程的一点认识
查看>>
似然函数的概念【转载】
查看>>
认识IPv4分组
查看>>
第七篇、微信小程序-video组件
查看>>
(转)IC验证概述
查看>>
[bzoj1924] 所驼门王的宝藏
查看>>
form表单属性及表单分组
查看>>