最近手里的项目有用到andoroid平台上加usb ethernet rtl8151模块,自己认真鼓捣了一周,终于调试通了,现将过程分享一下,供各位同仁参考。
1. 保证rtl8152与主控联接正常,且模块与主机通讯成功。方法有如下两个:
1.1 :接入usb ethernet时看一下kernel里的log:
<6>[ 7353.740822] usb 1-1.3: new high-speed USB device number 5 using sunxi-ehci
<6>[ 7354.010359] usb 1-1.3: reset high-speed USB device number 5 using sunxi-ehci
<6>[ 7354.214941] r8152 1-1.3:1.0: eth1: v2.10.00 (2018/03/16)
<6>[ 7354.221447] r8152 1-1.3:1.0: eth1: This product is covered by one or more of the following patents:
<6>[ 7354.221457] US6,570,884, US6,115,776, and US6,327,625.
<6>[ 7354.221463]
这说明至少usb ethernet与主控的通讯正常了;
1.2:用命令查看当前usb bus上的所有设备:
root@astar-evb30:/ # lsusb
lsusb
Bus 001 Device 002: ID 1a40:0101
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1