This is my first post on this forum

Introduction
I’m a Computer Science student and recently got into Raspberry Pi. It’s been a very exciting journey so far learning about physical computing and the Linux kernel!
I’m having trouble getting the Raspberry Pi to recognize a cheap USB hub + ethernet dongle. Interestingly, it is correctly recognized on a Windows and a macOS machine. Also, it seems like other users successfully use the same dongle on their Raspberry Pis.
I have already ordered a more expensive dongle, but I just kept wondering what it might have been that caused the issues I’ll describe below. Given I already considered the Pi as a venture into the lands of physical computing, I figured I might as well take this mysterious USB dongle issue as another opportunity to learn more about the hardware side of computers, about electronics and about the Linux kernel.
As I unfortunately still don’t know much about electronics and the Linux kernel, I decided to ask here on the Forum. I’m already looking forward to learning from you

The challenge
Now about the problem: I purchased a USB hub that has an ethernet adapter built in. The same dongle seems to be available from multiple vendors on the Internet, for just a few dollars. The product is unbranded, the only label it carries says "1PortUSB Network with 3PortUSB HUB". The PCB inside is labelled "QTS308-6".
Reading the reviews for the device, I was confident its cheap ethernet chip would provide the Raspberry Pi with a network connection, albeit at slow speed.

Unfortunately though, I could not get the ethernet to work on a RPi Zero nor a RPi 3B+. Interestingly, the hub component of the dongle is listed in lsusb (and devices attached to it work), but not the ethernet chip that is effectively pre-soldered to one of the hub’s downstream ports.
At this point, I already assumed that the ethernet chip was just faulty, but it got a bit more interesting:
The very same adapter works on a Windows machine just fine, and is also correctly recognized by a macOS computer (although macOS doesn’t seem to have drivers for the ethernet chip).
Additionally, I found the RPi correctly detects the ethernet chip when started with dwc_otg.speed=1 in the cmdline.txt, which I found very interesting. (I couldn’t get any keyboard or mouse working while enforcing USB1.1, so that wasn’t really a fix for the problem)
As the reviews found online eg for http://a.co/d/dDFxqej suggest, the (likely) same adapter (just with micro USB plug instead of normal USB) is working fine with the RPi for some users, but others seem to have similar issues.
Setup
I tested on a Pi Zero and on a Pi 3B+, with two different power supplies.
I always connected the dongle directly into the Pi. I also tried supplying power to the hub via the barrel socket, but the result didn't change.
I’m running a fresh install of Raspbian, with newest kernel:
Code: Select all
uname -a
Linux raspberrypi 4.14.78-v7+ #1156 SMP Tue Oct 23 14:34:39 BST 2018 armv7l GNU/Linux
Investigation
When the dongle is attached to the Raspberry Pi, the following kernel messages are logged:
Code: Select all
[ 68.131540] usb 1-1.3: new high-speed USB device number 8 using dwc_otg
[ 68.262202] usb 1-1.3: New USB device found, idVendor=1a40, idProduct=0101
[ 68.262217] usb 1-1.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 68.262225] usb 1-1.3: Product: USB2.0 HUB
[ 68.265403] hub 1-1.3:1.0: USB hub found
[ 68.266375] hub 1-1.3:1.0: 4 ports detected
[ 68.581541] usb 1-1.3.2: new full-speed USB device number 9 using dwc_otg
[ 68.681553] usb 1-1.3.2: device descriptor read/64, error -32
[ 68.901535] usb 1-1.3.2: device descriptor read/64, error -32
[ 69.121531] usb 1-1.3.2: new full-speed USB device number 10 using dwc_otg
[ 69.221528] usb 1-1.3.2: device descriptor read/64, error -32
[ 69.441534] usb 1-1.3.2: device descriptor read/64, error -32
[ 69.561630] usb 1-1.3-port2: attempt power cycle
[ 70.221589] usb 1-1.3.2: new full-speed USB device number 11 using dwc_otg
[ 70.661591] usb 1-1.3.2: device not accepting address 11, error -32
[ 70.761596] usb 1-1.3.2: new full-speed USB device number 12 using dwc_otg
[ 71.201611] usb 1-1.3.2: device not accepting address 12, error -32
[ 71.201718] usb 1-1.3-port2: unable to enumerate USB device
lsusb only reports the hub, but not the ethernet chip:
Code: Select all
Bus 001 Device 008: ID 1a40:0101 Terminus Technology Inc. Hub
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x1a40 Terminus Technology Inc.
idProduct 0x0101 Hub
bcdDevice 1.00
iManufacturer 0
iProduct 1
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12
Bus 001 Device 005: ID 0424:7800 Standard Microsystems Corp.
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 0
bDeviceProtocol 255
bMaxPacketSize0 64
idVendor 0x0424 Standard Microsystems Corp.
idProduct 0x7800
bcdDevice 3.00
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 39
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 255
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 4
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 2 TT per port
bMaxPacketSize0 64
idVendor 0x0424 Standard Microsystems Corp.
idProduct 0x2514 USB 2.0 Hub
bcdDevice b.b3
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 41
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 1 Single TT
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 2 TT per port
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 2 TT per port
bMaxPacketSize0 64
idVendor 0x0424 Standard Microsystems Corp.
idProduct 0x2514 USB 2.0 Hub
bcdDevice b.b3
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 41
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 1 Single TT
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 2 TT per port
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 4.14
iManufacturer 3
iProduct 2
iSerial 1
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12

