EZ-USB FX2 how to develop a useful driver

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

  Hi

   

I am a young software developer 28 5 years as a pro. (C#.NET)

   

I am having a camera (Orion Starshoot Deep Space Imager) which i am trying to write a linux driver to.

   

Because it dos not have a linux driver.

   


 

   

I known from windows that it use the EZ-USB FX2. The installer installs it when I use the software

   

in windows.

   

If i open the cam (with a screwdriver) i can se that it has the CY7C68013A-100ACX chip.

   

Which i a low powered chip for commercial use.

   

The cam is from Optronic Technologies.

   

I have try to read some documentation on it but i have many unsolved questions.

   

I think that you clever people can answer them.

   

 

   

Here they come:

   

Is the EPPROM filled with firmware when the device is bought or is the firmware loaded from the PC into the device each time it is pluged in?

   

Is a EPPROM a solid state memory which hold the firmware, in my case the firmware from optronic?

   

When the documentation state that it is possible to upload and download firmware to the device how are the words used? Is the word downloading meaning from the host pc into the device, and uploading from the device to the host pc?

   

I have maneged through LibUsbDotNet to communicate to the device. For instance get descriptors and changing a few values. But I can se that the VID and PID is changed when i am plugin in the device into my PC (Running Linux with Virtual Box with XP with EZUSB software) If Virtualbox is closed it does not perform the enumaration, but is I start up VirtualBox with windows XP on, it does the enumeration. I think that I am only communication with the default hardware in the device not through the software firmware. 

   

Now I would like to know. The firmware to the cam change the cams behavier, like differents endpoint and requests, right? but where is this firmware placed are it placed in the cam (EPPROM) or is it downloaded. If it is downloaded to the device each time. Where can i find the correct firmware for my device? Which I can load in to the device before i start the normal communication through the usb command?

   

It will be much more easy if i could just snif the communication from windows to the device and then in linux sending the same command through lib usb. But that requere the same behavier from the cam.

   

Dont you think it is possible for me to actually do it? 

   

Where should I start...?

0 Likes
4 Replies
Anonymous
Not applicable

 Hello,

   

 

   

Let me try to anwer your queries one by one :

   

 - As you gueesed, the word downloading meaning from the host pc into the device, and uploading from the device to the host pc.

   

- Now about the enumeration and where the firmware is stored: As you said, the enumeration is happening only when you open the EZ-USB s/w in Virtualbox (please correct me if I misunderstood you), we can make out that the firmware download is happening only as you open that host app. So, I don't think the fw image resides in the EEPROM. If at all, the first byte is not equal to 0xc2. In order  to know what exactly is happening I think you will need to take a trace of the USB traffic while enumeration. If you can attach that here, we can tell you exactly what is happening. What I think might be happening is that the fw download is happening over the USB, as is initiated by the host app. 

   

- I would like to know which EZ-USB software you metioned about. If it is any Cypress provided s/w, we can tell you what exactly is happening.

   

- Also, USB trace of the traffic would help you in sniffing what is happening at the bus level, and understand what are the sequence of commands/responses flowing.

   

 

   

Regards,

   

Gayathri

0 Likes
Anonymous
Not applicable

 Hello

   

Thanks for the answer.

   

I dont know where the software exactly is from. 

   

I know the default installer in windows installs the EZ-USB FX2 driver. And inside the cam i can find a CYC768013A chip.

   

I have sniffed the usb traffic in wireshark from my linux install while virtualbox was running some of the time.

   

If any of this is not legal please say it. I am only doing this for private studie.

   

 

   

I have attached the captured file from wireshark

   

Please help me interpret what exactly is happening. I would like to do this in linux with libusb. I am a pro c#.net developer. So i just need solid help with the USB talking....

   

 

   

Short description af which packets is recieved and send and on which event.

   

   

Cam pluged in 1-43

   

Virtualbox started in my ubuntu 44 - 1125

   

Mounting the usb driver fx2 in virtualbox 1126 - 1153

   

Opening Astronomy software in xp (inside virtualbox) 1154 - 1155

   

Capturing a 1 secound image light raw file 1156 - 1345

   

   

 

   

Hope you understand.... And hope you can help

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

 Sorry forget the file. here it is!

0 Likes
Anonymous
Not applicable

 Hi,

   

You're trying to reverse engineer someone elses design. I don't think it is legal without consent from the manufacturer of the design.

   

Regards,

   

Anand

0 Likes