Recovering from a BULK IN overflow on USB 3.0

Introduction At times, an attempt to get data from a BULK IN endpoint may result in an overflow error. In other words, rc = libusb_bulk_transfer(dev_handle, (1 | LIBUSB_ENDPOINT_IN), buf, bufsize, &count, (unsigned int) 1000); may fail with rc having the value of LIBUSB_ERROR_OVERFLOW. Subsequent attempts to access the same endpoint, even after re-initializing the libusb [...]

systemd: Reacting to USB NIC hotplugging (post-up scripting)

The problem Using Linux Mint 19, I have a network device that needs DHCP address allocation connected to a USB network dongle. When I plug it in, the device appears, but the DHCP daemon ignored eth2 (the assigned network device name) and didn’t respond to its DHCP discovery packets. But restarting the DHCP server well [...]

xhci_hcd WARN Event TRB for slot x ep y with no TDs queued

What’s this? There’s a chance that you’re reading this because the message in the title appeared (or flooded) your kernel log. This post attempts to clarify what to do about it, depending on how much you want to get involved in the matter. So the short answer: The said warning message is a bug related [...]

USB 3.0 bandwidth efficiency: Looking at real-life DATA bursts

Introduction This post looks at the DATA and ACK packet exchange between a device and an xHCI USB 3.0 controller for the sake of explaining the actual, measured bandwidth that is observed on a BULK IN endpoint. And then some BULK OUT at the bottom of this post, as Bonus II. A certain level of [...]

Linux: Atheros QCA6174′s Bluetooth disappearing after reboot

When Bluetooth goes poof Having rebooted my computer after a few months of continuous operation, I suddenly failed to use my Bluetooth headphones. It took some time to figure out that the problem wasn’t with the Cinnamon 3.8.9 fancy stuff, nor the DBus interface, which produced error messages. There was simply no Bluetooth device in [...]

VIA VL805 USB 3.0 PCIe adapter: Forget about Linux (?)

TL;DR Bought an Orico PCIe adapter for USB 3.0 for testing a USB device I’m developing (PVU3-5O2I). It has the VL805 chipset (1106/3483) which isn’t xHCI compliant. So it works only with the vendor’s own drivers for Windows, which you’ll have to struggle a bit to install. Update: Be sure to read the comments at [...]

USB 3.0 device compliance test notes

Introduction While implementing Xillybus‘ USB 3.0 general purpose IP core for FPGAs, I found the USB Implementers Forum’s compliance tool handy, yet somewhat quirky, for verifying I got things right. It was USB3CV version 2.1.12.1, running on Windows 10 @32 bit. The 64 bit version works the same (I’ve tested it as well). A GPLed [...]

Soft Linux kernel hacking for dumping ULPI commands to USB PHY

Ever wanted to see how the a Linux USB host talks with its PHY with ULPI commands? Probably not. But if you do, here’s how I did it on a Zynq device, connected to an USB3320 USB 2.0 PHY chip. Note that: The relevant sources must be compiled into the kernel. Modules are loaded too [...]

HTG’s USB 3.0 FMC module: Things you surely want to know

Introduction I purchased a HiTech Global 3-Port USB 3.0 SuperSpeed FMC Module (also known as USB3 FMC), which is an FPGA Mezzanine Card, primarily based upon TI’s SuperSpeed USB 3.0 Transceiver, TUSB1310A. Even though this board works fine at the end of the day, my experience with it was full with surprises, not all of [...]

Notes on USB 1.1 low-level protocol for FPGA implementation

Introduction These are the consideration and design decisions I took when designing a transparent hub for low- and full-speed USB (that is, all covered by USB 1.1, and not high-speed as required by USB 2.0). A transparent 1:1 hub is a device with one male USB plug, and one female plug. It basically substitutes an [...]