ataradov / usb-sniffer Goto Github PK
View Code? Open in Web Editor NEWLow-cost LS/FS/HS USB sniffer with Wireshark interface
License: BSD 3-Clause "New" or "Revised" License
Low-cost LS/FS/HS USB sniffer with Wireshark interface
License: BSD 3-Clause "New" or "Revised" License
For the less experienced folks (like myself) out there, would it be possible to provide a BOM & CPL suitable for use with a service like JLCPCB (which is integrated with LCSC and EasyEDA)?
Hello. Can I replace LCMXO2-2000HC-5TG100C with LCMXO2-2000HC-5TG100I ? LCSC has both of them but prices are 65$ vs 15$ correspondingly. Should I modify or recompile FPGA project if yes? Thank you!
I just assembled the board and followed the instructions to flash the device and get the desired speed of 40-50 MB/s - all good.
When connecting a usb device (mouse -> full speed) to the port I get data in wireshark, but no usb data, I only get "Syslog" entries. I have also tried different usb drives at high speed. Also the log stops after about about 1000 entries (only for high speed). I have selected the correct Capture Speed in wireshark.
All the devices I have tried works when connected through the usb-sniffer board.
I have also noticed I get VBUS OFF in one of the first entries as opposed to VBUS ON the examples under /doc.
Logs: wireshark.zip
Also only two LED's light up (LED 1 and LED 7), are the other LED supposed to light up?
As for the BOM I could not find the exact oscillators, but found others within 50 ppm:
DSC1001CI2-024.0000
DSC1001CI5-026.0000
It would be useful to have through hole pad options for the on board LEDS, once the PCB is in an enclosure the LED's are no longer visible, I can obviously modify the hardware to provide these PTH holes, it's a 2 minute job, but I figure that it might be a useful thing for other people since an enclosure protects the PCB, so I figured I'd ask here to see if threres any interest in providing these pads in the origin repo. I could solder coil wire directly to the SMD pads, but my concern there would be that it would be relatively easy to rip the pad off during later disassembly if I forget about it.
The pictures here show my case design, I could put the leds on a surface on the main body or on the end caps.
Many thanks for the brilliant project!
My device is compatible with HS and FS communication. It works in HS by default. When the HS handshake fails, it will automatically switch to the FS handshake.
I hope usb-sniffer can work in HS mode by default and be backward compatible with FS communication capture.
If working at a fixed communication speed, it will not meet my work needs in this case.
DigiKey lists as EOL:
https://www.digikey.com/en/products/detail/microchip-technology/DSC6101CI2A-026-0000/8639220
Any reason this won't work:
https://www.digikey.com/en/products/detail/microchip-technology/DSC1001CI5-026-0000/5046185
(power down instead of enable)
First, thank you for this project, this required a lot of research and work.
I see Infineon supports MacOS with the CY7C68013A MCU. You have done the heavy lifting on the FPGA, so it is a bitstream load and that seems to be through your firmware.
Are there USB requirements that are unique to MacOS?
I would just like to use my Mac with I am sniffing a connection to my Windows machine.
Thanks again for all the hard work.
Bob
Hey @ataradov - I am trying to assemble this, but running into issues with the FPGA IDCODE. Is this something you have seen before? Any tips on what could be the issue?
$ ./usb_sniffer_linux --mcu-sram usb_sniffer.bin
Uploading 3187 bytes into the FX2LP SRAM
...done
$ ./usb_sniffer_linux --mcu-eeprom usb_sniffer.bin
Error: incorrect FPGA IDCODE (0x00000000)
$
On kernel.log, I see
Jan 31 13:04:14 mbradmin-System-Product-Name kernel: [938797.213555] usb 1-6: new high-speed USB device number 25 using xhci_hcd
Jan 31 13:04:15 mbradmin-System-Product-Name kernel: [938797.361730] usb 1-6: New USB device found, idVendor=04b4, idProduct=8613, bcdDevice=a0.01
Jan 31 13:04:15 mbradmin-System-Product-Name kernel: [938797.361733] usb 1-6: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jan 31 13:04:15 mbradmin-System-Product-Name kernel: [938797.362149] usbtest 1-6:1.0: FX2 device
Jan 31 13:04:15 mbradmin-System-Product-Name kernel: [938797.362152] usbtest 1-6:1.0: high-speed {control bulk-in bulk-out} tests (+alt)
Jan 31 13:04:57 mbradmin-System-Product-Name kernel: [938840.009639] usb 1-6: USB disconnect, device number 25
Jan 31 13:04:58 mbradmin-System-Product-Name kernel: [938840.529418] usb 1-6: new high-speed USB device number 26 using xhci_hcd
Jan 31 13:04:58 mbradmin-System-Product-Name kernel: [938840.680478] usb 1-6: New USB device found, idVendor=6666, idProduct=6620, bcdDevice= 1.00
Jan 31 13:04:58 mbradmin-System-Product-Name kernel: [938840.680481] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 31 13:04:58 mbradmin-System-Product-Name kernel: [938840.680482] usb 1-6: Product: USB Sniffer
Jan 31 13:04:58 mbradmin-System-Product-Name kernel: [938840.680483] usb 1-6: Manufacturer: Alex Taradov
Jan 31 13:04:58 mbradmin-System-Product-Name kernel: [938840.680484] usb 1-6: SerialNumber: [-----SN-----]
Hi Alex, first of all thank you for this great project.
I had a hard time doing hardware debug because of these vias near FPGA pins:
Because I'm soldering manually with hot iron, the solder move very easily to these vias. I removed many components until I found this issue. After cutting the wire from C8 to 3V3 in the other side of the board the issue disappeared.
Maybe you could move the vias from C5, C7 and C9 too, because they also could end up causing similar issue.
DSC6101CI2A series OSC labled Obsolete in Digikey
and IC6,IC10 are using them
IC6 using 26Mhz only have few stock in Digikey
and the 24Mhz one currently have no stock in Digikey and Mouser
any replacement?I am currently using YXC's OSC and get some problem
in HS device,the sniffer can only detect as FS,and get a lot of error
but with ./usb_sniffer --test
I can get 44-45M/s
Hi,
I've built two boards and both works fine with low-speed and full-speed devices. However if I try to connect any high-speed device such as a android smartphone, the device cannot be enumerated (neither adb, fastboot nor serial). I checked the oscillators and they deliver 24 mhz and 26 mhz as expected, 60 mhz at the usb_clk of the usb3343. Voltage measured at vdd18 is 1.78V. Doesn't matter if the capture is on or not, the usb enumeration fails all the time and the device isn't detected.
Any ideas why the usb enumeration fails ?
Hi Alex, because that short-circuit issue under the FPGA I decided to take a different approach: starts from basic and get USB Host working first!
I soldered only the USB Host on another board (all the components of Kicad schematic page 3, the J1 connector and its resistors and IC2 regulators and its components), after that I tried to connect it to computer it was detected and almost immediately it was disconnected:
[35566.856268] usb 3-5: new high-speed USB device number 5 using xhci_hcd
[35567.072707] usb 3-5: New USB device found, idVendor=04b4, idProduct=8613, bcdDevice=a0.01
[35567.072721] usb 3-5: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[35567.224368] usbtest 3-5:1.0: FX2 device
[35567.224373] usbtest 3-5:1.0: high-speed {control bulk-in bulk-out} tests (+alt)
[35567.224434] usbcore: registered new interface driver usbtest
[35571.954145] usb 3-5: USB disconnect, device number 5
[35572.328136] usb 3-5: new high-speed USB device number 6 using xhci_hcd
[35572.544706] usb 3-5: New USB device found, idVendor=04b4, idProduct=8613, bcdDevice=a0.01
[35572.544718] usb 3-5: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[35572.545598] usbtest 3-5:1.0: FX2 device
[35572.545605] usbtest 3-5:1.0: high-speed {control bulk-in bulk-out} tests (+alt)
[35575.855084] usb 3-5: USB disconnect, device number 6
$ sudo lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 8087:0026 Intel Corp. AX201 Bluetooth
Bus 003 Device 003: ID 0c45:672e Microdia Integrated_Webcam_HD
Bus 003 Device 002: ID 27c6:63ac Shenzhen Goodix Technology Co.,Ltd. Goodix USB2.0 MISC
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$
Initially I was thinking my 24MHz oscillator was faulty, because I'm using the ECS-3225MVLC-240-CN-TR that @casandra9 suggested, but I looked at CKOUT pin in the oscilloscope and it is generating 12MHz as expected.
Did you face similar issue in the past? How to debug/fix this issue?
Hi,
I captured a device like usb printer with high speed. If I print one page with simple content, it is OK. But if I print one page with complex content,some packet lost, And some syslog message said "Hardware buffer overflow".
I have also done a transfer rate test, result is about 48MB/s.
USB 2.0 high speed can mostly reach 60MB/s, but README recommend transfer rate 40~50MB/s. If printer usb high speed transfer rate reach 60MB/s, I will always lost some packets?
Not found in readme and sch
Hi,
I've built 5pcs boards, works fine with full-speed devices.
I try to connect any high-speed device, e.g: Udisk or Card Reader。
The PC can enumeration and read/write disk, but Wireshark can't capture data.
test hardware
$ sudo ./usb_sniffer_linux --test
Starting speed test
Transfer rate: 48.05 MB/s
Transfer rate: 48.26 MB/s
Transfer rate: 48.25 MB/s
Transfer rate: 48.12 MB/s
Hi, and thanks for this cool project. I have build the hardware and programmed the MCU und FPGA. Everything worked fine until the test procedure.
I got 0.00 MB/s at the transfer speed, and i have no clue what i can do to fix that!
Could you give me a hint?
I used diamonds to regenerate the jet file of 4TG100C, and initially everything was normal. However, when I tried to measure the speed, I got a result of 0 on Windows, and Linux would directly report an error.
PS E:\USB\usb-sniffer-main\usb-sniffer-main\bin> .\usb_sniffer_win.exe --mcu-sram .\usb_sniffer.bin
Uploading 3187 bytes into the FX2LP SRAM
...done
PS E:\USB\usb-sniffer-main\usb-sniffer-main\bin> .\usb_sniffer_win.exe --mcu-eeprom .\usb_sniffer.bin
Programming 3187 bytes into the FX2LP EEPROM (SN: 443602XXXXXXXX)
...done
PS E:\USB\usb-sniffer-main\usb-sniffer-main\bin> .\usb_sniffer_win.exe --fpga-flash ..\fpga\impl\usb_sniffer_impl.jed
Programming FPGA flash
Erasing flash
Programming configuration data .....
Verifying configuration data
Programming and verifying Feature Row
Programming and verifying FEABITS
Exiting programming mode
...done
PS E:\USB\usb-sniffer-main\usb-sniffer-main\bin> .\usb_sniffer_win.exe --test
Starting speed test
Transfer rate: 0.00 MB/s
Transfer rate: 0.00 MB/s
Transfer rate: 0.00 MB/s
Transfer rate: 0.00 MB/s
Transfer rate: 0.00 MB/s
Transfer rate: 0.00 MB/s
Transfer rate: 0.00 MB/s
Transfer rate: 0.00 MB/s
Transfer rate: 0.00 MB/s
Transfer rate: 0.00 MB/s
$ ./usb_sniffer --test
Starting speed test
Error: usb_capture_callback(): 4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.