On Tue, 15 Nov 2005, Jeff Owen wrote: >Ultimately, I want to monitor and control a Nikon D-70 camera and I am >using Jphoto as inspiration, which uses the jUSB code. However, that >project seems to be a bit inactive and so I found JSR-080 and this >project. I thought I'd start off simply by trying to send a reset to >the camera, however, it all looks a bit impenetrable without an example.
Funny you want to start off with a "reset". Unfortunately, the USB specification _does not_ define any "reset" command. You CANNOT reset any USB device with a standard command. In fact, the only universal way to reset a USB device is to reset (disable) the port that the device is connected to. To do this, you have to send a command to the hub that owns that port. And that hub (i.e. all hubs) are always controlled by the OS's hub driver. So the short answer is that you _can't_ reset a USB device in a universal way. Many (or some, at least) devices have proprietary reset commands, if yours has one then use that. If not, some OSes provide reset mechanisms, but it's entirely up to the OS, and frequently that reset mechanism is unreliable or unsafe. Linux, for example, does provide a reset ioctl in its usbfs (which javax.usb uses), however the call is NOT safe to use for all devices, in fact it's liekly that it's not safe to use for any device (specifically if a device has multiple interfaces that are driven by different drivers it's completely unsafe to use the usbfs reset ioctl, at least in some kernel versions). Hmm, that question should probably be in the FAQ...I'll add it. -- Dan Streetman [EMAIL PROTECTED] --------------------- 186,272 miles per second: It isn't just a good idea, it's the law! ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ javax-usb-devel mailing list javax-usb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/javax-usb-devel