This is an old revision of the document!
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.
- Low Speed USB
- Full Speed USB
- High Speed USB
- Super Speed USB (not supported yet)
- Wireless USB (not supported yet)
This page describes HPSUSB/'USB2' which is available in FreeBSD 8-CURRENT. The USBTODO page lists any known items that need fixing.
HPSUSB FAQ
- Q: hald is using 100% CPU
- A: Update to the latest hald port
- Q: xsane does not detect my scanner
- A: You need to re-link xsane to use /usr/lib/libusb20.so which is now part of the base distribution.
- Q: Do I need to recompile the software before it can use libusb20 instead of libusb-0.1.x?
- A: No, libusb20 is binary compatible with libusb-0.1.x.
- Q: How do I re-link an application to use libusb20?
- A: Add “-lusb20” when linking or try one of the following two solutions:
# # Alternative 1 # Add the following lines to "/etc/libmap.conf" # libusb-0.1.so libusb20.so libusb-0.1.so.8 libusb20.so.1
# # Alternative 2 # Run the following commands like SuperUser: # mv -i /usr/local/lib/libusb-0.1.so.8 /root/ mv -i /usr/local/lib/libusb.a /root/ ln -s /usr/lib/libusb20.so.1 /usr/local/lib/libusb-0.1.so.8 ln -s /usr/lib/libusb20.a /usr/local/lib/libusb.a
- Q: I see the following error and USB stops working “Page offset was not preserved!”
- A: Update your sources, this issue is fixed.
- Q: I can't boot my Freesbie using USB2.
- A: Update your sources, this issue is fixed.
- Q: My mass storage device is not working, what can I do?
- A: If your mass storage device needs a quirk, because it does not conform to the SCSI specification you can add it in the following way:
# 1) Unload "usb2_storage_mass" if it is loaded. # 2) Plug your device. # 3) You might have to add a new entry for your device in /sys/dev/usb/usbdevs . # 4) To get the VID+PID for your device you run "usbconfig -u X -a Y dump_device_desc" # where X and Y are the numbers reported by ugen. # For example: usbconfig -u 4 -a 7 dump_device_desc # 5) Try adding an entry in the quirktable in /sys/dev/usb2/storage/umass2.c. # Look at the other quirks for examples.