From: Stephan M. <ste...@we...> - 2005-06-22 15:50:26
|
You cant read from USB storage devices just by sending simple bulk=5Fread commands. In order to communicate with these devices you have to=20 implement the USB mass storage specifications, some kind of SCSI protocol. See www.usb.org for further details. Other than that, you also have to implement a module to read=20 the device's file system (FAT, NTFS, whatever). By my rough estimation, it would take several man-years to implement this properly. So, if I where you, I would stay away from this. It's much too complicated. Stephan > Hi: > =20 > I started exploring libusb recently, along with the USB specs. I have=20 > an external storage device that I would like to control via a program I=20 > am coding in MS Visual C 6 (mostly for a "terminal" program). I can get=20 > "some" communications with the external storage device (like getting=20 > device descriptors and configurations), but cannot do a bulk read. Windo= ws > automatically recognizes this as an external storage device and I can=20 > see it under Windows explorer. If Windows claims the device, does that=20 > mean I cannot do a bulk read at the same time=3F This is the problem area= in my code: memset(acBulkBuf, 0x0, sizeof(acBulkBuf)); nResult =3D usb=5Fbu= lk=5Fread (udev, 0x82, acBulkBuf, 0x4400, LONG=5FTIMEOUT); I declared unsign= ed char acBulkBuf[20000] as a variable within main and before main I defin= ed #define LONG=5FTIMEOUT =3D 100000 Thank you for any help >=20 > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > Do You Yahoo!=3F > Tired of spam=3F Yahoo! Mail has the best spam protection around=20 > http://mail.yahoo.com=20 =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Mit der Gruppen-SMS von WEB.DE FreeMail k=F6nnen Sie eine SMS an alle=20 Freunde gleichzeitig schicken: http://freemail.web.de/features/=3Fmc=3D021179 |