USBee SX/ZX Hack

From Project Server
Revision as of 04:04, 27 July 2015 by Mike (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
USBee SX Disassembled

This is a hack I sorted out to modify USbee's SX Digital Test Pod into having all the functionality of the more expensive USBee ZX. This allows the use of a number of additional software features. So far all ZX features are working with the 'modified' SX.



After purchasing my new USBee SX, I was excited about all the capabilities it had for a relatively low price. However, like everything else in life, I was soon wondering why I couldn't have the more advanced features of the more expensive model - Especially if the hardware was apparently identical. After opening the device up, my idea was supported by the fact that the PCB of my USBee SX had the letters "ZX" printed on it. I then found a datasheet for the Cypress CY7C68013A. After deciding the hardware was identical, I was determined to find a method of accessing the software on the 8051. At first I thought it should only be a matter of acquiring the ZX firmware and loading it onto the SX's 8051. However, it would turn out to be even simpler than this. First I downloaded and read up on Cypress' USB Suite released for configuring their line of USB microcontrollers. After finding a Knowledge Base Article on Cypress' website, I learned how to use this software to reprogram the devices USB parameters - Particularly the Vendor ID and Product ID. After realizing all the USBee TestPods used the same driver and that the driver actually downloads the 'firmware' to the USBee RAM via USB, I figured 'upgrading' my device might be as simple as reprogramming the Product ID. The Knowledge Base Article described how to do just that. After some screwing around with unsigned drivers and locating the necessary HEX file, I made it happen...

Quick Concept

Turns out the USBee Test Pods appear to use relatively unmodified firmware from Cypress. This driver and software is shared by many of the USBee Pods (EX, EX2, LX, ZX, SX, BusBee, AX and DX according to USBee.inf). The PC uses the same driver for all of them, but Cypress' software uses the PID to determine which version you have. So, change the PID, change the product. Using the Cypress USB Suite, it turns out this is fairly straightforward. The basic process is outlined below:


Step 3 - Open the CyConsole
Step 4 - Run the EZ-USB Interface
Step 5 - Download the HEX file
Step 6 - Enter Parameters to Read
Step 7 - Enter the New Values
Step 8 - USBee ZX Detected

Here is the basic step-by-step. This was done on a Win7 64-bit machine, but steps for other versions should be very similar. If you run into problems with a step, check below for common errors and mistakes (I made).

  1. Acquire the necessary Software
    • USBee Suite - Download and Install
    • Vend_ax.hex (R-Click->Save Target As...)- 8051 Program for the CY7C68013A to enable Vendor Commands
  2. Get everything installed
    • Ensure you have the USBee SX drivers installed. The USB Suite still needs Windows to link the device to the Cypress Driver
    • Without the USBee SX Drivers, you'd have to use the Cypress generic driver which is not 'signed'. In Win7 this can be a huge pain.
    • Install the USBee ZX Suite (and drivers) for your soon to be USBee ZX
  3. Run "Cypress USB Console" from the Start Menu (Probably under Cypress)
  4. Once open, select "EZ-USB Interface" from the Options menu
  5. Now, Download the "Vend_ax.hex" file to the USBee
    • Click the Download button
    • Select the HEX file from the Dialog
    • Hex lines should fly by until finally the screen displays "Toggle 8051 Reset"
  6. Time to send a few test commands
    • Enter "0xA2" into the "Req" box next to the "Vend Req" button.
    • Set "Length" to 8
    • MAKE SURE "Dir" is set to "1 IN"
    • Now click "Vend Req". You should see 8 bytes of Hex codes starting with "C0"
  7. Now to business
    • Enter the new PID and VID into the "Hex Bytes" field. For the USBee ZX this is "C0 A9 08 05 00 84 23 00"
      • C0 tells the 8051 to use the next 6 bytes
      • The next 6 bytes are the VID, PID and DID. Note MSB and LSBs are swapped for each of them.
      • For USBee the DID is the "Pod Number"
    • Now change the dreaded "Dir" box to "0 OUT"
    • Click "Vend Req". You should see the bytes echoed back. Check Them!
  8. Now to try it out
    • If everything looks OK, simply unplug the USBee and plug it back in
    • Windows should inform you it is installing the USBee ZX

Saleae Logic

If you've looked into these hobby-level logic analyzers, you've probably also considered the Saleae Logic analyzer. This analyzer offers many of the same features and is probably most popular in the hobbyist world. As it turns out, the Saleae and the USBee SX/ZX share the exact same Cypress controller inside. Does that mean they could be interchangeable? So far, I tried the simple USB Vendor/Product ID swap and my PC did recognize the Saleae Logic when I connected my USBee SX. However, if the Saleae software is started, the driver crashes and Windows disconnects the device. The devices each use different drivers. However, these drivers should just load the necessary firmware after initial enumeration. Neither device has built-in firmware. Cypress' "patented technique" consists of initial enumeration which causes the drivers to seamlessly download firmware into RAM and re-enumerate as the desired device (described in Datasheet). So far I have yet to figure out why the Saleae software will not interface to the USBee while using Saleae's drivers. It's possible the process does not work exactly how I expect for both devices, or I am missing some key parameter that also needs to be changed (although it could really only be somewhere in the 128bytes of external EEPROM).

Personal tools