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


-------------------------------------------------------
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_idt12&alloc_id344&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to