10

I wanto to capture and then process the USB data that is sent from a computer to a USB printer.

I know that there are several software sniffers like Wireshark that can do that. But I need a hardware solution that does the capture and sends the captured packets to another computer. But a Beagle is too expensive. And apart from that I need to process the captured data in my own code. It would not serve me to have a professional software that only shows me the captured packets on the screen.

A comercial solution would be possible if costs less than $200.

It could also be a PCI card that is designed to capture USB signals together with an API that allows me to access the captured data.

But it would be perfect if this would be possible with a cheap USB capable hardware like any of the Arduino flavors or a Teensy and an open source library. Some of these microcontrollers support to act like USB host and client. So I suppose that they have also the capabality to just listen to the packets that go over the cable.

But I could not find any libraries for that purpose. I found sourcecode for keyloggers via PS/2 but I could not find any similar project to capture USB.

enter image description here

2
  • I'ld try asking on adafruit forums or on reddit. Sorry I can't help you. Commented May 24, 2016 at 22:54
  • These days hardwarerecs.SE would be another place to ask these questions. But it's also on-topic here, I'd say.
    – 0xC0000022L
    Commented Feb 1, 2019 at 12:59

4 Answers 4

8

Expensive commercial solutions: Beagle (400€), Ellisys (800 - 3200€), MQP, International Test Instruments (600€), Teledyne Lecroy (1000€), USBeee (1000 - 2000€).

Cheapest commercial solution I found : Keelog Morphstick, 125€, which is within your budget.

DIY solutions:

You might also dig into "USB over IP".

7

It doesn't quite meet your price limitation, but since nobody else had jumped in, it is probably worth mentioning:

I've used various versions of the Teledyne LeCroy USB Protocol Analyzers, and they would meet your needs from a capture and download/analyze perspective. I've seen used versions of the older "CATC USB Chief" but they are still about 2x of your target.

From a functionality perspective, it works like your diagram above; and it is possible to have Computer 1 and Computer 2 be the same box (you end up with two USB cables going to the PC). They are able to capture HID, mass storage, and isoc data. Although make sure you also pay attention to the USB version of your device, as the older capture hardware won't support all the new protocols / speeds.

6

Another Hardware Packet Sniffer for USB is the ezSniffer ($79) 1. It works with Full Speed and High Speed devices and there's a Python example for analysis.

1
1

My answer is slightly late, but you can check this list: https://sigrok.org/wiki/Supported_hardware#Logic_analyzers

They have support for multiple analyzers, and many of them have cheap Chinese clones. You need ones that can support >= 50 MHz sample rate.

For example, I am successfully captured FullSpeed USB (12 Mbits/sec) with Chinese Saleae Logic 16.

1
  • Your link points to a logic analyzer, not a USB sniffer! The only thing that I see that is related to USB is this: sigrok.org/wiki/Protocol_decoder:Usb_packet But the page is empty. So this software seems highly unprofessional to me.
    – Elmue
    Commented Oct 30, 2023 at 20:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.