A screenshot of the captured USB communication between the dongle and the Raspberry Pi. The selected packet is the device descriptor response that contains the Broken pipe status.
So, it seems like the issue must be somewhere on the lower (physical) layer.
Digging through the kernel source code, I recompiled it with verbose logging in the dwc_otg module, but I couldn’t make any sense of the tons of information it logged. At least I couldn’t find any big red warnings.
I then cracked open the casing of the adapter to have a look at its internals. Inside, I found a PCB labelled "QTS308-6". On the PCB:
- A USB hub chip labelled SL2.2s USB 2.0 HUB TT0509A18
- An ethernet chip labelled CoreChip SR9700, which seems to be a cheap copy of the Kontron DM9601
- A crystal (oscillator? resonator?) near the USB chip, labelled 12 000, which probably means 12 MHz
- Another crystal, near the ethernet chip, unlabelled
- 2 LEDs
- Lots of resistors and capacitors

The bottom of the dongle's PCB. On the left is the ethernet port, on the right you can see the cables to the USB plug. The left chip is the ethernet chip, the right one is the hub chip.

The top of the dongle's PCB. The crystal on the right is labelled 12 000. The one on the left isn't labelled. The black cube at the very right is a barrel-type socket for an optional power supply.
I was able to find the datasheet of the CoreChip ethernet chip: https://wenku.baidu.com/view/075fe3d258 ... 666cf.html
From there, it seems like the unlabelled crystal is 25 MHz.
Questions
My current theory is that the 25MHz crystal is probably not exact enough to derive a USB clock that meets the specs. Probably, the RPi is more picky about the timing of USB accessories than the macOS and Windows machines I tested.
However, the ethernet chip operates at USB 1.1, so I guess timing should not be that much of an issue at this low speed. Additionally, this wouldn’t explain why it works when enforcing USB 1.1 on the Pi.
At this point, I don’t really intend to fix the dongle (As mentioned, I already ordered a replacement). Rather, I’m curious about the possible causes for this odd behavior. I’m hoping to learn more about the internals of electronics.
Now, I am wondering:
- What could be causing these issues?
- Why is the ethernet chip recognized on Windows and macOS, but not on the Pi?
- Why is the ethernet chip recognized when enforcing USB 1.1 with dwc_otg.speed=1?
- Why is the (supposedly) same dongle working with the RPi for some people?
Any ideas are greatly appreciated!
