失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > S32G CAN网关测试

S32G CAN网关测试

时间:2020-01-27 23:05:07

相关推荐

S32G CAN网关测试

canutils 使用

./cansend can0 -e 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88

发送默认ID为0x1的can标准帧,数据为0x11 22 33 44 55 66 77 88, 每次最大8个byte

./cansend can0 -i 0x800 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 -e

-e 表示扩展帧,CAN_ID最大29bit,标准帧CAN_ID最大11bit

-i表示CAN_ID

iproute2 使用

ip link set llcecan0 type can restart-ms 100ip link set llcecan0 up type can bitrate 1000000ip link set llcecan0 up type canip -details link show llcecan0ip link set llcecan1 type can restart-ms 100ip link set llcecan1 up type can bitrate 1000000ip link set llcecan1 up type canip -details link show llcecan1candump llcecan1 &cansend llcecan0 123#11223344556677

CAN 网关测试

root@s32g274ardb2:~# ip --detail link show can02: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000link/can promiscuity 0 minmtu 0 maxmtu 0can <FD> state ERROR-ACTIVE (berr-counter tx 6 rx 0) restart-ms 0bitrate 1000000 sample-point 0.750tq 12 prop-seg 29 phase-seg1 30 phase-seg2 20 sjw 1flexcan: tseg1 2..96 tseg2 2..32 sjw 1..32 brp 1..1024 brp-inc 1dbitrate 4000000 dsample-point 0.800dtq 12 dprop-seg 7 dphase-seg1 8 dphase-seg2 4 dsjw 1flexcan: dtseg1 2..39 dtseg2 2..8 dsjw 1..8 dbrp 1..1024 dbrp-inc 1clock 80000000 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535root@s32g274ardb2:~# cansend can0 123#1122334455667788root@s32g274ardb2:~# candump can0can0 001 [8] 00 00 00 00 00 00 00 00can0 002 [8] 01 00 00 00 00 00 00 00can0 003 [8] 02 00 00 00 00 00 00 00can0 004 [8] 03 00 00 00 00 00 00 00can0 005 [8] 04 00 00 00 00 00 00 00

如果觉得《S32G CAN网关测试》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。