Electronics > Projects, Designs, and Technical Stuff

Low-cost LS/FS/HS USB sniffer with Wireshark interface

<< < (4/4)

ataradov:
The point here is that sniffer itself just observes the VBus, you still have two sides and they will have whatever capacitance they have. There is no UFP or DFP here, the sniffer is just a tap that should be non-intrusive as much as possible.

The order does not really matter, but it is logical to have the device powered first before the target interface is powered.  In practice it works either way. I'll add that to the readme a bit later along with the settings dialog stuff.

What would prevent devices from working for sure is not powering the PC side at all, since ESD diodes in the PHY and comparators would clamp the data lines.

Adding series resistors before the comparators is not a bad idea as far as shooting in the dark goes. I will definitely try that mod. A bit later though, I just returned from a trip.

And there is obviously no controlled impedance anything here, I just put down the traces. I'm not sure it matters all that much. A typical USB 2.0 front panel connectors on PCs go though 0.1" IDC connector, I doubt it has ideal impedance control.

It is hard to tell what may be going on without using proper measuring equipment, which I don't have.

ataradov:
I added usage information to the readme.

I also did some experiments with proposed changes. I added 510 Ohm resistors before the comparators. I cut the trace close to the connector pins on the existing board. I also drilled out the short layer jump on the DM line and replaced it with 0 Ohm resistor.

None of that had any perceivable effect.

But I also ran into some strange effect that I can't fully explain.  I use Lenovo ThinkCentre mini PC. It has USB ports on the front and in the back. I tried with USB stick directly plugged into the sniffer and an Android phone plugged using another USB cable.

At first I tried back USB for the data interface and front USB for the target interface. Back USB uses the same Chinese flexible cable. With flexible cable for the target interface, devices fail to enumerate. With a good cable, both devices work as expected and the capture works fine.

But then I tried to reverse the connectors using back USB as a target interface and the front USB as a data interface. With this change and both "bad" cables, it all worked as expected.

As far as I can tell all of those USB connectors are attached to different ports of the same root hub. So, it looks like there are a lot of things stacking up to cause marginal behavior.  Routing of the USB connector inside the PC to the front panel, bad cables, losses introduced by the sniffer itself.

It is really hard to tell what exactly going on without proper equipment. But it does not look like there is a simple solution to this. Even improving impedance matching in the sniffer may not help, so using the best cables and trying different ports in case of issues may be necessary.

ataradov:
I've been told that a version of  this sniffer is available for sale https://www.aliexpress.us/item/3256806174548913.html

They did communicate with me and we discussed the changes compared to the original design.  But I was not directly involved in the modifications nor have I evaluated the changes. But they do look reasonable.

Note, just to be safe, I would replace the firmware and FPGA binaries with the ones from GitHub.

voltsandjolts:
In another thread, Alex said


--- Quote from: ataradov on January 11, 2025, 03:57:37 pm ---Note that there are a number of vendors selling assembled boards of my design on AliExpress. I don't endorse any of them, but I did evaluate this one https://www.aliexpress.us/item/3256807265784243.html and out of all of them, I can recommend it. It uses correct speed grade FPGA (actually higher than needed) and the performance seems to be as good. The only thing it is missing is a trigger input. It is rarely needed, but still.

--- End quote ---

I went ahead and bought from that link. Arrived well packed in a sturdy cardboard box. Build quality looks good, and with grade 6 fpga. Pic attached.

Tested fine with FS but have yet to try HS. To be honest, I've only ever done FS as I mostly use low-end mcu's. With the wireshark integration, this is a very useful tool. I have yet to explore the wireshark usb filter options (dfu, usbcom, ftdi, ccid, hid....) and try the custom python dissectors.

Big tip-of-the-hat to you Alex!

Navigation

[0] Message Index

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod