Jump to content

How to enable 'USB-UART/Gadget mode' on OPI Lite2?


Damien Wang

Recommended Posts

Dear community,

 

Im trying to get an USB gadget via OTG running on Linux (OrangePI Lite 2). As OPI Lite 2 doesn't support  'USB-UART/Gadget mode' like OPI Zero, I just modify the build config and rebuild kernel by myself as steps shown below. 

 

1. I change the mode of USB from host to otg in the:

https://github.com/armbian/build/blob/master/patch/kernel/sunxi-current/board-h6-orangepi-lite2-fix-missing-all.patch

 

2. I add MODULES_CURRENT="g_serial" & SERIALCON="ttyS0,ttyGS0" to build/config/boards/orangepilite2.conf file.

 

3. I rebuild the kernel and flashed the new image to sdcard. 

 

Unfortunately, I find it doesn't work, the WIN10 does find a USB device but cannot recognize it. In win10 device manager, it shows "Unknown USB Device (Device Descriptor Request Failed)"

 

I was wondering if anyone tried 'USB-UART/Gadget mode' in OPI Lite2,  could you help give some suggestions?

 

Here is some messages when I tried debug this issue:

 

root@orangepilite2:~# cat /etc/modules
g_serial
 

root@orangepilite2:~# dmesg | grep gadget
[    5.955959] g_serial gadget: Gadget Serial v2.4
[    5.955967] g_serial gadget: g_serial ready
 

root@orangepilite2:~# ls /sys/bus/platform/devices/sunxi_usb_udc/
ls: cannot access '/sys/bus/platform/devices/sunxi_usb_udc/': No such file or directory

 

root@orangepilite2:~# ll  /sys/kernel/config/usb_gadget/
total 0

root@orangepilite2:~# ls /sys/class/udc
musb-hdrc.5.auto
 

root@orangepilite2:~# ls /dev/tty*
/dev/tty    /dev/tty2   /dev/tty31  /dev/tty43  /dev/tty55  /dev/ttyGS0
/dev/tty0   /dev/tty20  /dev/tty32  /dev/tty44  /dev/tty56  /dev/ttyS0
/dev/tty1   /dev/tty21  /dev/tty33  /dev/tty45  /dev/tty57  /dev/ttyS2
/dev/tty10  /dev/tty22  /dev/tty34  /dev/tty46  /dev/tty58  /dev/ttyS3
/dev/tty11  /dev/tty23  /dev/tty35  /dev/tty47  /dev/tty59  /dev/ttyS4
/dev/tty12  /dev/tty24  /dev/tty36  /dev/tty48  /dev/tty6   /dev/ttyS5
/dev/tty13  /dev/tty25  /dev/tty37  /dev/tty49  /dev/tty60  /dev/ttyS6
/dev/tty14  /dev/tty26  /dev/tty38  /dev/tty5   /dev/tty61  /dev/ttyS7
/dev/tty15  /dev/tty27  /dev/tty39  /dev/tty50  /dev/tty62
/dev/tty16  /dev/tty28  /dev/tty4   /dev/tty51  /dev/tty63
/dev/tty17  /dev/tty29  /dev/tty40  /dev/tty52  /dev/tty7
/dev/tty18  /dev/tty3   /dev/tty41  /dev/tty53  /dev/tty8
/dev/tty19  /dev/tty30  /dev/tty42  /dev/tty54  /dev/tty9
 

 

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines