Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


Sidebar

products:sbc:vim3:configurations:usb-gadget

This is an old revision of the document!


VIM3/3L USB Gadget

Introduction

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 https://dl.khadas.com/.fixup/libcutils.so -O /tmp/libcutils.so
sudo cp /tmp/libcutils.so /usr/lib
sudo systemctl enable usb-gadget-khadas.service

Reboot to effect.

sync
sudo reboot

RNDIS Setup IP Address

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

sudo ifconfig usb0 192.168.35.100 up

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

Check network connection:

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: icmp_seq=1 ttl=64 time=0.218 ms
64 bytes from 192.168.35.1: icmp_seq=2 ttl=64 time=0.308 ms
64 bytes from 192.168.35.1: icmp_seq=3 ttl=64 time=0.209 ms
64 bytes from 192.168.35.1: icmp_seq=4 ttl=64 time=0.301 ms
64 bytes from 192.168.35.1: icmp_seq=5 ttl=64 time=0.295 ms
64 bytes from 192.168.35.1: icmp_seq=6 ttl=64 time=0.222 ms
64 bytes from 192.168.35.1: icmp_seq=7 ttl=64 time=0.289 ms
64 bytes from 192.168.35.1: icmp_seq=8 ttl=64 time=0.297 ms
64 bytes from 192.168.35.1: icmp_seq=9 ttl=64 time=0.240 ms
64 bytes from 192.168.35.1: icmp_seq=10 ttl=64 time=0.280 ms
Last modified: 2023/04/16 22:33 by nick