This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:vim3:configurations:usb-gadget [2023/04/16 22:35] nick |
products:sbc:vim3:configurations:usb-gadget [2025/08/13 03:55] (current) nick |
||
|---|---|---|---|
| Line 4: | Line 4: | ||
| This document mainly introduces USB gadget. You will learn how to configure and enable USB gadget Usage. | This document mainly introduces USB gadget. You will learn how to configure and enable USB gadget Usage. | ||
| + | |||
| + | <WRAP important > | ||
| + | From version **1.7.5**, USB gadget is enabled by default, no need any setup, you can just skip the overlay and service setup. | ||
| + | </ | ||
| ===== System Configuration ===== | ===== System Configuration ===== | ||
| Line 12: | Line 16: | ||
| ==== Configure DTS Overlays ==== | ==== Configure DTS Overlays ==== | ||
| + | |||
| + | <tabbox VIM3/3L with 4.9 kernel> | ||
| + | |||
| + | Take VIM3 as an example. | ||
| Open ''/ | Open ''/ | ||
| Line 25: | Line 33: | ||
| ``` | ``` | ||
| - | ==== Enable Service ==== | + | <WRAP important > |
| + | If you have issues, please try the extra steps below: | ||
| ```shell | ```shell | ||
| wget https:// | wget https:// | ||
| sudo cp / | sudo cp / | ||
| + | ``` | ||
| + | </ | ||
| + | |||
| + | <tabbox VIM3/3L with 5.15 kernel> | ||
| + | |||
| + | Take VIM3 as an example. | ||
| + | |||
| + | Open ''/ | ||
| + | |||
| + | ```shell | ||
| + | sudo vim / | ||
| + | ``` | ||
| + | |||
| + | Add '' | ||
| + | |||
| + | ``` | ||
| + | fdt_overlays=otg-device | ||
| + | ``` | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== Enable Service ==== | ||
| + | |||
| + | ```shell | ||
| sudo systemctl enable usb-gadget-khadas.service | sudo systemctl enable usb-gadget-khadas.service | ||
| ``` | ``` | ||
| Line 48: | Line 81: | ||
| ``` | ``` | ||
| - | Also need to setup the IP address on your PC, e.g. '' | + | Also need to setup the IP address on your PC, e.g. '' |
| Check network connection: | Check network connection: | ||
| ```shell | ```shell | ||
| - | khadas@Khadas: | + | khadas@Khadas: |
| PING 192.168.35.1 (192.168.35.1) from 192.168.35.100 usb0: 56(84) bytes of data. | PING 192.168.35.1 (192.168.35.1) from 192.168.35.100 usb0: 56(84) bytes of data. | ||
| - | 64 bytes from 192.168.35.1: icmp_seq=1 ttl=64 time=0.218 ms | + | 64 bytes from 192.168.35.110: icmp_seq=1 ttl=64 time=0.218 ms |
| - | 64 bytes from 192.168.35.1: icmp_seq=2 ttl=64 time=0.308 | + | 64 bytes from 192.168.35.110: icmp_seq=2 ttl=64 time=0.308 ms |
| - | 64 bytes from 192.168.35.1: | + | |
| - | 64 bytes from 192.168.35.1: | + | |
| - | 64 bytes from 192.168.35.1: | + | |
| - | 64 bytes from 192.168.35.1: | + | |
| - | 64 bytes from 192.168.35.1: | + | |
| - | 64 bytes from 192.168.35.1: | + | |
| - | 64 bytes from 192.168.35.1: | + | |
| - | 64 bytes from 192.168.35.1: | + | |
| ``` | ``` | ||
| Line 72: | Line 97: | ||
| ```shell | ```shell | ||
| + | $ adb kill-server | ||
| $ adb devices | $ adb devices | ||
| * daemon not running; starting now at tcp:5037 | * daemon not running; starting now at tcp:5037 | ||
| * daemon started successfully | * daemon started successfully | ||
| List of devices attached | List of devices attached | ||
| - | 37304e424e50 device | + | 363233573350 |
| $ adb shell | $ adb shell | ||
| - | # | + | root@Khadas:/ |
| - | # | + | root@Khadas:/ |
| - | # ls | + | root@Khadas:/# |
| - | bin dev etc lib | + | root@Khadas:/# |
| - | boot dtb.img | + | root@Khadas:/ |
| - | # | + | bin |
| + | bin.usr-is-merged | ||
| + | boot home media run tmp | ||
| + | dev Image | ||
| + | dtb | ||
| ``` | ``` | ||
| + | ===== Troubleshooting ===== | ||
| + | |||
| + | If adb not work on windows, you can edit ''/ | ||
| + | |||
| + | ```diff | ||
| + | diff --git a/ | ||
| + | index 520a9b9a..299569f0 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 | ||
| + | ``` | ||