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

Next revision
Previous revision
products:sbc:vim3:configurations:usb-gadget [2022/07/06 23:28]
frank created
products:sbc:vim3:configurations:usb-gadget [2023/04/16 22:35] (current)
nick
Line 1: Line 1:
-====== USB Gadget ======+====== VIM3/3L USB Gadget ======
  
 ===== Introduction ===== ===== Introduction =====
Line 15: Line 15:
 Open ''/boot/env.txt'': Open ''/boot/env.txt'':
  
-```sh +```shell 
-khadas@khadas:~$ sudo vim /boot/env.txt+sudo vim /boot/env.txt
 ``` ```
  
Line 27: Line 27:
 ==== Enable Service ==== ==== Enable Service ====
  
-```sh +```shell 
-khadas@khadas:~$ sudo systemctl enable usb-gadget-khadas.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. Reboot to effect.
  
-```sh +```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 ''192.168.35.100'' 
 + 
 +```shell 
 +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: 
 + 
 +```shell 
 +khadas@Khadas:~$ ping -I usb0 192.168.35.1 
 +PING 192.168.35.1 (192.168.35.1) from 192.168.35.100 usb056(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 
 +``` 
 + 
 +===== 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   dev      etc   lib    mnt  proc  run   srv  tmp    usr zImage 
 +boot  dtb.img  home  media  opt  root  sbin  sys  uInitrd  var 
 +#  
 ``` ```
  
Last modified: 2022/07/06 23:28 by frank