Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:vim3:configurations:usb-gadget

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:vim3:configurations:usb-gadget [2024/10/15 23:47]
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.
 +</WRAP>
  
 ===== System Configuration ===== ===== System Configuration =====
Line 28: Line 32:
 overlays=uart3 pwm_f i2c3 os08a10 --> overlays=uart3 pwm_f i2c3 os08a10 otg-device overlays=uart3 pwm_f i2c3 os08a10 --> overlays=uart3 pwm_f i2c3 os08a10 otg-device
 ``` ```
 +
 +<WRAP important >
 +If you have issues, please try the extra steps below:
 +
 +```shell
 +wget https://dl.khadas.com/.fixup/libcutils.so -O /tmp/libcutils.so
 +sudo cp /tmp/libcutils.so /usr/lib
 +```
 +</WRAP>
 +
 <tabbox VIM3/3L with 5.15 kernel> <tabbox VIM3/3L with 5.15 kernel>
  
Line 51: Line 65:
 sudo systemctl enable usb-gadget-khadas.service sudo systemctl enable usb-gadget-khadas.service
 ``` ```
- 
-<WRAP important > 
-If you have issues, please try the extra steps below: 
- 
-```shell 
-wget https://dl.khadas.com/.fixup/libcutils.so -O /tmp/libcutils.so 
-sudo cp /tmp/libcutils.so /usr/lib 
-``` 
-</WRAP> 
- 
  
 Reboot to effect. Reboot to effect.
Line 93: 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    device
  
 $ adb shell $ adb shell
-#  +root@Khadas:/
-#  +root@Khadas:/
-# ls +root@Khadas:/# 
-bin   dev      etc   lib    mnt  proc  run   srv  tmp    usr zImage +root@Khadas:/# 
-boot  dtb.img  home  media  opt  root  sbin  sys  uInitrd  var +root@Khadas:/# ls 
-#  +bin                dtb.img     lib                proc                srv 
 +bin.usr-is-merged  etc         lib.usr-is-merged  root                sys 
 +boot               home        media              run                 tmp 
 +dev                Image       mnt                sbin                usr 
 +dtb                initrd.img  opt                sbin.usr-is-merged  var
 ``` ```
  
 +===== Troubleshooting =====
 +
 +If adb not work on windows, you can edit ''/usr/local/bin/usb-gadget'' to comment ''ln -s $F_RNDIS $GADGET/configs/c.1/'' and reboot.
 +
 +```diff
 +diff --git a/archives/filesystem/special/VIM-COMMON/usr/local/bin/usb-gadget b/archives/filesystem/special/VIM-COMMON/usr/local/bin/usb-gadget
 +index 520a9b9a..299569f0 100755
 +--- a/usr/local/bin/usb-gadget
 ++++ b/usr/local/bin/usb-gadget
 +@@ -57,7 +57,7 @@ echo "RNDIS" > $F_RNDIS/os_desc/interface.rndis/compatible_id
 + echo "5162001" > $F_RNDIS/os_desc/interface.rndis/sub_compatible_id
 +
 + # Bind function to configuration
 +-ln -s $F_RNDIS $GADGET/configs/c.1/
 ++#ln -s $F_RNDIS $GADGET/configs/c.1/
 + ln -s $GADGET/configs/c.1/ $GADGET/os_desc
 +
 + # Enable the Gadget
 +```
Last modified: 2024/10/15 23:47 by nick