VIM3 USB Gadget Mode

Which Khadas SBC do you use?


Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu 22.04 5.x kernel

Which version of system do you use? Khadas official images, self built images, or others?


Please describe your issue below:

Has anyone gotten gadget mode to work with the VIM3 on Ubuntu? I’ve followed the documentation and it looks like its not enabled in the kernel.

Post a console log of your issue below:

root@Khadas:/home/khadas# grep otg-device$ /boot/env.txt 
overlays=uart3 pwm_f i2c3 os08a10 otg-device

@Khadas:/home/khadas# sh /usr/local/bin/usb-gadget 
mkdir: cannot create directory ‘/sys/kernel/config/usb_gadget’: Operation not permitted
/usr/local/bin/usb-gadget: 24: cannot create /sys/kernel/config/usb_gadget/khadas/idVendor: Directory nonexistent
/usr/local/bin/usb-gadget: 25: cannot create /sys/kernel/config/usb_gadget/khadas/idProduct: Directory nonexistent


This is only work for 4.9 kernel, but you use a 5.x kernel image. Can you try the 4.9 kernel image?

I got a little further with the 4.9 kernel but still doesn’t work as expected. The adbd binary shipped with the image bails on a missing library.

I’ve got a usb0 interface showing up and i can assign it an IP address but my iPad fails to see it as an Ethernet device.