On Mon, 10 Jul 2006, Paulo R. Zanoni wrote:
> Ok.
> I unbinded it, but when I binded it again, the same problem happened. It
> gave me those error messages =(
> So I guess unbinding/binding doesn't have the same effect as manually
> unplugging/plugging...
> Any other suggestions?
One other possibility: You can try to reset the hub. Attached is the
source code for a C program that will reset the device you specify on the
command line. The device can be given as a filename under /proc/bus/usb,
such as "/proc/bus/usb/001/004", or as a device file under /dev, such as
"/dev/usbdev1.4" -- the two filenames would refer to the same device.
Alan Stern
/* usbreset -- send a USB port reset to a USB device */
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <linux/usbdevice_fs.h>
int main(int argc, char **argv)
{
const char *filename;
int fd;
int rc;
if (argc != 2) {
fprintf(stderr, "Usage: usbreset device-filename\n");
return 1;
}
filename = argv[1];
fd = open(filename, O_WRONLY);
if (fd < 0) {
perror("Error opening output file");
return 1;
}
printf("Resetting USB device %s\n", filename);
rc = ioctl(fd, USBDEVFS_RESET, 0);
if (rc < 0) {
perror("Error in ioctl");
return 1;
}
printf("Reset successful\n");
close(fd);
return 0;
}
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel