Expand memory with USB

Hi, i want to expand my router memory but i have a problem when i want to know if the router recognizes the usb.
I'm on https://openwrt.org/docs/guide-user/storage/usb-drives
When i put lsusb -t, i have:

/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M

and there no sda or sda1 directory

root@OpenWrt:~# ls -l /dev/sd*
ls: /dev/sd*: No such file or directory
root@OpenWrt:~# ls -l /dev/
drwxr-xr-x    3 root     root            60 Jan  1  1970 bus
crw-------    1 root     root        5,   1 Jan  1  1970 console
crw-------    1 root     root       10,  63 Jan  1  1970 cpu_dma_latency
crw-rw-rw-    1 root     root        1,   7 Jan  1  1970 full
crw-------    1 root     root      254,   0 Jan  1  1970 gpiochip0
crw-------    1 root     root       10, 183 Jan  1  1970 hwrng
crw-------    1 root     root        1,  11 Jan  1  1970 kmsg
srw-rw-rw-    1 root     root             0 Aug 21 17:26 log
crw-------    1 root     root       10,  60 Jan  1  1970 memory_bandwidth
crw-------    1 root     root       90,   0 Jan  1  1970 mtd0
crw-------    1 root     root       90,   1 Jan  1  1970 mtd0ro
crw-------    1 root     root       90,   2 Jan  1  1970 mtd1
crw-------    1 root     root       90,  20 Jan  1  1970 mtd10
crw-------    1 root     root       90,  21 Jan  1  1970 mtd10ro
crw-------    1 root     root       90,   3 Jan  1  1970 mtd1ro
crw-------    1 root     root       90,   4 Jan  1  1970 mtd2
crw-------    1 root     root       90,   5 Jan  1  1970 mtd2ro
crw-------    1 root     root       90,   6 Jan  1  1970 mtd3
crw-------    1 root     root       90,   7 Jan  1  1970 mtd3ro
crw-------    1 root     root       90,   8 Jan  1  1970 mtd4
crw-------    1 root     root       90,   9 Jan  1  1970 mtd4ro
crw-------    1 root     root       90,  10 Jan  1  1970 mtd5
crw-------    1 root     root       90,  11 Jan  1  1970 mtd5ro
crw-------    1 root     root       90,  12 Jan  1  1970 mtd6
crw-------    1 root     root       90,  13 Jan  1  1970 mtd6ro
crw-------    1 root     root       90,  14 Jan  1  1970 mtd7
crw-------    1 root     root       90,  15 Jan  1  1970 mtd7ro
crw-------    1 root     root       90,  16 Jan  1  1970 mtd8
crw-------    1 root     root       90,  17 Jan  1  1970 mtd8ro
crw-------    1 root     root       90,  18 Jan  1  1970 mtd9
crw-------    1 root     root       90,  19 Jan  1  1970 mtd9ro
brw-------    1 root     root       31,   0 Jan  1  1970 mtdblock0
brw-------    1 root     root       31,   1 Jan  1  1970 mtdblock1
brw-------    1 root     root       31,  10 Jan  1  1970 mtdblock10
brw-------    1 root     root       31,   2 Jan  1  1970 mtdblock2
brw-------    1 root     root       31,   3 Jan  1  1970 mtdblock3
brw-------    1 root     root       31,   4 Jan  1  1970 mtdblock4
brw-------    1 root     root       31,   5 Jan  1  1970 mtdblock5
brw-------    1 root     root       31,   6 Jan  1  1970 mtdblock6
brw-------    1 root     root       31,   7 Jan  1  1970 mtdblock7
brw-------    1 root     root       31,   8 Jan  1  1970 mtdblock8
brw-------    1 root     root       31,   9 Jan  1  1970 mtdblock9
drwxr-xr-x    2 root     root            60 Aug 21 17:26 net
crw-------    1 root     root       10,  62 Jan  1  1970 network_latency
crw-------    1 root     root       10,  61 Jan  1  1970 network_throughput
crw-rw-rw-    1 root     root        1,   3 Jan  1  1970 null
crw-------    1 root     root        1,   4 Jan  1  1970 port
crw-------    1 root     root      108,   0 Aug 21 17:26 ppp
crw-rw-rw-    1 root     root        5,   2 Aug 22 16:56 ptmx
drwxr-xr-x    2 root     root             0 Jan  1  1970 pts
crw-rw-rw-    1 root     root        1,   8 Jan  1  1970 random
lrwxrwxrwx    1 root     root             8 Jan  1  1970 shm -> /tmp/shm
crw-rw-rw-    1 root     root        5,   0 Jan  1  1970 tty
crw-rw----    1 root     dialout     4,  64 Jan  1  1970 ttyS0
crw-rw----    1 root     dialout     4,  65 Jan  1  1970 ttyS1
crw-rw----    1 root     dialout     4,  74 Jan  1  1970 ttyS10
crw-rw----    1 root     dialout     4,  75 Jan  1  1970 ttyS11
crw-rw----    1 root     dialout     4,  76 Jan  1  1970 ttyS12
crw-rw----    1 root     dialout     4,  77 Jan  1  1970 ttyS13
crw-rw----    1 root     dialout     4,  78 Jan  1  1970 ttyS14
crw-rw----    1 root     dialout     4,  79 Jan  1  1970 ttyS15
crw-rw----    1 root     dialout     4,  66 Jan  1  1970 ttyS2
crw-rw----    1 root     dialout     4,  67 Jan  1  1970 ttyS3
crw-rw----    1 root     dialout     4,  68 Jan  1  1970 ttyS4
crw-rw----    1 root     dialout     4,  69 Jan  1  1970 ttyS5
crw-rw----    1 root     dialout     4,  70 Jan  1  1970 ttyS6
crw-rw----    1 root     dialout     4,  71 Jan  1  1970 ttyS7
crw-rw----    1 root     dialout     4,  72 Jan  1  1970 ttyS8
crw-rw----    1 root     dialout     4,  73 Jan  1  1970 ttyS9
crw-rw-rw-    1 root     root        1,   9 Jan  1  1970 urandom
crw-------    1 root     root       10, 130 Jan  1  1970 watchdog
crw-rw-rw-    1 root     root        1,   5 Jan  1  1970 zero

the USB is plugged

you have to add the usb kernel module; kmod usb ...

root@OpenWrt:/dev# opkg install kmod-usb3
Package kmod-usb3 (4.14.180-1) installed in root is up to date.

already did

root@OpenWrt:/dev# opkg list-installed | grep usb
kmod-phy-ath79-usb - 4.14.180-1
kmod-usb-core - 4.14.180-1
kmod-usb-ehci - 4.14.180-1
kmod-usb-ledtrig-usbport - 4.14.180-1
kmod-usb-ohci - 4.14.180-1
kmod-usb-storage - 4.14.180-1
kmod-usb-storage-uas - 4.14.180-1
kmod-usb-uhci - 4.14.180-1
kmod-usb2 - 4.14.180-1
kmod-usb3 - 4.14.180-1
libusb-1.0-0 - 1.0.22-2

What make / model router and which OpenWrt version?

Builds for models with a USB port almost always include the correct USB host driver kmod(s). The page tells you to install a bunch of other ones (ehci etc) that do nothing on most modern hardware.

When you plug in the flash drive you should see a "New high speed USB device" entry in the log. This comes from the lowest level driver (kmod-usb2 etc) If storage drivers are installed there will be additional messages as they claim the device.

If nothing happens when the USB is plugged in, try charging a phone or plug in some device that only requires power from the USB port. Some models have hardware that turns off the power output to the port.

1 Like
Model	TP-Link Archer C7 v5
Architecture	Qualcomm Atheros QCA956X ver 1 rev 0
Firmware Version	OpenWrt 19.07.3 r11063-85e04e9f46 / LuCI openwrt-19.07 branch git-20.136.49537-fb2f363

is installed:

root@OpenWrt:~# opkg list-installed | grep usb
kmod-phy-ath79-usb - 4.14.180-1
kmod-usb-core - 4.14.180-1
kmod-usb-ehci - 4.14.180-1
kmod-usb-ledtrig-usbport - 4.14.180-1
kmod-usb-ohci - 4.14.180-1
kmod-usb-ohci-pci - 4.14.180-1
kmod-usb-storage - 4.14.180-1
kmod-usb-storage-uas - 4.14.180-1
kmod-usb-uhci - 4.14.180-1
kmod-usb2 - 4.14.180-1
kmod-usb2-pci - 4.14.180-1
kmod-usb3 - 4.14.180-1
libusb-1.0-0 - 1.0.22-2
```
I have no logs when i plug the usb and the phone cannot charge
dmesg | grep -C5 usb
1 Like

It looks like you don't have any file system kmod installed (assuming ext4) should be kmod-fs-ext4.

1 Like

I've finnaly mounted the usb to /mnt/sda but how extend the memory now?

1 Like

https://openwrt.org/docs/guide-user/additional-software/extroot_configuration

1 Like

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