Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:vim4: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
products:sbc:vim4:configurations:usb-gadget [2025/07/11 03:40]
nick [Troubleshooting]
products:sbc:vim4:configurations:usb-gadget [2025/08/17 23:24] (current)
nick
Line 6: Line 6:
  
 {{page>/products/sbc/common/configurations/usb-gadget&noheader}} {{page>/products/sbc/common/configurations/usb-gadget&noheader}}
 +
 +===== 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    device
 +$ adb shell
 +root@Khadas:/#
 +root@Khadas:/#
 +root@Khadas:/#
 +root@Khadas:/#
 +```
  
 ===== RNDIS Setup IP Address ===== ===== RNDIS Setup IP Address =====
 +
 +Enable RNDIS:
 +
 +Edit ''/usr/local/bin/usb-gadget'' to uncomment ''#ln -s $F_RNDIS $GADGET/configs/c.1/'' and reboot.
 +
 +```diff
 +diff --git a/usr/local/bin/usb-gadget b/usr/local/bin/usb-gadget
 +index 299569f0..520a9b9a 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
 +```
  
 Setup IP address manyally, e.g. setup IP address as ''192.168.35.100'' Setup IP address manyally, e.g. setup IP address as ''192.168.35.100''
Line 33: Line 71:
 ``` ```
  
-===== 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    device 
-$ adb shell 
-root@Khadas:/# 
-root@Khadas:/# 
-root@Khadas:/# 
-root@Khadas:/# 
-``` 
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
Line 56: Line 77:
  
 ```diff ```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 +diff --git a/usr/local/bin/usb-gadget b/usr/local/bin/usb-gadget 
-index 520a9b9a..299569f0 100755+index 299569f0..520a9b9a 100755
 --- a/usr/local/bin/usb-gadget --- a/usr/local/bin/usb-gadget
 +++ b/usr/local/bin/usb-gadget +++ b/usr/local/bin/usb-gadget
Line 64: Line 85:
  
  # Bind function to configuration  # Bind function to configuration
--ln -s $F_RNDIS $GADGET/configs/c.1/ +-#ln -s $F_RNDIS $GADGET/configs/c.1/ 
-+#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  ln -s $GADGET/configs/c.1/ $GADGET/os_desc
  
Last modified: 2025/08/17 23:24 by nick