Ok. I want READ/WRITE to my PIC16 (usb hid )and can't do this. maybe ill must use ioctl but cant find any examples. Here the my suxx code
unsigned char outbuff[USB_BUFFSIZE]; //USB output buffer. 1 byte for report, 8 bytes for the PIC
//char * dev = "/dev/usb/hiddev0"; <--- this is real my device
char * dev = "/proc/bus/usb/003/001"; <-- too
if ((fd = open(dev, O_RDWR|O_NONBLOCK|O_SYNC)) < 0) {
////
}
int bytes = write(dev,outbuff,USB_BUFFSIZE);
//------------------------------------/
executing
bytes == -1;
)
errno == EINVAL;
BTW i have a root permissions.