LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Reverse engineer USB (https://www.linuxquestions.org/questions/programming-9/reverse-engineer-usb-850117/)

RichardUK 12-14-2010 06:02 AM

Reverse engineer USB
 
I've been able to reverse engineer some usb devices ok in windows but for a robot arm I have (kit from Maplin) I have been trying to create a user space Linux driver for it using libusb-1.0

My system is running Ubuntu 64bit with a 32bit Vista virtual pc. I've been trying to use wireshark and although it reads the USB OK and shows me the packets the packets contents is always the same. And if I send a packet of the same bytes from Linux nothing happens.

Anyone got any experience doing something like this with some wisdom to share? I get the feeling that I'm missing something fundamental that is preventing it from working.

Thanks,
Richard e Collins.

firstfire 12-14-2010 02:47 PM

Hi Richard.
Maybe this (see windows-related instructions) will help, assuming you use virtualbox to run windows..

Does your device recognized by linux and work well in virtual windows environment? What shows `lsusb' and `dmesg' when the device is plugged in?

BTW, I guess your device use something like usb-to-serial converter (e.g. Prolific PL2303) which should work on linux without specific drivers. In this case there is something like /dev/ttyUSB0 file to communicate with the device. Though you still have to reverse-engineer the protocol, it may happen that commands go in clear text through serial device.

Hope, this helps.

RichardUK 12-18-2010 05:21 AM

Hi thanks, I've got it working now. Seems the LibUsbDotNet does not work on my system, found a bug in the code. Maybe a 64bit thing. The deivce is from Maplin, a robot arm that uses a usb 1.1 mouse chip of all things. So no serial port showing up.

I managed to capture the packets in windows but Wireshark 'should' work. A bit odd it shows the packet head correctly but does not show the data (the bit I need), maybe another 64bit thing. I need to find their support forum and post on it.


All times are GMT -5. The time now is 06:17 AM.