usb_bulk_write gives No process error
Hi,
I am trying to write one printer driver for my USB printer(vendor specific).I am writing using libusb.When i try to send one command to printer using usb_bulk_write gives error
"error submitting URB: No such process"
I am pasting my code
int nep = 0;
int ep = 0;
unsigned char bulkbuf=0x00;
nep = usb_dev->config->interface->altsetting->bNumEndpoints;
printf("\n <RSJ> Number of endpoint = %d\n", nep);
for(i = 0; i < nep; i++)
{
ep = usb_dev->config->interface->altsetting->endpoint[i].bEndpointAddress;
printf("\n <RSJ> Address of endpoint = %x\n", ep);
}
ret = usb_bulk_write(usb_handle,0x02,&bulkbuf, 0xFF,5000);
printf("\n <RSJ> ret = %d, and ep = %d\n",ret, ep);
if(ret < 0)
printf("\n after writing %s\n\n",usb_strerror());
Please tell what is the reason
My command i want to send is 0x00 to get the printer status.
|