Closed MartyMacGyver closed 5 years ago
One small followup: tshark -r Test5.pcap -V
produced the same peculiar output as shown above for Wireshark.
The bug is in USBPcap. It is the fact that USBD_TRANSFER_DIRECTION_OUT (0) is used as a bit mask - which makes the condition in USBPcapAnalyzeControlTransfer not working. I remember investigating this issue some weeks ago but I have no idea why I didn't fix it back then (most likely due to the fact that releasing updated driver on Windows 10 would need #57 to be fixed).
Thanks for the quick reply! I honestly thought it was some weirdness in Wireshark itself. What's the roadmap to 1.3.0.0 (or possibly 1.2.0.5)?
The Readme is a bit confusing as far as the signing situation goes (TESTSIGNING never came up for me). Not sure how that's related to your #57.
@MartyMacGyver Beginning with Windows 10 Microsoft made it mandatory for all drivers to be Attestation Signed through their portal. The first Attestation signed USBPcap driver worked fine on the portal and thus you were able to install USBPcap on your computer without test signing. However, when I was doing the 1.2.0.4 release, I noticed that the driver signing didn't pass (and thus the 1.2.0.4 installer does use 1.2.0.3 driver for Windows 10). As the 1.2.0.4 release fixed a serious USBPcapCMD issue, I decided to release it with unchanged driver. And since the 1.2.0.4 release, non-USBPcap-related things kept me busy so that's probably the reason for the bug not being fixed...
To sum it up, even if I fixed this bug, it will not possible to install it on (normal user's) Windows 10 until #57 is fixed.
Understood. Well, if you ever happen to ever have a test version to try out that a non-standard user like me could try out, I'll keep an eye out for it here. :-D Otherwise I'll keep an eye out for 1.3.0.0 (and will attempt to build this locally too).
tl;dr - I've been looking at the USB traffic to a simple little USB device (a fan with a programmable display), and couldn't figure out how the actual data was being sent. Turns out it's being captured but either the capture is wonky or Wireshark is incorrectly displaying this data.
USBpcap 1.2.0.4 (via the current version of Wireshark 2.6.4) on Windows 10 x64 shows all sorts of useful traffic:
USB_CONTROL out
,SET CONFIGURATION Status
,USB_INTERRUPT in
... but none of that appeared to have any data. In fact, other than IDs all the traffic from the host to the device (which the analyzer only showed beingUSB_CONTROL out
traffic) was basically identical.So, I gave USBlyzer a trial - it sees all that traffic, but it also sees
URB_FUNCTION_CLASS_INTERFACE
/URB_FUNCTION_CONTROL_TRANSFER
traffic right before each of thoseUSB_CONTROL out
requests:First frame, out to the device:
(I can see the raw 8 bytes in here)
Followed by another frame, also out to the device (though I'm not sure that's correct as it appears to be a response):
The raw data (e.g.,
40 23 94 84 94 84 94 27
) appears to be what I expect (the format of the data is unclear but it's not compressed and varies in a way that strongly suggests it's exactly what I'm looking for). Clearly it's going through the USBPcap driver. Neither that traffic nor that data is in the Wireshark output.That all said, I got curious and looked at the actual PCAP file in a hex editor... and there I see the those exact bytes, along with other unique patterns corresponding to the other requests I so far have only been able to view in USBlyzer.
And so I searched for that same hex data in Wireshark and also found... but as part of the URB_CONTROL in from the device, which is very peculiar (and apparently is not really what's happening on the wire). Here's an example that corresponds with the one above (I re-did the first test).
Frame from host to 1.2.0 (device):
Frame from 1.2.0 (device) to host:
So, the question I have is, where's the problem? Is this a case of USBPcap not saving the data correctly? Or is Wireshark failing to properly decode said data?
I've attached the PCAP of interest here (I'd include the USBlyzer file but it appears to have a lot more info buried in it than I'd want to post publicly - contact me if you're interested in that.)
Test5.zip
I came here first because - until I was halfway through writing this - it appeared the data wasn't getting collected to begin with. Clearly it is though but I'm not sure where the problem is. I'm also not sure what the authors of USBPcap have to do with the Wireshark side of things (especially when it comes to deciphering and displaying said pcap data). I'm happy to open this ticket up there if it's preferred.
(And as an aside my brief encounter here with USBlyzer - which hasn't been updated in years and which may not be accurately showing the direction of responses - reminds me why I like to use tools like Wireshark and USBPcap. At least here I have hope of getting an answer that may lead to an eventual fix if needed! Thanks in advance for any insight you may have on this vexing problem!)