Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| usb [2009/02/27 18:49] – AndrewThompson | usb [2020/05/17 20:27] (current) – the "new" USB stack has been in the tree for years now. MarkLinimon | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== USB on FreeBSD ===== | ===== USB on FreeBSD ===== | ||
| - | USB is short for Universial Serial BUS. There are currently five variants of USB. The new USB stack in %%FreeBSD%% -current supports Low, Full and High speed USB devices in Host- and Device Mode. | + | * [[USB/ |
| + | |||
| + | USB is short for Universial Serial BUS. There are currently five variants of USB. The USB stack in %%FreeBSD%% -current supports Low-, Full-, High- and Super- | ||
| * Low Speed USB | * Low Speed USB | ||
| * Full Speed USB | * Full Speed USB | ||
| * High Speed USB | * High Speed USB | ||
| - | * Super Speed USB (not supported yet) | + | * Super Speed USB |
| * Wireless USB (not supported yet) | * Wireless USB (not supported yet) | ||
| - | This page describes HPSUSB/' | + | ===== Debugging USB ===== |
| - | ===== HPSUSB FAQ ===== | + | If you want very verbose messages, you can set the following variables in loader.conf |
| - | * Q: hald is using 100% CPU | + | < |
| - | * A: Update to the latest hald port | + | hw.usb.ehci.iaadbug=1 |
| + | hw.usb.ehci.debug=1 | ||
| + | hw.usb.xhci.debug=1 | ||
| + | </ | ||
| - | * Q: xsane does not detect my scanner | + | usbconfig gives you information on your devices. |
| - | * A: You need to re-link xsane to use / | + | |
| - | + | ||
| - | * Q: Do I need to recompile | + | |
| - | * A: No, libusb20 is binary compatible with libusb-0.1.x. | + | |
| - | + | ||
| - | * Q: How do I re-link an application to use libusb20? | + | |
| - | * A: Add " | + | |
| < | < | ||
| - | # | + | $ sudo usbconfig |
| - | # Alternative | + | ugen0.1: <0x8086 XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) |
| - | # Add the following lines to "/ | + | ugen1.1: <Intel EHCI root HUB> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) |
| - | # | + | ugen1.2: <vendor 0x8087 product 0x8000> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) |
| - | libusb-0.1.so libusb20.so | + | ugen0.2: < |
| - | libusb-0.1.so.8 libusb20.so.1 | + | ugen0.3: <VXIS Inc FHD Webcamera> |
| </ | </ | ||
| + | |||
| + | You can get more detailed information on your devices with the dump_all_desc command. | ||
| < | < | ||
| - | # | + | $ sudo usbconfig |
| - | # Alternative 2 | + | ugen0.3: <VXIS Inc FHD Webcamera> |
| - | # Run the following commands like SuperUser: | + | |
| - | # | + | |
| - | mv -i / | + | bDescriptorType = 0x0001 |
| - | mv -i / | + | |
| - | ln -s / | + | bDeviceClass = 0x00ef |
| - | ln -s / | + | bDeviceSubClass = 0x0002 |
| + | bDeviceProtocol = 0x0001 | ||
| + | bMaxPacketSize0 = 0x0009 | ||
| + | idVendor = 0x1bcf | ||
| + | idProduct = 0x2c99 | ||
| + | bcdDevice = 0x0200 | ||
| + | iManufacturer = 0x0001 | ||
| + | iProduct = 0x0002 | ||
| + | iSerialNumber = 0x0000 | ||
| + | bNumConfigurations = 0x0001 | ||
| </ | </ | ||
| + | |||
| + | The key take away points here (other than obvious things like the power setting) are: | ||
| + | |||
| + | * The cfg=255 from usbconfig indicates that the device was not initialized correctly. | ||
| + | * idVendor and idProduct (not iProduct) are the vendor and product ids, used in a number of places like setting quirks | ||
| + | |||
| + | ===== HPSUSB FAQ ===== | ||
| * Q: I see the following error and USB stops working "Page offset was not preserved!" | * Q: I see the following error and USB stops working "Page offset was not preserved!" | ||
| Line 50: | Line 66: | ||
| * Q: I can't boot my Freesbie using USB2. | * Q: I can't boot my Freesbie using USB2. | ||
| * A: Update your sources, this issue is fixed. | * A: Update your sources, this issue is fixed. | ||
| + | |||
| + | * Q: Screen updates in X11 are slow/ | ||
| + | * A: Ensure your kernel/ | ||
| * Q: My mass storage device is not working, what can I do? | * Q: My mass storage device is not working, what can I do? | ||
| Line 55: | Line 74: | ||
| < | < | ||
| - | # 1) Unload "usb2_storage_mass" if it is loaded. | + | # 1) Unload "umass" if it is loaded. |
| # 2) Plug your device. | # 2) Plug your device. | ||
| # 3) You might have to add a new entry for your device in / | # 3) You might have to add a new entry for your device in / | ||
| Line 63: | Line 82: | ||
| usbconfig -u 4 -a 7 dump_device_desc | usbconfig -u 4 -a 7 dump_device_desc | ||
| - | # 5) Try adding an entry in the quirktable in /sys/dev/usb2/storage/umass2.c. | + | # 5) Try adding an entry in the quirktable in /sys/dev/usb/quirk/usb_quirk.c . |
| # Look at the other quirks for examples. | # Look at the other quirks for examples. | ||
| </ | </ | ||