Adding USB connectivity to my router

The hardware I use as an OpenWrt router is the one I describe here:
https://forum.openwrt.org/t/whats-your-favourite-cheap-lede-openwrt-device/1362/405?u=gallegojm
and here:
https://forum.openwrt.org/t/whats-your-favourite-cheap-lede-openwrt-device/1362/405?u=gallegojm

One drawback is it has no usb port, despite the chip (HLK-7688A) owns 2 pins labeled USB_DP and USB_DM.

I was worried that it would be necessary to buffer these data pins, but according to Instant Muffing:

This pins are easily accessible on the kit board (labeled DP and DN).

So the hardware side seems resolved.
Now the software...
I saw other kits based on MT76x8 that have usb connectivity.
Does Openwrt firmware include by default the usb driver ?
Is it necessary to excute some configuration ?

"Does Openwrt firmware include by default the usb driver ?"
https://openwrt.org/docs/guide-user/storage/usb-installing

Check if its installed, if not, install it. It should work and be detected regardless of a connector being soldered onto it.

"Is it necessary to excute some configuration ?"

Generally it should be enough to follow the guide I posted above. It may be possible there is a low-level subsystem to it that loads very basic settings before the OS is loaded, but I wouldn't worry about that at first and just see if a port is already being detected.

1 Like

Thank you Instant Muffing for the link!
I install the drivers following these instructions:

opkg update
> opkg install block-mount e2fsprogs kmod-fs-ext4 kmod-usb-storage kmod-usb2
insmod ehci-hcd

then:

ls -al /dev/sd*
    brw-------    1 root     root        8,   0 Aug  1 17:28 /dev/sda
    brw-------    1 root     root        8,   1 Aug  1 17:49 /dev/sda1

Ok! OpenWrt now would recognize a usb drive!
So I proceed to connect a sd card using a usb to sd adapter and the female part of a usb extension cable that I cut in the middle:

USBConnection1

Now it is possible to format an ext4 partition:
mkfs.ext4 /dev/sda1

2 Likes

Hi @gallegojm

Thanks for sharing. Very helpful.

It's running version 22.03.2,(r19803-9a599fee93) and the basic functions work fine with ttyUSB0