Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: USB protocol analyzer test bed

  1. #1
    Junior Member
    Join Date
    Oct 2019
    Posts
    3

    USB protocol analyzer test bed

    Teensy newbie. I want to setup a usb testbed for the following:
    HP PRODESK 600 G1 SFF PRODUCT - # K1K49UT#ABA
    USB v2.0 PORTS BACKPLANE BLK - 4
    USB v3.0 PORTS BACKPLANE BLU - 2
    RJ45 ETHERNET PORT - 1
    PRINTER 1 - EPSON TM-L500A USB v2.0
    PRINTER 2 - EPSON TM-L500A USB v2.0
    PRINTER 3 - OKI 321 DOT MATRIX PRINTER
    BAR CODE SCANNER
    OS - Windows7
    ===========================================
    I would like to capture traffic as follows:
    * PC USB v3.0 TO PRINTER 1 USB v2.0 PORT
    * PC USB v3.0 TO PRINTER 2 USB v2.0 PORT
    * PC USB v3.0 TO PRINTER 3 USB v2.0 PORT
    * PC USBv3.0 TO BAR CODE SCANNER v2.0 PORT
    * PC ETHERNET PORT TO ETHERNET SWITCH PORT ===========================================
    I can capture TCP/IP packets via wireshark.
    I do not know how to capture USB comms.
    I would like to document baseline comms for 17 different applications.
    When the developer rolls-out an app update with unintended consequences, I would like to capture and document what’s different when I roll-back the update thank you.

  2. #2
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Location
    Florida
    Posts
    379
    Wireshark can capture usb packets as well, but this seems unrelated to this forum.

  3. #3
    Junior Member
    Join Date
    Oct 2019
    Posts
    3

    Teensy Hardware-Based USB Testbed

    Teensy newbie. I want to setup a Teensy HARDWARE-BASED USB TESTBED to capture USB comms on the following:
    1 - HP PRODESK 600 G1 SFF #K1K49UT#ABA WIN7
    4 - USB v2.0 PORTS BACKPLANE BLK
    2 - USB v3.0 PORTS BACKPLANE BLU
    2 - PRINTERS - EPSON TM-L500A USB v2.0
    1 - PRINTER - OKI 321 DOT MATRIX PRINTER
    1 - BAR CODE SCANNER
    ====================================
    I would like to capture traffic as follows:
    * PC USB v3 TO USB v2 PRINTER 1
    * PC USB v3 TO USB v2 PRINTER 2
    * PC USB v3 TO USB v2 PRINTER 3
    * PC USB v3 TO USB v2 BAR CODE SCANNER
    ====================================
    I do not know how to capture USB comms w/Teensy,
    but with TCL/IP packet capture,
    the network adapter is put into promiscuous mode.

    Can Teensy be used to see and capture USB traffic?
    Looking for guidance on which Teensy hardware and software to purchase
    I would like to document baseline comms for print functions on 17 different applications. thank you.

  4. #4
    Junior Member
    Join Date
    Oct 2019
    Posts
    3
    Thanks, I removed unrelated and asked the direct question.

  5. #5
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Location
    Florida
    Posts
    379
    Straight out of the box it would not be able to do this, you would have code it to be able to emulate what’s on the second USB port and forward all the information to the first USB port, this would be easier achieved with Wireshark without buying anything since it can already do this. While it’s fully possible it would take a significant rewrite of the current files in order to do it, but there’s no reason to go with a hardware device to sniff usb traffic if your computer already has software that can do it directly with no issue.

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,547
    Hardware capture there are ones like https://www.totalphase.com/products/beagle-usb480/
    Or more expensive ones that can maybe do usb 3...

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,680
    Quote Originally Posted by fxaucedo View Post
    Can Teensy be used to see and capture USB traffic?
    Just to make sure you get a clear answer, no, Teensy's USB port does not work that way.

    For capturing USB packets, you have roughly 3 options.

    1: Run software-only capture on the same PC. This is free or very cheap. It can't capture many types of mal-formed packets and transfers. The timing precision is low. It can't monitor between a board like Teensy and other devices. But if you are monitoring already-working USB devices or experimental devices built with already-debugged USB code, which are only connected to your own PC, this can give pretty good results.

    2: Use a mature, stable, well supported hardware analyzer. The Beagle480 from Total Phase is the one I use. It works very well. You can use a 2nd computer to capture, which avoids loading the machine under test. The downside is the cost. Beagle480 sells for $1200. They also have USB3 models starting at $5000, but if your devices are USB2 then you don't need that, since they'll only use the USB2 part of the USB3 connector.

    3: Use an experimental, (probably) not-so-stable open source hardware analyzer. The oldest and probably best of these is OpenVizsla. It's hardware is similar to Beagle480. Only several hundred of these were ever made. It was originally a Kickstarter campaign, perhaps the oldest one to be reputed for delivering spectacularly late. The original creator lost all the money, then spent years of tough work to do the project anyway and managed to manufacture the boards with some sponsorships (which is why the PCB has about as many corporate logos as Nascar racing). Sadly, he pass away years ago.

    Recently Kate Temkin and Mikaela Szekely have been developing a new lower cost analyzer (without the DRAM buffer) named Rhododendron, which will be a shield for the Great Scott Gadgets GreatFET board. They've also been working on open source software to support various USB capture hardware. It's still a very long way from the capability you get from Total Phase, but it does give hope for the future. Rumor also has it that NewAE Technology (makers of ChipWhisperer) may be working on a product called PhyWhisperer, which will someday work with their software. As far as I know, except for OpenVizsla and the code currently on github, today this stuff is all still in development and not yet available.
    Last edited by PaulStoffregen; 10-20-2019 at 09:28 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •