Lima - USB OTG feature

Hi everyone,

I have a Lima Development kit and I want to use USB Guest Configuration (USB OTG feature), also called USB OTG. I think this feature will help me to use the usb type C port as an ethernet port . I want to ask if gadget mode is supported for Lima and I want to know the correct procedure to install them.

Thanks for any help!

would it work in any generic Linux dist ?

1 Like

It appears you are using firmware that is not from the official OpenWrt project.

When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.

You may find that the best options are:

  1. Install an official version of OpenWrt, if your device is supported (see https://firmware-selector.openwrt.org).
  2. Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
  3. Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).

If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.


You may wish to inquire here:

1 Like

Thank you so much for your help. First, I think I should ask Lima board supplier.
Thanks again for the helpful advice.

I installed OpenWrt snapshot 22.03.1 for Lima board.

that's not what I asked about.

So, you are running an official version?

Can you provide the output of: ubus call system board

Have you attempted to connect a USB device and run lsusb?

Usually you'd just install the USB packages.

So, you are running an official version?
I use version snapshot (unstable version for developer)
Can you provide the output of: ubus call system board
{
"kernel": "5.15.112",
"hostname": "OpenWrt",
"system": "Qualcomm Atheros QCA9533 ver 2 rev 0",
"model": "8devices Lima",
"board_name": "8dev,lima",
"rootfs_type": "squashfs",
"release": {
"distribution": "OpenWrt",
"version": "SNAPSHOT",
"revision": "r23005-7d0fb2cc34",
"target": "ath79/generic",
"description": "OpenWrt SNAPSHOT r23005-7d0fb2cc34"
}
}

Have you attempted to connect a USB device and run lsusb?
I run lsusb and the output is
Bus 001 Device 002: ID 1a86:5523
Bus 001 Device 001: ID 1d6b:0002 Linux 5.15.112 ehci_hcd EHCI Host Controller
USB type C I use for powering board and command through UART. I plug uart over usb adapter (chip CH431) into usb type A of board Lima
When I run cat /sys/kernel/debug/usb/devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 5.15
S: Manufacturer=Linux 5.15.112 ehci_hcd
S: Product=EHCI Host Controller
S: SerialNumber=1b000000.usb
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=02 MxPS= 8 #Cfgs= 1
P: Vendor=1a86 ProdID=5523 Rev= 3.04
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 96mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=02 Driver=ch341
E: Ad=82(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=1ms/usb/devices`, the output is:

Usually you'd just install the USB packages.
I installed all package following the instructions in USB OTG feature and One Port To Rule Them All // Serial, Ethernet, USB OTG, Raspberry Pi, OpenWrt