Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools



VIM1 USB Gadget


This document mainly introduces USB gadget. You will learn how to configure and enable USB gadget Usage.

System Configuration

Upgrade System

Follow Upgrade System to upgrade system.

Configure DTS Overlays

Open /boot/env.txt:

sudo vim /boot/env.txt

Add otg-device to overlays node to make USB OTG Device enable:

overlays=uart3 pwm_f i2c3 os08a10 --> overlays=uart3 pwm_f i2c3 os08a10 otg-device

Enable Service

wget -O /tmp/
sudo cp /tmp/ /usr/lib
sudo systemctl enable usb-gadget-khadas.service

Reboot to effect.

sudo reboot

RNDIS Setup IP Address

Setup IP address manyally, e.g. setup IP address as

sudo ifconfig usb0 up

Also need to setup the IP address on your PC, e.g.

Check network connection:

khadas@Khadas:~$ ping -I usb0
PING ( from usb0: 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=0.218 ms
64 bytes from icmp_seq=2 ttl=64 time=0.308 ms
64 bytes from icmp_seq=3 ttl=64 time=0.209 ms
64 bytes from icmp_seq=4 ttl=64 time=0.301 ms
64 bytes from icmp_seq=5 ttl=64 time=0.295 ms
64 bytes from icmp_seq=6 ttl=64 time=0.222 ms
64 bytes from icmp_seq=7 ttl=64 time=0.289 ms
64 bytes from icmp_seq=8 ttl=64 time=0.297 ms
64 bytes from icmp_seq=9 ttl=64 time=0.240 ms
64 bytes from icmp_seq=10 ttl=64 time=0.280 ms

Usage of ADB

Try to access the devices via adb.

$ adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
37304e424e50	device
$ adb shell
# ls
bin   dev      etc   lib    mnt  proc  run   srv  tmp	   usr	zImage
boot  dtb.img  home  media  opt  root  sbin  sys  uInitrd  var
2022/07/06 23:28 · frank
Last modified: 2022/09/07 03:00 by nick