LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-14-2010, 06:02 AM   #1
RichardUK
Member
 
Registered: Jan 2009
Posts: 32

Rep: Reputation: 16
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.
 
Old 12-14-2010, 02:47 PM   #2
firstfire
Member
 
Registered: Mar 2006
Location: Ekaterinburg, Russia
Distribution: Debian, Ubuntu
Posts: 709

Rep: Reputation: 428Reputation: 428Reputation: 428Reputation: 428Reputation: 428
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.
 
Old 12-18-2010, 05:21 AM   #3
RichardUK
Member
 
Registered: Jan 2009
Posts: 32

Original Poster
Rep: Reputation: 16
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
reverse engineer crypt(3) hash m4rtin Linux - Security 10 02-14-2010 05:50 PM
USB experiment board driver. Reverse engineer? TheBrick Programming 1 08-23-2006 08:18 AM
Reverse engineer classes to diagrams in php ??? ALInux Programming 1 12-28-2005 05:19 AM
Trying to reverse engineer our network :) 8webguy8 Linux - Networking 12 03-17-2004 08:46 AM
How can you reverse engineer a small C program OrganicX Programming 1 01-30-2004 08:30 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration