Shop OBEX P1 Docs P2 Docs Learn Events
Beagle USB Protocol Analyzer - Opinions? — Parallax Forums

Beagle USB Protocol Analyzer - Opinions?

I've got some old hardware I'm trying to reverse engineer the communications protocol on (it's an old cryogenic magnetometer). It's serial comms between the current control computer and the magnetometer, demagnetizer, and sample handler unit. There are serial to USB dongles connecting each unit to the computer. I'm planning on upgrading all of the control software and the protocol documentation is..... incomplete at best. It's all ASCII characters it appears though. Any opinions on USB protocol analyzers to sniff on this stuff? I want to use hardware as getting a software sniffer on the computer could be problematic. Does anyone have a unit they like? I've been looking at the Beagle 12: https://www.totalphase.com/products/beagle-usb12/ and it seems pretty slick. All of the comms are sub 115200 baud, most 9600.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2018-07-01 00:02
    Wouldn't a USB protocol analyzer complicate things? Your devices are serial, after all, and you really don't need "USB descriptor parsing"; so a serial sniffer might be simpler and more appropriate. For that matter, you could roll your own with a Propeller chip.

    -Phil
  • jmgjmg Posts: 15,144
    geo_leeman wrote: »
    There are serial to USB dongles connecting each unit to the computer..... All of the comms are sub 115200 baud, most 9600.

    As Phil says, you do not need a USB parsing system.
    A logic-analyser that includes a 2 channel Serial (UART) decoder could be useful, but I'd experiment with something like a FT2232H.
    That allows dual serial RX, so you can sniff on serial both ways, and the HS-USB allows time-stamps to around 125us, which may be enough to 'line up' any Send and Respond packets. (you have low baud rates)
    Once you have that, you can start to replace the 'send' packets with your own, sent via FT2232H, and confirm you get the same responses, then vary the sends to see if there are hidden commands that could be useful.

    Does this have a calibrate/setup mode that you need to include ?

  • All of the calibration is done in software, I really just need to see what commands the host computer sends to get the data and how it's coming back. While I'd love to roll a solution, I doubt it'd be more time/cost effective than a plug-in solution. I also found this https://www.stratusengineering.com/product/ez-tap-pro/ but it's almost as expensive as the Beagle.
  • jmgjmg Posts: 15,144
    geo_leeman wrote: »
    All of the calibration is done in software, I really just need to see what commands the host computer sends to get the data and how it's coming back. While I'd love to roll a solution, I doubt it'd be more time/cost effective than a plug-in solution.
    Depends on what mix of sniff and code testing you expect to run, I guess.
    A system where you can start to Transmit test commands, could be useful.
    What do you ultimately want to run your new host code on ?


    In another forum, I came across this link - SW for $10/month..
    https://sysprogs.com/w/turning-the-cypress-super-speed-explorer-kit-into-a-continuous-200mss-logic-analyzer/
    works with this Superspeed USB module, so they claims 200Msps - hard to beat raw USB speed...
    https://www.digikey.com/products/en?keywords=CYUSB301X $46

    or, at the very bottom end, you have eBay 24MHz capture rate models ~ $10
    https://www.ebay.com/itm/Blesiya-24MHz-8CH-USB-Logic-Analyzer-for-Arduino-Debug-SPI-I2C-UART/253548115450
    or mid-scale 16M sps and 3M analog.. sub $30
    https://www.ebay.com/itm/I2C-SPI-CAN-Uart-LHT00SU1-Virtual-Oscilloscope-Logic-Analyzer-KL/223004596158
    You would probably want to check the software before buying on those...

  • The new host will be an i5 running a QT GUI. I really just need to watch the transaction between the current host (old old old machine) and the hardware. I'd be very surprised if there is more than a transaction a second as this is not complex equipment really. It's just amazing to me how poor the documentation is.

    I really would like a plug-in solution to put in line with the current hardware without requiring any opening of equipment. I will have a rather short time in the lab with it and speed is more essential.
  • jmgjmg Posts: 15,144
    geo_leeman wrote: »
    I really would like a plug-in solution to put in line with the current hardware without requiring any opening of equipment. I will have a rather short time in the lab with it and speed is more essential.

    That makes the EZ-Tap Pro you linked above quite a good solution. Can you download and check the SW before hitting buy ? Especially around logging to files.
    Very old systems might be using 9-bit UART modes, and/or HW handshakes lines as MUXes, so a time stamp is a good solid base.

    If you need something a PC can access, with standard DB9 connectors, you could add to the tool box items like
    XR22802IL56-0A-EB (Dual UART, HS-USB)
    XR21V1414IM-0B-EB (FS_USB, Quad UART, 9 bit mode)
    XR21V1412IL-0B-EB (FS_USB, dual UART, 9 bit mode)
    XR21B1422IL40-0A-EVB as above, but may have enough patch-panel stuff to loop through ?
    XR21V1410IL-0B-EB (FS_USB, single UART, 9 bit mode)
    CP2102N-EK (FS_USB, single UART)
  • EZ-Tap might be the easiest solution here, though it's nearly as much as the Beagle. I'll update after I get one and use it on the system!
Sign In or Register to comment.