Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How to retrieve USB printer status?

 
   Soft32 Home -> Linux -> App Development RSS
Next:  [PATCH] newport_con: Read outside array bounds  
Author Message
Tulip

External


Since: Jul 29, 2009
Posts: 1



(Msg. 1) Posted: Wed Jul 29, 2009 1:29 pm
Post subject: How to retrieve USB printer status?
Archived from groups: comp>os>linux>development>apps (more info?)

Hi,

I am working on a HP h470 printer driver issue on an embedded system
and would appreciate your help. The printer is connected directly
through an USB cable to the embedded system. This USB printer takes
about 30 seconds after each printing job to go through a sort of
printer alignment/adjustment process (can hear printer heads moving,
paper rollers turning etc). If the user happens to print second page
during the time printer is adjusting itself, the second page does not
print, printer gets stuck for a while and finally spits-out about only
1/4 page printed. The driver should wait until the printer finishes
its adjustment process before sending any printing job over. But how
to retrieve full printer status? We use the USB Printer Class request
to get one byte printer status. The bits descriptions are as follows:

printer_status = USB_IOCTL(0xa1, 1, 0, 0, 1, buf, pDev)
Bit 7..6: Reserved (device should return these bits reset to 0)
Bit 5: Paper Empty (1= Paper Empty, 0= OK)
Bit 4: Select (1= Selected, 0= Not selected)
Bit 3: Not Error (1= No Error, 0 = Error)
Bit 2..0: Reserved (device should return these bits reset to 0)

This one byte printer status indicates "no error" during printer
alignment/adjustment process. Obviously, it doesn't provide all
printer status.

Thanks,
Linda
Back to top
Login to vote
Rainer Weikusat

External


Since: Apr 02, 2007
Posts: 181



(Msg. 2) Posted: Thu Jul 30, 2009 5:20 am
Post subject: Re: How to retrieve USB printer status? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Tulip <lindawyu DeleteThis @gmail.com> writes:

[...]

[hp 470]

> This USB printer takes
> about 30 seconds after each printing job to go through a sort of
> printer alignment/adjustment process (can hear printer heads moving,
> paper rollers turning etc). If the user happens to print second page
> during the time printer is adjusting itself, the second page does not
> print,

[...]

> We use the USB Printer Class request to get one byte printer
> status. The bits descriptions are as follows:
>
> printer_status = USB_IOCTL(0xa1, 1, 0, 0, 1, buf, pDev)
> Bit 7..6: Reserved (device should return these bits reset to 0)
> Bit 5: Paper Empty (1= Paper Empty, 0= OK)
> Bit 4: Select (1= Selected, 0= Not selected)
> Bit 3: Not Error (1= No Error, 0 = Error)
> Bit 2..0: Reserved (device should return these bits reset to 0)
>
> This one byte printer status indicates "no error" during printer
> alignment/adjustment process.

Is this the only set bit? If so, presence or absence of Select could
perhaps be used to determine if the printer can presently accept print
jobs.
Back to top
Login to vote
Display posts from previous:   
Related Topics:
How can i register a link protocol for browsers - I want to add an action to the system so that every time a user clicks in a link with for example ..

storing the data in ln2440 target board memory - hai.. i using the target board ln2440sbc..and linux OS.. (16Mb flash and 32Mb sdram) i have cross compiled and porte...

GTK run error - hi i had created one same application in glad interface designer with c option.the n i compiled the same after that i....

C++ -> mplayer, stdin, stdout, popen / fork / pipe... - Hello everybody. I tried to work this out on my own for about 6 hours non-stop now and I just don't get it working.......

"Unable to retrieve the printer list" - "Connection to CUPS server failed... the IPP request failed for an unknown reason." Using SUSE 10.2 under VM...

Weather Report won't retrieve - Don't know what happenned but the Weather Report won't work. A question mark is all that appears on the panel. When I d...
       Soft32 Home -> Linux -> App Development All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]