USB Basic Support
Most images offered on the OpenWrt download page, come with the basic USB support already included, if yours doesn't, you are right here. The OPKG packages needed to obtain a very basic USB support under OpenWrt (please read about the different host controller interfaces on Wikipedia):
| Name | Size | Required | Desciption |
|---|---|---|---|
| kmod-usb-core | 74274 | yes | Kernel support for USB |
| kmod-usb-ohci | 14935 | specific | Kernel support for USB OHCI controllers. Alternative to uhci |
| kmod-usb-uhci | 14897 | specific | Kernel support for USB UHCI controllers. Alternative to ohci |
| kmod-usb2 | 24752 | specific | Kernel support for USB2 (EHCI) controllers |
| kmod-ledtrig-usbdev | 3502 | no | Kernel module to drive LEDs based on USB device presence/activity. |
| usbutils | 187087 | no | USB devices listing utilities: lsusb, … |
| kmod-leds-wndr3700-usb | 2156 | no | Kernel module for the USB LED on the Netgear WNDR3700 board only. |
That way, your GNU/Linux system is able to address the bus. Now, depending on what you want to connect over the bus, you still need to install the drivers for that specific device. Please see usb.overview
Installation
Modules for USB 1.1
An USB 1.1 chips either has an UHC or an OHC interface. You need not be afraid of installing the wrong on, just check:
UHCI
For USB 1.1, try installing the UHCI drivers first and test them:
opkg update opkg install kmod-usb-uhci insmod usbcore insmod uhci
If you see the message uhci: No such device then your hardware is not an UHCI device. Remove the package and try installing the alternative OHCI.
OHCI
opkg update opkg install kmod-usb-ohci insmod usb-ohci
If you see the message usb-ohci: No such device then your hardware is not an OHCI device. Remove the package or try installing UHCI.
NOTE: Running Kernel 2.6.xx, you may need the kmod-usb2 module, even if you have only an USB 1.1 controller (this is the case for the Asus WL-500g router using Backfire brcm47xx)
Modules for USB 2.0
Usually you can install both, uhci or ohci and usb2.
opkg update opkg install kmod-usb2 insmod ehci-hcd
If you see messages like unresolved symbol usb_calc_bus_time try loading usbcore and then try ehci-hcd again:
opkg update insmod usbcore insmod ehci-hcd
Modules for USB 3.0
So far (2011-02) there is no device supported by OpenWrt with USB 3.0.
Troubleshooting
is this still needed? The max_scsi_luns=8 bit is needed for
multi-card readers and should be added to the end of the scsi_mod
line in the /etc/modules.d/60-usb-storage file. |
dmesg output:
usb.c: registered new driver usbdevfs
…
usb.c: registered new driver usb-storage
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: Apacer Model: Drive Rev: 1.05
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 256000 512-byte hdwr sectors (131 MB)
sda: Write Protect is off
Partition check:
/dev/scsi/host0/bus0/target0/lun0: p1
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
|
If you still have problems with USB have a look at the unfixed USB bugs better bugs since last release |
Notes
- Linux USB - http://www.linux-usb.org/
- Linux USB device support - http://www.linux-usb.org/devices.html
doc/howto/usb.essentials.txt · Last modified: 2012/10/20 23:59 by coolkoon
This text is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

is this still needed? The