Need to know how to invoke hpijs

Asked by Matt G

I'm working on an embedded system, low power, with the need for printing.
I don't want CUPS or anything else; I just want to dump raster data to a USB printer.

I think I have the basics down for getting hpijs going, but I don't know what to set OutputFD to.

I've tried printing documents on my host system and tracking down how it invokes hpijs, but this hasn't yielded anything useful.

Can someone tell me what to do or where to look?

I'm invoking the server with ijs_invoke_server with /usr/bin/hpijs. I'm trying to figure out what device to open? I've read that /dev/usb/lp0 is the WRONG thing to use. So how is this done??

Thanks in advance,

Regards,

MG.

Question information

Language:
English Edit question
Status:
Answered
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Raghothama Cauligi (raghothama-cauligi) said :
#1

hpijs requires GhostScript for rasterization. hpijs is invoked by GhostScript
as
gs -sDEVICE=hpijs etc.
If you have rasters already and just need to dump them to hp printers, you just need
the APDK (Appliance Printing Development Kit) piece of hpijs. You can download the source
for free from
http://spp.austin.hp.com/SPP/SPPMigrated/apdk.aspx
You do not need to sign any agreement to download this.
Raghu

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Matt G
Sent: Monday, October 20, 2008 7:04 PM
To: Cauligi, Raghothama S
Subject: [Question #48595]: Need to know how to invoke hpijs

New question #48595 on HPLIP:
https://answers.launchpad.net/hplip/+question/48595

I'm working on an embedded system, low power, with the need for printing.
I don't want CUPS or anything else; I just want to dump raster data to a USB printer.

I think I have the basics down for getting hpijs going, but I don't know what to set OutputFD to.

I've tried printing documents on my host system and tracking down how it invokes hpijs, but this hasn't yielded anything useful.

Can someone tell me what to do or where to look?

I'm invoking the server with ijs_invoke_server with /usr/bin/hpijs. I'm trying to figure out what device to open? I've read that /dev/usb/lp0 is the WRONG thing to use. So how is this done??

Thanks in advance,

Regards,

MG.

--
You received this question notification because you are a member of HP Linux Imaging and Printing, which is an answer contact for HPLIP.

Revision history for this message
Cliff Brake (cliff-brake) said :
#2

If the apdk is used, will we have to write our own I/O layer to talk with the Linux USB subsystem, or that already implemented in APDK?

It appears that libhpmud handles the I/O to the printer in a typical Linux system -- can you provide a high level overview of how IJS and libhpmud fit together?

Thanks,
Cliff

Revision history for this message
Matt G (magembcons) said :
#3

I was going to ask something very similar to this.

I didn't know you'd joined the list.

On Tue, Oct 21, 2008 at 4:39 PM, Cliff Brake <
<email address hidden>> wrote:

> Your question #48595 on HPLIP changed:
> https://answers.launchpad.net/hplip/+question/48595
>
> Cliff Brake proposed the following answer:
> If the apdk is used, will we have to write our own I/O layer to talk
> with the Linux USB subsystem, or that already implemented in APDK?
>
> It appears that libhpmud handles the I/O to the printer in a typical
> Linux system -- can you provide a high level overview of how IJS and
> libhpmud fit together?
>
> Thanks,
> Cliff
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/hplip/+question/48595/+confirm?answer_id=1
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/hplip/+question/48595
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Raghothama Cauligi (raghothama-cauligi) said :
#4

No, APDK does not provide any I/O. You can use hpmud with any needed changes.
Raghu

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Cliff Brake
Sent: Tuesday, October 21, 2008 1:40 PM
To: Cauligi, Raghothama S
Subject: RE: [Question #48595]: Need to know how to invoke hpijs

Question #48595 on HPLIP changed:
https://answers.launchpad.net/hplip/+question/48595

Cliff Brake proposed the following answer:
If the apdk is used, will we have to write our own I/O layer to talk with the Linux USB subsystem, or that already implemented in APDK?

It appears that libhpmud handles the I/O to the printer in a typical Linux system -- can you provide a high level overview of how IJS and libhpmud fit together?

Thanks,
Cliff

You received this question notification because you are a member of HP Linux Imaging and Printing, which is an answer contact for HPLIP.

Revision history for this message
dwelch91 (dwelch91) said :
#5

hpmud is linked to the "hp:" CUPS backend. hpijs/apdk doesn't communicate
directly to hpmud, but only via CUPS and the hp: backend. You can use
apdk/hpijs with CUPS or without, and even with CUPS, you can use any
convenient CUPS backend (socket:, usb:, etc) or the hp: one. The advantage
to using the hp: backend is support for bidirectional I/O, some special
error handling that some HP printers needs, and integration with the rest of
HPLIP.

I would recommend that you take a look at the CUPS book or docs as it has an
overview of how CUPS filters (hpijs/apdk), backends (hp:, usb:, etc), etc.
all fit together.

On Tue, Oct 21, 2008 at 1:51 PM, Raghothama Cauligi <
<email address hidden>> wrote:

> Question #48595 on HPLIP changed:
> https://answers.launchpad.net/hplip/+question/48595
>
> Status: Open => Answered
>
> Raghothama Cauligi proposed the following answer:
> No, APDK does not provide any I/O. You can use hpmud with any needed
> changes.
> Raghu
>
> -----Original Message-----
> From: <email address hidden> [mailto:<email address hidden>] On Behalf Of
> Cliff Brake
> Sent: Tuesday, October 21, 2008 1:40 PM
> To: Cauligi, Raghothama S
> Subject: RE: [Question #48595]: Need to know how to invoke hpijs
>
> Question #48595 on HPLIP changed:
> https://answers.launchpad.net/hplip/+question/48595
>
> Cliff Brake proposed the following answer:
> If the apdk is used, will we have to write our own I/O layer to talk with
> the Linux USB subsystem, or that already implemented in APDK?
>
> It appears that libhpmud handles the I/O to the printer in a typical
> Linux system -- can you provide a high level overview of how IJS and
> libhpmud fit together?
>
> Thanks,
> Cliff
>
> You received this question notification because you are a member of HP
> Linux Imaging and Printing, which is an answer contact for HPLIP.
>
> You received this question notification because you are a member of HP
> Linux Imaging and Printing, which is an answer contact for HPLIP.
>

Revision history for this message
Cliff Brake (cliff-brake) said :
#6

ok, I've found the hp backend (/usr/lib/cups/backend/hp), and it seems to be a standalone executable and I can detect my a printer, etc. Can I pipe the output of hpijs directly to the hp backend? Are the any data transformations done between these two steps?

Thanks,
Cliff

Revision history for this message
David Suffield (david-suffield) said :
#7

There is no data transformation needed between hpijs and the backend.

It should be possible to pipe the hpijs output directly to the hp backend, but you must use the same command line as CUPS (ie: arg0=device_uri arg1=jog-id arg2=user arg3=title arg4=copies arg5=options). Note arg0 is non-standard.

In theory this should work, but be aware decoupling hpijs and the hp backend from CUPS and the complete HPLIP solution will most likely require some code tweaks here and there.

You can get gs/hpijs command line examples by looking at the CUPS error_log with "LogLevel" set to "debug".

-dave

Can you help with this problem?

Provide an answer of your own, or ask Matt G for more information if necessary.

To post a message you must log in.