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 [2022/07/08 05:24] frank |
products:sbc:vim3:configurations:usb-gadget [2023/04/16 22:35] (current) nick |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== USB Gadget ====== | + | ====== |
===== Introduction ===== | ===== Introduction ===== | ||
Line 16: | Line 16: | ||
```shell | ```shell | ||
- | khadas@khadas: | + | sudo vim / |
``` | ``` | ||
Line 28: | Line 28: | ||
```shell | ```shell | ||
- | khadas@khadas: | + | wget https://dl.khadas.com/ |
+ | sudo cp / | ||
+ | sudo systemctl enable usb-gadget-khadas.service | ||
``` | ``` | ||
Line 34: | Line 36: | ||
```shell | ```shell | ||
- | khadas@khadas:~$ sync | + | sync |
- | khadas@khadas:~$ sudo reboot | + | sudo reboot |
+ | ``` | ||
+ | |||
+ | ===== RNDIS Setup IP Address ===== | ||
+ | |||
+ | Setup IP address manyally, e.g. setup IP address as '' | ||
+ | |||
+ | ```shell | ||
+ | sudo ifconfig usb0 192.168.35.100 up | ||
+ | ``` | ||
+ | |||
+ | Also need to setup the IP address on your PC, e.g. '' | ||
+ | |||
+ | Check network connection: | ||
+ | |||
+ | ```shell | ||
+ | khadas@Khadas:~$ ping -I usb0 192.168.35.1 | ||
+ | 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: | ||
+ | 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: | ||
+ | 64 bytes from 192.168.35.1: | ||
+ | ``` | ||
+ | |||
+ | ===== Usage of ADB ===== | ||
+ | |||
+ | Try to access the devices via adb. | ||
+ | |||
+ | ```shell | ||
+ | $ adb devices | ||
+ | * daemon not running; starting now at tcp:5037 | ||
+ | * daemon started successfully | ||
+ | List of devices attached | ||
+ | 37304e424e50 device | ||
+ | |||
+ | $ adb shell | ||
+ | # | ||
+ | # | ||
+ | # ls | ||
+ | bin | ||
+ | boot dtb.img | ||
+ | # | ||
``` | ``` | ||