LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-09-2008, 08:38 AM   #1
seeism
LQ Newbie
 
Registered: Jun 2008
Posts: 13

Rep: Reputation: 0
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Input/Output Error; dpkg sub-process /usr/bin/dpkg returned and error code (2) NosLycn Linux - Software 7 12-12-2011 02:50 AM
Squid Error : no such process oicsdc Linux - Newbie 5 02-19-2010 12:44 PM
Squid Process Error sachin_shetty Linux - Server 1 03-23-2007 08:12 PM
Why usb_bulk_write return -16 on writing to PIC njel Programming 0 07-20-2004 06:03 AM
Synaptic error: "sub-process /usr/bin/dpkg returned an error code (2)" firefly2442 Linux - Software 3 02-04-2004 06:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration