Cypress Semiconductor I2C-USB Bridge Kit Project--libUSB in Linux and Windows

Specifically, Bridge Kit model Cypress Perform CY3240-I2USB Rev*A.

I got the Bridge working in both Linux and Windows with GPL / LPGL libUSB code. I also wrote a few lines that seem vital to the process. I'll write about my Windows experience, then move to Linux. The best solution I found in Windows 7 was Leitner's code. I don't think I ever tested this beyond Windows XP SP3.

A Word on HIDs

First, I discovered that the Bridge is a Human Interface Device (HID). Below the Cypress API / ActiveX control / COM Object, the Bridge is using Microsoft drivers to connect. At one point, going back and forth between the Cypress ActiveX control and the open source code, I managed to break Windows XP's ability to recognize the device using the original proprietary drivers. I went looking for Cypress drivers, but I found four Microsoft drivers as follows. They are all localed at or under C:\windows\system32\

You might want to back those up before messing with the open source stuff. I got the drivers back by doing a System Restore. It's possible you could find them if you just looked in those folders, though. I don't think the files were erased, just disassociated with the device.

The four packages / pieces of code I used / wrote were

Prereq - Install the GPL Drivers

For Tuna's code to work in Windows, you have to run \libusb-win32-bin-\bin\inf-wizard.exe to install the libusb drivers. The Bridge has Vendor ID (VID) 04B4 and Product ID (PID) F232.

My Addition to Angry Tuna's Code

Reason for My Code Snippet

In both Linux and Windows, the Bridge using the GPL code did not automatically connect--otherwise put, the green light on the bottom of the bridge didn't turn on. If the Slave Demo Board was plugged in, the two red LEDs lit, but not the green light.

In Linux, I could get the device to connect by "echo"ing junk to /dev/usb/hiddev0 as root (I understand this is /dev/hiddev0 in some Linuxes. I'm using Ubuntu 10.10.) The command "# echo blah > hiddev0" from /dev/usb did the job. It would give me an "invalid argument" error, but the red lights turn off, the green lights come on, and the AngryTuna test worked.

In Windows, I don't think there is an equivalent of that command. Using SniffUSB (Benoit Papillault), I noticed that the Microsoft drivers read from the device after physical connection, and then the software connection takes place (green light goes on). Reading like this worked. The CDATA begin and end tags are to keep XHTML happy; they are not part of the C code.

2012/08/06 - fixed link to angrytuna. For the record, the previous link was

Valid XHTML 1.0 Strict