|
From: Douglas S. B. <db...@br...> - 2004-01-07 21:03:47
|
libusb-developers, I'm just setting out to reverse engineer a robot that has a proprietary USB interface. The first goal is to figure out how to send it commands to make it move (it has two stepper motors, each controlling a wheel). I'm new to USB programming, and after looking at many interfaces, I'm trying libusb. Trying the tests/testlibusb program that comes with libusb-0.1.7, I'm able to see the robot USB data somewhat. But I get errors whenever I try to read a string (manufacturer, vendor, or serial number). I've traced it down to the line: ret = ioctl(dev->fd, IOCTL_USB_CONTROL, &ctrl); in linux.c in the function usb_control_msg() which returns -1 on reading the strings (other functions seem to work). I'm running RedHat 9.0, kernel 2.4.20-28.9smp. Some questions: 1. Is this the right project for the job (being that I'm not that experienced with USB programming)? Should I consider using usbserial? Or something else? 2. If this is the right project, can someone help with the above error? 3. Where do I go from here? Additional data: I can see the strings if I: $ cat /proc/bus/usb/devices T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=deee ProdID=0300 Rev= 2.00 S: Manufacturer=Evolution Robot S: Product=ER1 Control Module v1.0 S: SerialNumber=ER1U1F73 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms Any pointers would be much appreciated! -Doug -- Douglas S. Blank, Assistant Professor db...@br..., (610)526-6501 Bryn Mawr College, Computer Science Program 101 North Merion Ave, Park Science Bld. Bryn Mawr, PA 19010 dangermouse.brynmawr.edu |