This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
products:sbc:vim4:configurations:usb-gadget [2022/12/12 20:16] nick created |
products:sbc:vim4:configurations:usb-gadget [2025/08/17 23:24] (current) nick |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | {{indexmenu_n> | ||
| + | |||
| ====== VIM4 USB Gadget ====== | ====== VIM4 USB Gadget ====== | ||
| Line 4: | Line 6: | ||
| {{page>/ | {{page>/ | ||
| + | |||
| + | ===== Usage of ADB ===== | ||
| + | |||
| + | Try to access the devices via adb. | ||
| + | |||
| + | ```shell | ||
| + | $ adb kill-server | ||
| + | $ adb devices | ||
| + | * daemon not running; starting now at tcp:5037 | ||
| + | * daemon started successfully | ||
| + | List of devices attached | ||
| + | 12036c819990 | ||
| + | $ adb shell | ||
| + | root@Khadas:/# | ||
| + | root@Khadas:/# | ||
| + | root@Khadas:/# | ||
| + | root@Khadas:/# | ||
| + | ``` | ||
| + | |||
| + | ===== RNDIS Setup IP Address ===== | ||
| + | |||
| + | Enable RNDIS: | ||
| + | |||
| + | Edit ''/ | ||
| + | |||
| + | ```diff | ||
| + | diff --git a/ | ||
| + | index 299569f0..520a9b9a 100755 | ||
| + | --- a/ | ||
| + | +++ b/ | ||
| + | @@ -57,7 +57,7 @@ echo " | ||
| + | echo " | ||
| + | |||
| + | # Bind function to configuration | ||
| + | -#ln -s $F_RNDIS $GADGET/ | ||
| + | +ln -s $F_RNDIS $GADGET/ | ||
| + | ln -s $GADGET/ | ||
| + | |||
| + | # Enable the Gadget | ||
| + | ``` | ||
| + | |||
| + | Setup IP address manyally, e.g. setup IP address as '' | ||
| + | |||
| + | ```shell | ||
| + | sudo ifconfig usb0 192.168.35.100 up | ||
| + | ``` | ||
| + | |||
| + | You also need to setup the IP address on your PC, e.g. '' | ||
| + | |||
| + | Check network connection: | ||
| + | |||
| + | ```shell | ||
| + | khadas@Khadas: | ||
| + | PING 192.168.35.110 (192.168.35.110) from 192.168.35.100 usb0: 56(84) bytes of data. | ||
| + | 64 bytes from 192.168.35.110: | ||
| + | 64 bytes from 192.168.35.110: | ||
| + | 64 bytes from 192.168.35.110: | ||
| + | 64 bytes from 192.168.35.110: | ||
| + | 64 bytes from 192.168.35.110: | ||
| + | ^C | ||
| + | --- 192.168.35.110 ping statistics --- | ||
| + | 5 packets transmitted, | ||
| + | rtt min/ | ||
| + | ``` | ||
| + | |||
| + | |||
| + | ===== Troubleshooting ===== | ||
| + | |||
| + | If adb not work on windows, you can edit ''/ | ||
| + | |||
| + | ```diff | ||
| + | diff --git a/ | ||
| + | index 299569f0..520a9b9a 100755 | ||
| + | --- a/ | ||
| + | +++ b/ | ||
| + | @@ -57,7 +57,7 @@ echo " | ||
| + | echo " | ||
| + | |||
| + | # Bind function to configuration | ||
| + | -#ln -s $F_RNDIS $GADGET/ | ||
| + | +ln -s $F_RNDIS $GADGET/ | ||
| + | ln -s $GADGET/ | ||
| + | |||
| + | # Enable the Gadget | ||
| + | ``` | ||
| + | |||