Step by step instructions to setup a gl-inet ar300m as a USB-eth

I have been trying to set this up without success. I am a very old user-space programmer with little kernel experience; thank you for bearing with me.

I installed the modules listed below, and I configured /etc/usbmode.json and /etc/config/network as listed below.

I expected to see a usb0 interface, but I don't regardless of /etc/init.d/usbmode restart or /etc/init.d/network restart.

I googled and GPT-chatted to no avail.

How do I get this working?
My goal is for the router to act as an eth NIC, in a linux ubuntu host, to which it is connected (USB-A) for power.

BusyBox v1.35.0 (2023-04-09 12:27:46 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 22.03.4, r20123-38ccc47687
 -----------------------------------------------------
root@GL-AR300M:~# uname -a
Linux GL-AR300M 5.10.176 #0 Sun Apr 9 12:27:46 2023 mips GNU/Linux

root@GL-AR300M:~# opkg list-installed | grep gadget
kmod-usb-gadget - 5.10.176-1
kmod-usb-gadget-cdc-composite - 5.10.176-1
kmod-usb-gadget-ehci-debug - 5.10.176-1
kmod-usb-gadget-eth - 5.10.176-1
kmod-usb-gadget-hid - 5.10.176-1
kmod-usb-gadget-mass-storage - 5.10.176-1
kmod-usb-gadget-ncm - 5.10.176-1
kmod-usb-gadget-serial - 5.10.176-1

root@GL-AR300M:~# tail /overlay/upper/etc/usb-mode.json
                },                                                                                                      
                "c423:de97": {                                                                                          
                        "*": {                                                                                          
                                "mode": "CDC Ethernet",                                                                 
                                "interface": "usb0",                                                                    
                                "dhcp": true                                                                            
                        }                                                                                               
		}
	}
}


config interface 'usb0'
	option proto 'static'
	option ifname 'usb0'
	option ipaddr '192.168.8.10'
	option netmask '255.255.255.0'

via which port on the AR300 ?
the micro USB ?

This appears to be using the GL-inet firmware, but please feel free to clarify.

If you're using the vendor firmware, you need to reach out to them (and their support forums) for help. Or, feel free to install official OpenWrt (from openwrt.org) and we can help you here.

1 Like

yes. The power usb port in the AR300 connected to the ubuntu usb-A for power.

do you know the port is capable of anything else but power ?

I don't know (either way)
I was hoping someone on this forum might know.

that wasn't the question you asked though ...

I apologize if I failed to explain myself specifically and completely.
Your clarification questions are most welcome.

I asked for step-by-step instructions, assuming - but not asserting nor stating - it can be done.

"I know for sure it can't be done" is a real helpful answer.

"It can be done, but with the USB-A port, and here's how" is real helpful too.

"This is how it can be done" is what I pray for :slight_smile:

Thanks you for sharpening the discussion (and my English too)

Tha micro usb port on your device is for power only. It has no data connectivity. Therefore you cannot achieve your goal.

There is a usb type a port which can be used to add a usb to Ethernet dongle. If you want to use that, it is a simple matter of buying a standard usb adapter that is supported by openwrt, and then installing the relevant packages. If you go this route, please install official openwrt.

1 Like

As it turns out, the requirement cannot be achieved with the AR300m device --
(1) the micro-usb is power-only, so not supported there
(2) the USB-A is host only, so not supported there either

If anyone knows different - feel free to share your findings.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.