EmbeddedRelated.com
Forums
Memfault Beyond the Launch

LPC2468 to USB printer interface

Started by Ravi Shankar Rangam May 7, 2008
Anybody here knows, How a windows/linux PC will send data to USB printer?
I have googled a lot, but could not find the required information.
Does someone here knows?
kindly share the info. This would helps us a lot.

Thanks in advance,
Ravi
On Wed, May 14, 2008 at 7:00 PM, t_chinzei wrote:

> The printer port signaling for the IEEE-1284 printer pins, PE (paper
> empty), SEL (select) and /ERROR (Not error) are carried by
> GET_PORT_STATUS request.
>
> See this chapter on the USB printer class spec.
> 4.2.2 GET_PORT_STATUS (usbprint11.pdf)
>
> Printer Device Class Document 1.1
> http://www.usb.org/developers/devclass_docs/usbprint11.pdf
>
> On the USB sub-board, return these pin status when the firmware
> receives GET_PORT_STATUS request from the host PC.
>
> Tsuneo
> --- In l... , chetanrp@...
> wrote:
> >
> > Hi All,
> >
> > Iam working on a similar project where in the printer has 2
> boards(parallel port sub board which connects to the printer main board).
> > We have designed a USB port sub board instead of parallel port.
> > The printer is a non-script printer.
> >
> > I have the following queries:
> > 1. When i print from a text file in Windows , in what format does
> the data
> > appear in the USB endpoint buffer ?
> >
> > 2. The printer main board which is given to us by our client doesn't
> have
> > the implementation of status commands.
> > So, is there any way to read the status signals.
> >
> > Kindly give me your valuable suggestions.
> >
> > Regards,
> > Chetan
> >
> > Hi All,
> > >
> > >In my current project, I had to print some graphics onto USB printer
> > >connected to LPC2468 board. The board here acts as USB host. The
> > >printer I want to use is Laser printer from HP. Don't know the exact
> > >model at this time. Trying to find info on USB printer interface, How
> > >the HOST issues commands to the USB printer. I had worked on dot
> > >matrix printer interfaced to a parallel port to my board.
> > >
> > >Can someone help me in getting the info on USB printer interface to
> > >USB host?
> > >
> > >Thanks in advance,
> > >Ravi
> > >
> > >
> > >
> >
>

--
regards
ravi

An Engineer's Guide to the LPC2100 Series

> Anybody here knows, How a windows/linux PC will send data to USB printer?
> I have googled a lot, but could not find the required information.
> Does someone here knows?
> kindly share the info. This would helps us a lot.
>
> Thanks in advance,
> Ravi

"USB printer" is a standard USB device class (PDC) and is specified in
the USB specification, available at www.usb.org.

This already has been stated in the posting that you've quoted.

The data sent to the printer depends on the type of printer and the
printer driver used - check your printer's documentation. Your OS comes
with a printer driver that prepares the data.

If it's a laser printer for instance, chances are pretty high that the
printer will either be a PCL or PostScript printer. Both protocols are
fairly well-documented. If the printer is a so-called GDI printer,
everything depends on the printer manufacturer's documentation.

Anyway, the USB printer device class is a full transparent connection,
the data sent to the printer is exactly the same when sent via a
standard parallel printer connection or even an ethernet print server.

With some USB printers there are some extensions to that regarding
software which has some kind of bidirectional communication with the
printer to check ink levels etc.
But this is not mandatory, most printers don't need this crap.

Thus I'll repeat it:

What data is getting sent to the printer is completely unrelated to the
kind of connection your printer has. Be it USB, a parallel port, an
ethernet print server or even a serial (RS232) printer - the data is the
same.

___________________________________________________________
Der fre Vogel fgt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
For Windows, printer is accessed over the printer WinAPI

How to send raw data to a printer by using Visual C# .NET
http://support.microsoft.com/kb/322091/en-us

How to send raw data to a printer by using Visual Basic .NET
http://support.microsoft.com/kb/322090/en-us

HOWTO: Send Raw Data to a Printer by Using the Win32 API
http://support.microsoft.com/kb/138594/en-us

