On Mon, 16 May 2005, coin wrote:
> I changed the address for the variable containing 0 and I changed of
> the number of bytes 1024 to 1 byte or 4 bytes like you said me. But
> the result is the same
>
> int main(){
> struct usbdevfs_bulktransfer bulk;
> int fd;
> int ret,*data,dato=0xFF,interface=0x00,*inter;
> data=&dato;
> inter=&interface;
> fd = open("/proc/bus/usb/002/003", O_RDWR);
> if(fd != -1) {
> bulk.ep = 1;
> bulk.len = 1;
> bulk.data = data;
> bulk.timeout = 1000;
> ioctl(fd, USBDEVFS_CLAIMINTERFACE, *inter);
> perror("ioctl");
> ret = ioctl(fd, USBDEVFS_BULK, &bulk);
> perror("ioctl");
> if (ret < 0)
> printf("Error in bulk transfer\n");
> /*else {
>
> }*/
> close(fd);
> }
> return 0;
> Thank you
What is the result? What does strace show?
Also what does "lsusb -v" show for this device?
Alan Stern
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel