YY3568 Android 系统 CAN 通信异常
硬件主板型号:YY3568固件名称/系统版本:原厂安卓
问题描述及复现步骤:
按照 https://wiki.youyeetoo.cn/zh/YY3 ... evelopmentGuide#CAN 中 shell 调用 CAN 部分重启 can0
https://youyeetoo.cn/forum.php?mod=image&aid=1931&size=300x300&key=c93cd7f8a89ac222&nocache=yes&type=fixnone
参考其他文档后,仍然无法发送 can 帧
https://youyeetoo.cn/forum.php?mod=image&aid=1932&size=300x300&key=358d81ca06e077f4&nocache=yes&type=fixnone
请教应该如何修复这些问题?
你好!具体是什么异常。status怎么样 具体操作 console 截图如下(没发上截图,转成文本了:Q)
PS D:\xxx> adb shell "zcat /proc/config.gz | grep -E 'CONFIG_CAN(_RAW|_BCM)?='"
CONFIG_CAN=y
CONFIG_CAN_RAW=y
CONFIG_CAN_BCM=y
PS D:\xxx> adb shell ip link show | grep -E '+: can*:'
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
PS D:\xxx> adb shell ip link set can0 down
PS D:\xxx> adb shell ip link set can0 type can bitrate 1000000
PS D:\xxx> adb shell ip link set can0 up
PS D:\xxx> adb shell ip -details link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
link/canpromiscuity 0
can <FD> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 1003378 sample-point 0.743
tq 13 prop-seg 27 phase-seg1 27 phase-seg2 19 sjw 1
rockchip_canfd: tseg1 1..128 tseg2 1..128 sjw 1..128 brp 1..256 brp-inc 2
dbitrate 2970000 dsample-point 0.720
dtq 13 dprop-seg 8 dphase-seg1 9 dphase-seg2 7 dsjw 1
rockchip_canfd: dtseg1 1..32 dtseg2 1..16 dsjw 1..16 dbrp 1..256 dbrp-inc 2
clock 148500000numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
PS D:\xxx> adb shell ip link set can0 down
PS D:\xxx> adb shell ip link set can0 type can bitrate 1000000 dbitrate 3000000 fd on
PS D:\xxx> adb shell ip link set can0 up
PS D:\xxx> adb shell ip -details link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
link/canpromiscuity 0
can <FD> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 1003378 sample-point 0.743
tq 13 prop-seg 27 phase-seg1 27 phase-seg2 19 sjw 1
rockchip_canfd: tseg1 1..128 tseg2 1..128 sjw 1..128 brp 1..256 brp-inc 2
dbitrate 2970000 dsample-point 0.720
dtq 13 dprop-seg 8 dphase-seg1 9 dphase-seg2 7 dsjw 1
rockchip_canfd: dtseg1 1..32 dtseg2 1..16 dsjw 1..16 dbrp 1..256 dbrp-inc 2
clock 148500000numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
PS D:\xxx> adb shell cansend can0 12#DEADBAFF
/system/bin/sh: cansend: inaccessible or not found
PS D:\xxx>
Daobidao 发表于 2025-5-28 11:18
具体操作 console 截图如下(没发上截图,转成文本了)
PS D:\xxx> adb shell "zcat /proc/config.gz |...
已经可以正常通信
报错是缺少can-utils,
可以通过 SocketCAN 使用 Java 层 JNI 控制
页:
[1]