usbpcap icon indicating copy to clipboard operation
usbpcap copied to clipboard

Capture on PCIe MBIM card

Open janosvitok opened this issue 5 years ago • 9 comments

I'm trying to capture MBIM traffic from Fibocom L850-GL but USBPcap "does not see it". I suppose more cards with this architecture will appear in the near future.

Windows 10, 1809, 64bit.

The card's root device is attached to PCIe bus, and has "System" class. Under it there is normal USB 3 root hub (USB3\ROOT_HUB30) with USB class. USBPcap filter is listed as driver for this root hub, and its ID is added to registry during USBpcapcmd -I. The driver is also attached properly to all USB composite devices.

Problem is that there is no \.\usbpcapN device for this root hub (there are two devices for chipset's root hubs).

I suppose the problem is that usbpcap driver is not attached to root hub's parent, so it can't see when the root hub is added.

I tried to change inf file so that the driver is attached also to System devices, which prevented the machine to boot... :-)

What can be done to enable the capture from this device?

If you need any additional information or do any tests (I am able to compile driver from sources), let me know.

janosvitok avatar May 17 '19 14:05 janosvitok

Are you sure it is USB3\ROOT_HUB30 and not USB\ROOT_HUB30?

Could you please confirm that HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\USBPcap contains NonStandardHWIDs REG_MULTI_SZ with the root hub hardware ID?

Here is example from Windows 10 where the NonStandardHWIDs entry is correctly working: image

If it is not there, the value to enter can be seen in Device Manager: image

I think I should add the USB\ROOT_HUB30 to the "standard" list, as Microsoft has official driver for it for quite some time.

desowin avatar May 19 '19 17:05 desowin

I am pretty sure it's USB3\ROOT_HUB30 and also that the ID is in the registry (I've checked sources to see how the devices are found, I hope I understood it correctly), I will double check ASAP when I get access to that device.

To save us one roundtrip, what additional info do you need when both are OK? (i.e. USB3... and the ID is in the registry)? Dump some registry? Kernel dump? Device Manager content?

janosvitok avatar May 19 '19 21:05 janosvitok

The "Class Guid" Property value for the USB 3 Root Hub would be the next thing to check.

desowin avatar May 20 '19 05:05 desowin

I've checked the machine.

Summary

  • HWID is USB\ROOT_HUB30. I was wrong
  • HWID is in the NonStandardHWIDs. I was correct.

Now something I forgot to mention or didn't state clearly: In the normal case the USB root hub's parent is USB controller with device class USB. In this case the controller is PCIe device and has class System. This is the only "physical", device, all others are "virtual", created by the controller's driver.

Details

  • Device Manager screenshot
devmgmt
  • HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum dump

controlset001-enum.reg.txt

  • Another dump of device properties

fibocom.txt

  • UsbPcap registry screenshot
registry
  • UsbPcap registry dump

usbpcap.reg.txt

  • NonStandardHWIDs content

NonStandardHWIDs.txt

janosvitok avatar May 20 '19 14:05 janosvitok

Does bf759289284265ec5668ce192479a8e03d690c98 resolve the issue for you?

You have multiple entries in NonStandardHWIDs, and on my computer there was just one entry. I'll check if the code matching HWIDs handles that correctly.

desowin avatar May 20 '19 15:05 desowin

I removed all NonStandardHWIDs but the required one, and the capture port was not created either.

I suppose (knowing almost nothing about usbpcap) the problem is that there is no USB Controller above USB Root hub, so the usbpcap filter driver does not know when USB Root Hub is added, and no capture device is created.

As I wrote above, the immediate parent of USB Root Hub is a System device, and as such has no usbpcap filter driver attached.

janosvitok avatar May 20 '19 15:05 janosvitok

BTW. the IDs: Device instance path starts with USB\ROOT_HUB30, but Hardware ID starts indeed with USB3\ROOT_HUB30...

janosvitok avatar May 20 '19 15:05 janosvitok

I tried to change inf file so that the driver is attached also to System devices, which prevented the machine to boot... :-)

How did you modify the inf file? Did your change do anything more than adding USBPcap to HKLM, System\CurrentControlSet\Control\Class{4d36e97d-e325-11ce-bfc1-08002be10318} UpperFilters?

desowin avatar May 20 '19 15:05 desowin

I don't have the file anymore, but I believe that's what I did (add System class GUID). Sorry for the late response.

janosvitok avatar May 30 '19 11:05 janosvitok