Hi, On Sun, Feb 09, 2003 at 03:05:09AM -0600, Caylan Van Larson wrote: > I posted the following message to linux-usb-devel a week or so ago. Sorry > for the repost/crosspost but I have not gotten anywhere with my problem.
I gave you some hints on what may be wrong with the perl script. Did you try to follow them? We did have a look at the snoopy log and I think the protocol is pretty clear. Only control tranfers, "value" is one of three different types, the control transfers readd 8 bytes of data. So the "commands" are in the "value" and the response from the device in the 8 bytes of data. Did you try to write a C program? What didn't work? It shouldn't be too difficult if you enable libusb debug and check every function for errors. The documentation for libusb is not that bad. E.g. after the loop for busses/devices open the device, claim the first interface and send a control message as you see it in the logfile. What's your current problem? > I have tried the following packages with no luck: > Perl based: > USB-0.02 > > --SNIP > $my_device = USB::usb_open($blah2); > $set_interface_results = >USB::usb_claim_interface($my_device, "0x00"); > $reset_endpoint = USB::usb_resetep($my_device, 129); > $set_config_results = USB::usb_set_configuration($my_device, >1); > $longshot = USB::usb_control_msg($my_device, 00, 02, 251, >0000, "c1799c5c", 8, 100000); > $close = USB::usb_close($my_device); > --SNAP > I could open (as in virtually) the device and close the device. But when > it came to claiming an interface it would always say "Device or resource > busy" or "Broken pipe." I've commented on this already in my last mail. Start with fixing claim_interface. > --SNIP > [root@localhost usb-robot-0.2.0]# ./usb-robot-slave product=0x08003 vendor=0x06e5 > ./usb-robot-slave: starting usb-robot version 0.2.0 > (c) 2000, 2001 John Fremlin > Licensed under the GNU Public License version 2, see file COPYING. > You didn't pay me for this program. You have no rights. > doing bus scan for: > idVendor 0x6e5 > idProduct 0x8003 > found bus 001 > scanning bus 001 > device 001 on bus 001 does not match > found device 006 on bus 001 (idVendor 0x6e5 idProduct 0x8003) > opening device 006 on bus 001 > OK: id=0 > Type help and press return for a list of commands > usb-robot> config 1 > OK: id=1 > usb-robot> interface 0 > OK: id=2 > usb-robot> transfer type=control size=8 ep=0x81 dir=out requesttype=0 request=2 >value=251 index=0 Try without ep. And dir (direction) is "in", not out (you get 8 bytes of data). > For some reason it just hangs after I type the last command. Maybe it waits for 8 bytes of data to send? Bye, Henning ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
