ijs_invoke_server with hpijs
Hi,
I need to know how to set the OutputFD parameter given to hpijs.
I've tried opening several different files, and I always end up with "unable to read client data" coming from hpijs.
I'm not running CUPS or HPLIP; I'm doing this on an embedded system, so I need to be able to do barebones hpijs.
Thanks!
Regards,
Matt Gessner
Quoted 3 lines · Matt Gessner
I need to know how to set the OutputFD parameter given to hpijs.
I've tried opening several different files, and I always end up with "unable to read client data" coming from hpijs.
- does it work with OutputFile instead?
- does it work with the ijs_server_example from the ijs package instead of hpijs?
The ijs_client_example source code does help to clarify the API, when in doubt.
You can also look at the pdftoijs print filter:
http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/pdftoraster/branches/gsoc2008_pdftoijs_nocups/src/pdftoijs.cc?root=opfc&view=auto
Two other thoughts, though:
- the error "unable to read client data" suggests to me, that the problem occurs way before anything related to the OutputFD happens, but you probably have looked deeper
- the dup()/pipe()/open() or whatever you use to create the file descriptor has to happen before the ijs_invoke_server, so that the descriptor is available to the forked process.
Tobias
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · Tobias Hoffmann
Quoted 9 lines · Matt Gessner
I need to know how to set the OutputFD parameter given to hpijs.
I've tried opening several different files, and I always end up with "unable to read client data" coming from hpijs.
- does it work with OutputFile instead?
OutputFile doesn't appear to be supported by hpijs. hpijs.cpp shows only OutputFD to be supported.
Quoted 11 lines
- does it work with the
ijs_server_examplefrom the ijs package instead of hpijs?The
ijs_client_examplesource code does help to clarify the API, when in doubt.
The ijs_client_example source code only goes so far, though. It doesn't show me the VALUE to give to hpijs for OutputFD.
Quoted 5 lines
You can also look at the pdftoijs print filter:
I will look at this. Since it's not using cups, that looks like it has great potential.
Quoted 6 lines
Two other thoughts, though:
- the error "unable to read client data" suggests to me, that the problem occurs way before anything related to the OutputFD happens, but you probably have looked deeper
Yes, I have. That error is being generated by a read() on the OutputFD, IIRC. Since I don't know what to open, the things I'm doing now to get an fd that I assign to OutputFD aren't working.
Quoted 4 lines
- the dup()/pipe()/open() or whatever you use to create the file descriptor has to happen before the
ijs_invoke_server, so that the descriptor is available to the forked process.
Yes; I'm doing it that way. I open the file descriptor first, then invoke ijs_invoke_server ("/usr/bin/hpijs"), and then set OutputFD via the set parameter method.
I'm still digging.
Thanks for your comments!
I did some other poking around, and it looks like I might need something from hpmud, which appears to be able to open USB endpoints. I'm going to check that out later today.
Regards,
Matt