Tsuneo

--- In l..., ravi wrote:
>
> Anybody here knows, How a windows/linux PC will send data to USB
printer?
> I have googled a lot, but could not find the required information.
> Does someone here knows?
> kindly share the info. This would helps us a lot.
>
> Thanks in advance,
> Ravi
> On Wed, May 14, 2008 at 7:00 PM, t_chinzei wrote:
>
> > The printer port signaling for the IEEE-1284 printer pins, PE (paper
> > empty), SEL (select) and /ERROR (Not error) are carried by
> > GET_PORT_STATUS request.
> >
> > See this chapter on the USB printer class spec.
> > 4.2.2 GET_PORT_STATUS (usbprint11.pdf)
> >
> > Printer Device Class Document 1.1
> > http://www.usb.org/developers/devclass_docs/usbprint11.pdf
> >
> > On the USB sub-board, return these pin status when the firmware
> > receives GET_PORT_STATUS request from the host PC.
> >
> > Tsuneo
> >
> >
> > --- In l... , chetanrp@
> > wrote:
> > >
> > > Hi All,
> > >
> > > Iam working on a similar project where in the printer has 2
> > boards(parallel port sub board which connects to the printer main
board).
> > > We have designed a USB port sub board instead of parallel port.
> > > The printer is a non-script printer.
> > >
> > > I have the following queries:
> > > 1. When i print from a text file in Windows , in what format does
> > the data
> > > appear in the USB endpoint buffer ?
> > >
> > > 2. The printer main board which is given to us by our client doesn't
> > have
> > > the implementation of status commands.
> > > So, is there any way to read the status signals.
> > >
> > > Kindly give me your valuable suggestions.
> > >
> > > Regards,
> > > Chetan
> > >
> > > Hi All,
> > > >
> > > >In my current project, I had to print some graphics onto USB
printer
> > > >connected to LPC2468 board. The board here acts as USB host. The
> > > >printer I want to use is Laser printer from HP. Don't know the
exact
> > > >model at this time. Trying to find info on USB printer
interface, How
> > > >the HOST issues commands to the USB printer. I had worked on dot
> > > >matrix printer interfaced to a parallel port to my board.
> > > >
> > > >Can someone help me in getting the info on USB printer interface to
> > > >USB host?
> > > >
> > > >Thanks in advance,
> > > >Ravi
> > > >
> > > >
> > > >
> > >
> >
> >
> > --
> regards
> ravi
>
>

Dear All,
Thanks for your suggestions.
I need your help as to how the Status signals are say for example Paper Empty(PE) is generated by the Printer in whose firmware status commands aren't implemented.

I have checked my printer without connecting it to the PC and Iam able to see the signal on my DSO at the output of 74HC273 IC but iam not able to see the same signal at the input of this IC nor the clock signal. Please can you give your suggestion as to why the signals cannot be seen.

Regards,
Chetan

Hi All,
>
> Iam working on a similar project where in the printer has 2 boards(parallel port sub board which connects to the printer main board).
>We have designed a USB port sub board instead of parallel port.
>The printer is a non-script printer.
>
>I have the following queries:
>1. When i print from a text file in Windows , in what format does the data
> appear in the USB endpoint buffer ?
>
>2. The printer main board which is given to us by our client doesn't have
> the implementation of status commands.
> So, is there any way to read the status signals.
>
>Kindly give me your valuable suggestions.
>
>Regards,
>Chetan
>
>Hi All,
>>
>> In my current project, I had to print some graphics onto USB printer
>> connected to LPC2468 board. The board here acts as USB host. The
>> printer I want to use is Laser printer from HP. Don't know the exact
>> model at this time. Trying to find info on USB printer interface, How
>> the HOST issues commands to the USB printer. I had worked on dot
>> matrix printer interfaced to a parallel port to my board.
>>
>> Can someone help me in getting the info on USB printer interface to
>> USB host?
>>
>> Thanks in advance,
>> Ravi
>>
>
>


Memfault Beyond the Launch