Author Topic: Custom USB WiFi network adapter gets code 10 when connected to generic hub  (Read 12331 times)

JVB

  • Member
  • ***
  • Posts: 3
I have a custome USB WiFi network adapter that works fine when it is connected directly to a USB Root Hub, but fails to start when connected to a Generic USB Hub.

To investigate this problem, I used two Dell laptops (Latitude E6420 and Latitude XT2).   The USB network adapter always gets a "Code 10" cannot start error when plugged into any USB port on the E6420.   Looking in the Device Manager on the E6420, I see that there are two USB Root Hubs and two Generic USB Hubs.   Each of the root hubs appears to connect to one of the generic hubs.   All of the USB ports external to the laptop are connected to one of the Generic USB Hubs.

Using the XT2, when I plug in the USB network adapter it works fine.   The XT2 has 8 USB Root Hubs and no Generic Root Hubs.  So the USB network adapter plugs in directly to a root hub.   I took an "Active USB" cable and plugged it into the XT2.  It identified itself as a Generic USB Hub.   I then plugged the USB network adapter into the active cable.   The network adapter failed to start (Code 10).

This appears to be a problem in the Windows generic usb hub driver (usbhub.sys) since all the other drivers involved are the same.   This is a real problem for using the E6420 since it does not have any external ports that are not connected to a generic hub.   I am sure this affects other PCs as well.

This problem occurs on both XP and Windows 7.   Here is a portion of the setupapi.log file for XP that shows the error:

#-199 Executing "C:\WINDOWS\system32\rundll32.exe" with command line: rundll32.exe newdev.dll,ClientSideInstall \\.\pipe\PNP_Device_Install_Pipe_0.{2E4E6A75-B3F7-4519-90CA-0CC11959D1DD}
#-147 Loading class installer module for "Wi-Fi Radio USB Remote NDIS Network Device".
@ 11:58:43.041 #V286 Verification using alternate platform (Platform = 2, High Version = 5.1, Low Version = 5.0).
@ 11:58:43.119 #V132 File "C:\WINDOWS\system32\NetCfgx.dll" (key "NetCfgx.dll") is signed in catalog "C:\WINDOWS\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\NT5.CAT".
@ 11:58:43.135 #V146 Using exported function "NetClassInstaller" in module "C:\WINDOWS\system32\NetCfgx.dll".
@ 11:58:43.135 #V166 Device install function: DIF_PROPERTYCHANGE.
@ 11:58:43.135 #T152 Executing class installer.
@ 11:58:43.135 #V153 Completed class installer.
@ 11:58:43.135 #V155 Executing default installer.
@ 11:58:43.135 #I292 Changing device properties of "USB\VID_1234&PID_0001\N99999999".
@ 11:58:48.182 #I163 Device not started: Device has problem: 0x0a: CM_PROB_FAILED_START.
@ 11:58:48.182 #I307 DICS_START: Device could not be started.
@ 11:58:48.182 #V156 Completed default installer.
@ 11:58:48.197 #V166 Device install function: DIF_DESTROYPRIVATEDATA.
@ 11:58:48.197 #T152 Executing class installer.
@ 11:58:48.213 #V153 Completed class installer.

I have altered the VID and PID.

Any ideas why having a generic hub in the middle would make a difference.  I have tried both self-powered and bus-powered hubs.  Same result (colde 10).


Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
It's likely that it's a problem with the adapter. A downstream hub can use different timing than the root hub and still be compliant with the spec. If the device is high speed, the external hub reclocks the data but otherwise just repeats the data. If the device is low or full speed and the host is high speed, the external hub converts between speeds while the root hub uses the internal OHCI or UHCI host controller.

A protocol analyzer would show any problems on the bus.

Jan

JVB

  • Member
  • ***
  • Posts: 3
I don't have a hardware protocol analyzer (yet - I just ordered a Beagle 480).

Can I find out the problem using SnoopyPro?   Do you have a recommendation on a better sniffer?

The problem occurs on XP and Win7 (probably Vista too but I have not tried it).    Would I get better diag info if I used Win7?


Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Software-only analyzers can be helpful but can't show the transaction-level data on the bus.

If you're developing the adapter, use whatever debugging tools you have to monitor the traffic during enumeration.

For example, does the host send Set_Configuration with a value > 0? If not, look for problems in sending descriptors to the host.

What USB speed is the device?

Jan


JVB

  • Member
  • ***
  • Posts: 3
My company buys the adapter.  We are not developing it.

It is a full speed device.


Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
If it's full speed, the final hub does the speed conversion and might for example schedule transactions more rapidly than the host controller in the PC.

You might find a hub that the device works with and if so, it will likely work even on the PC with an internal generic hub because that hub will no longer be doing the speed conversion.

Jan