Post by Phil HarmanBob,
I was waiting to see what the new HP AiO release was like before
diving in. My previous experience was with HP AiO 4.3.5 and Mac
OS X 10.1.5. I now have HP AiO 4.6.2 on Mac OS X 10.2 and I am
very disappointed.
As far as I can tell the HP daemons are still the CPU hogs they
used to be. I see that page zero-fills have increased from 2000
to 4000 per second during printing (that's 16MB / second)! All
I suspect has changed is that Mac OS X has got faster at doing
page zero-fills!!!
I'd like to get my hands on your work (i.e. how to build some
of the HPOJ source under Mac OS X). David has already helped my
with basic USB communication (i.e. I can now handshake with the
G55 using the OS X IOKit USB functions).
My initial goal is to produce a simple filter which is able to
do bulk transfers to the G55 for printing. A longer term goal
would be to get the entire HPOJ suite running, but it seems as
if you may have got us quite a long way towards this already.
Please could you email me your stuff (including any notes)?
Thanks,
Phil
Not a problem!
I haven't had the time, recently, to work on this project. Especially if it
looked like I would have to go it alone.
Before I start, let me say this. I was extremely surprised how well this
worked. My biggest challenges in getting this to limp along, was getting
ucd-snmp to work. With that, I could connect to a jetdirect 175 server, and
query my PSC750.
Appended to the bottom of this message, are the diffs to get get 0.90 to
work. You'll laugh. You'll cry. Its nothing more than a set of makefile
hacks, and a variable tweak to ExMgr.
Now for the pain.
Get ucd-snmp 4.2.5 to work. Compile it, work through its problems, and
install it into /usr/local.
Next, if you are brave. Download the latest Sane Backend, fix it's quirks
and install it into /usr/local as well.
Next, do the following for hpoj-0.90 (Not the cvs version)
Before you even "use" these diffs, you will need to run a
./configure --with-cups-backend=/usr/libexec/cups/backend
--with-sane-backend=/usr/local/lib/sane --with-snmp=/usr/local/bin
line to generate the Makefiles. These Makefiles should also be "backed up"
incase my diff fails.
If everything runs correctly, apply the diffs. (Note: these diffs are
incomplete. All these diffs do, is get a functional copy of hpoj compiled.
Doing a make install "sort of" works, but then you have to hand create all
the hardlinks for the different version numbers of the dylibs.)
Essentially, after installation, I could manually fire off a ptal-init
setup, give it my jetdirect ip address, and setup the printer. No problems
at all. Next run a "ptal-init start" and you are in business.
I could run the ptal-hp display, and see that the message is "Power Save
On."
As for actually scanning and printing.. Heheh, that has yet to actually
work. I haven't given this all that much time right now to verify that the
package works. Jetdirect connectivity is really encouraging! But it is still
a long way off from a working driver.
My thougths:
This package *badly* needs to use libtool.
This package also needs to know which OS it is on, so that CPP flags can be
introduced to handle platform spectific includes, etc..
(in a nutshell, the configure system needs heavy modification)
Libusb would be nice, but if you have some work invested in direct usage of
the IOKit API, continue with that. One less Opensource package to download
and install, before hpoj, the better.
(Someone would have to download and install ucd-snmp, sane, and libusb,
*before* hpoj, and then afterwards, a sane frontend, or a twain-sane bridge,
ghostscript, and the hp bubblejet drivers.)
Let me know what you guys think!
Bob..
(P.S. Here are the diffs. There might be some "garbage" in here to,
involving the config.cache, etc..)
-- snip --
diff -r hpoj-0.90.original/Makefile hpoj-0.90/Makefile
75c75
< libdir_program=lib/hpojip/libhpojip.so.*.* lib/ptal/libptal.so.*.*
lib/sane/libsane-hpoj.so.*.*
---
Post by Phil Harmanlibdir_program=lib/hpojip/libhpojip.*.*.dylib lib/ptal/libptal.*.*.dylib
lib/sane/libsane-hpoj.*.*.dylib
82,84c82,84
< CUPS_BACKEND_DIR=
< SANE_BACKEND_DIR=
< SANE_ETC_DIR=
---
Post by Phil HarmanCUPS_BACKEND_DIR=/usr/libexec/cups/backend
SANE_BACKEND_DIR=/usr/local/lib
SANE_ETC_DIR=/usr/local/etc/sane.d
107c107
< $(LN_S) -f lib$$comp*.so.*.*
$(libdir)/$$file ; \
---
Post by Phil Harman$(LN_S) -f lib$$comp*.*.dylib
$(libdir)/$$file ; \
158,160c158,160
< if ! test -L $(SANE_BACKEND_DIR)/libsane-hpoj.so.1 ;
then \
< echo "Setting libsane-hpoj.so symlink." ; \
< $(LN_S) -f $(libdir)/libsane-hpoj.so
$(SANE_BACKEND_DIR)/libsane-hpoj.so.1 ; \
---
Post by Phil Harmanif ! test -L $(SANE_BACKEND_DIR)/libsane-hpoj.1.dylib ;
then \
Post by Phil Harmanecho "Setting libsane-hpoj.dylib symlink." ; \
$(LN_S) -f $(libdir)/libsane-hpoj.dylib
$(SANE_BACKEND_DIR)/libsane-hpoj.1.dylib ; \
183,184c183,184
< if ! test -L $(SANE_BACKEND_DIR)/libsane-hpoj.so.1 ;
then \
< echo "As root, please run the command \"ln
-sf $(libdir)/libsane-hpoj.so $(SANE_BACKEND_DIR)/libsane-hpoj.so.1\"." ; \
---
Post by Phil Harmanif ! test -L $(SANE_BACKEND_DIR)/libsane-hpoj.1.dylib ;
then \
Post by Phil Harmanecho "As root, please run the command \"ln -sf
$(libdir)/libsane-hpoj.dylib $(SANE_BACKEND_DIR)/libsane-hpoj.1.dylib\"." ; \
diff -r hpoj-0.90.original/apps/cmdline/Makefile
hpoj-0.90/apps/cmdline/Makefile
9c9
< CFLAGS=-O -Wall -g -DHAVE_SNMP
-I/Users/bob/Development/hpoj-0.90.original/include
-I/usr/local/include/ucd-snmp
-L/Users/bob/Development/hpoj-0.90.original/lib/hpojip
-L/Users/bob/Development/hpoj-0.90.original/lib/ptal
-L/Users/bob/Development/hpoj-0.90.original/lib/sane
-DVAR_RUN_PREFIX="\"/var/run\""
---
Post by Phil HarmanCFLAGS=-O -Wall -g -DHAVE_SNMP -I/Users/bob/Development/hpoj-0.90/include
-I/usr/local/include/ucd-snmp -L/Users/bob/Development/hpoj-0.90/lib/hpojip
-L/Users/bob/Development/hpoj-0.90/lib/ptal
-L/Users/bob/Development/hpoj-0.90/lib/sane -DVAR_RUN_PREFIX="\"/var/run\""
Only in hpoj-0.90/apps/cmdline: hpojip-test
Only in hpoj-0.90/apps/cmdline: ptal-connect
Only in hpoj-0.90/apps/cmdline: ptal-device
Only in hpoj-0.90/apps/cmdline: ptal-devid
Only in hpoj-0.90/apps/cmdline: ptal-hp
Only in hpoj-0.90/apps/cmdline: ptal-photod
Only in hpoj-0.90/apps/cmdline: ptal-pml
Only in hpoj-0.90/apps/cmdline: ptal-print
Only in hpoj-0.90/apps/cmdline: ptal-printd
diff -r hpoj-0.90.original/apps/xojpanel/Makefile
hpoj-0.90/apps/xojpanel/Makefile
6,7c6,7
< LFLAGS = -L/Users/bob/Development/hpoj-0.90.original/lib/hpojip
-L/Users/bob/Development/hpoj-0.90.original/lib/ptal
-L/Users/bob/Development/hpoj-0.90.original/lib/sane -lptal
< CFLAGS = -O -Wall -g -I/usr/X11R6/include
-I/Users/bob/Development/hpoj-0.90.original/include
-I/usr/local/include/ucd-snmp
---
Post by Phil HarmanLFLAGS = -L/Users/bob/Development/hpoj-0.90/lib/hpojip
-L/Users/bob/Development/hpoj-0.90/lib/ptal
-L/Users/bob/Development/hpoj-0.90/lib/sane -lptal
Post by Phil HarmanCFLAGS = -O -Wall -g -I/usr/X11R6/include
-I/Users/bob/Development/hpoj-0.90/include -I/usr/local/include/ucd-snmp
diff -r hpoj-0.90.original/config.status hpoj-0.90/config.status
5c5
< # on host Robert-Monaghans-Computer.local.:
---
7c7
< # ./configure --with-cups-backend --with-sane-backend=/usr/local/lib/sane
--with-snmp=/usr/local/bin
---
Post by Phil Harman# ./configure --with-snmp=/usr/local/include/ucd-snmp
--with-cups-backend=/usr/libexec/cups/backend --with-sane-backend=/usr/local/lib
17,18c17,18
< echo "running ${CONFIG_SHELL-/bin/sh} ./configure --with-cups-backend
--with-sane-backend=/usr/local/lib/sane --with-snmp=/usr/local/bin
--no-create --no-recursion"
< exec ${CONFIG_SHELL-/bin/sh} ./configure --with-cups-backend
--with-sane-backend=/usr/local/lib/sane --with-snmp=/usr/local/bin
--no-create --no-recursion ;;
---
Post by Phil Harmanecho "running ${CONFIG_SHELL-/bin/sh} ./configure
--with-snmp=/usr/local/include/ucd-snmp
--with-cups-backend=/usr/libexec/cups/backend --with-sane-backend=/usr/local/lib
--no-create --no-recursion"
Post by Phil Harmanexec ${CONFIG_SHELL-/bin/sh} ./configure
--with-snmp=/usr/local/include/ucd-snmp
--with-cups-backend=/usr/libexec/cups/backend --with-sane-backend=/usr/local/lib
--no-create --no-recursion ;;
80,81c80,81
< s%@INCLUDE_CMDLINE@%-I/Users/bob/Development/hpoj-0.90.original/include
-I/usr/local/include/ucd-snmp%g
< s%@LIBRARY_CMDLINE@%-L/Users/bob/Development/hpoj-0.90.original/lib/hpojip
-L/Users/bob/Development/hpoj-0.90.original/lib/ptal
-L/Users/bob/Development/hpoj-0.90.original/lib/sane%g
---
-I/usr/local/include/ucd-snmp%g
-L/Users/bob/Development/hpoj-0.90/lib/ptal
-L/Users/bob/Development/hpoj-0.90/lib/sane%g
83,85c83,85
< s%@CUPS_BACKEND_DIR@%%g
< s%@SANE_BACKEND_DIR@%%g
< s%@SANE_ETC_DIR@%%g
---
diff -r hpoj-0.90.original/configure hpoj-0.90/configure
1414c1414
< ( foo=`sane-config --ldflags` ) 2>/dev/null
---
Post by Phil Harman( foo=`/usr/local/bin/sane-config --ldflags` ) 2>/dev/null
1434c1434
< for file in $dir/libsane-dll.so* ; do
---
Post by Phil Harmanfor file in $dir/libsane.* ; do
Only in hpoj-0.90: cups-path.txt
diff -r hpoj-0.90.original/lib/hpojip/Makefile hpoj-0.90/lib/hpojip/Makefile
7,9c7,9
< SONOVER=lib$(BASENAME).so
< SOSHORT=$(SONOVER).$(MAJORVER)
< SOLONG=$(SOSHORT).$(MINORVER)
---
Post by Phil HarmanSONOVER=lib$(BASENAME).dylib
SOSHORT=lib$(BASENAME).$(MAJORVER).dylib
SOLONG=lib$(BASENAME).$(MAJORVER).$(MINORVER).dylib
30c30
< CFLAGS=-O -Wall -g -DHAVE_SNMP
-I/Users/bob/Development/hpoj-0.90.original/include
-I/usr/local/include/ucd-snmp
-L/Users/bob/Development/hpoj-0.90.original/lib/hpojip
-L/Users/bob/Development/hpoj-0.90.original/lib/ptal
-L/Users/bob/Development/hpoj-0.90.original/lib/sane
---
Post by Phil HarmanCFLAGS=-O -Wall -g -DHAVE_SNMP -I/Users/bob/Development/hpoj-0.90/include
-I/usr/local/include/ucd-snmp -L/Users/bob/Development/hpoj-0.90/lib/hpojip
-L/Users/bob/Development/hpoj-0.90/lib/ptal
-L/Users/bob/Development/hpoj-0.90/lib/sane
33c33
< $(CC) $(CFLAGS) -DHPOJIP_INTERNAL -fPIC -c -o $@ $<
---
45c45
< $(CC) $(CFLAGS) -shared -Wl,-soname,$(SOSHORT) -o $(SOLONG)
$(SOCOMPS) -lc -lm
---
Post by Phil Harman$(CC) $(CFLAGS) -dynamiclib -install_name
/usr/local/bin/$(SOLONG) -o $(SOLONG) $(SOCOMPS) -lc -lm
diff -r hpoj-0.90.original/lib/ptal/Makefile hpoj-0.90/lib/ptal/Makefile
7,9c7,9
< SONOVER=lib$(BASENAME).so
< SOSHORT=$(SONOVER).$(MAJORVER)
< SOLONG=$(SOSHORT).$(MINORVER)
---
Post by Phil HarmanSONOVER=lib$(BASENAME).dylib
SOSHORT=lib$(BASENAME).$(MAJORVER).dylib
SOLONG=lib$(BASENAME).$(MAJORVER).$(MINORVER).dylib
21c21
< CFLAGS=-O -Wall -g -DHAVE_SNMP
-I/Users/bob/Development/hpoj-0.90.original/include
-I/usr/local/include/ucd-snmp
-L/Users/bob/Development/hpoj-0.90.original/lib/hpojip
-L/Users/bob/Development/hpoj-0.90.original/lib/ptal
-L/Users/bob/Development/hpoj-0.90.original/lib/sane
-DVAR_RUN_PREFIX="\"/var/run\""
---
Post by Phil HarmanCFLAGS=-O -Wall -g -DHAVE_SNMP -I/Users/bob/Development/hpoj-0.90/include
-I/usr/local/include/ucd-snmp -L/Users/bob/Development/hpoj-0.90/lib/hpojip
-L/Users/bob/Development/hpoj-0.90/lib/ptal
-L/Users/bob/Development/hpoj-0.90/lib/sane -DVAR_RUN_PREFIX="\"/var/run\""
24c24
< $(CC) $(CFLAGS) -fPIC -c -o $@ $<
---
36c36
< $(CC) $(CFLAGS) -lsnmp -lcrypto -shared
-Wl,-soname,$(SOSHORT) -o $(SOLONG) $(SOCOMPS) -lc
---
Post by Phil Harman$(CC) $(CFLAGS) -lsnmp -lcrypto -dynamiclib -install_name
/usr/local/lib/$(SOLONG) -o $(SOLONG) $(SOCOMPS) -lc
diff -r hpoj-0.90.original/lib/sane/Makefile hpoj-0.90/lib/sane/Makefile
7,9c7,9
< SONOVER=lib$(BASENAME).so
< SOSHORT=$(SONOVER).$(MAJORVER)
< SOLONG=$(SOSHORT).$(MINORVER)
---
Post by Phil HarmanSONOVER=lib$(BASENAME).dylib
SOSHORT=lib$(BASENAME).$(MAJORVER).dylib
SOLONG=lib$(BASENAME).$(MAJORVER).$(MINORVER).dylib
20c20
< CFLAGS=-O -Wall -g -DHAVE_SNMP
-I/Users/bob/Development/hpoj-0.90.original/include
-I/usr/local/include/ucd-snmp
-L/Users/bob/Development/hpoj-0.90.original/lib/hpojip
-L/Users/bob/Development/hpoj-0.90.original/lib/ptal
-L/Users/bob/Development/hpoj-0.90.original/lib/sane
---
Post by Phil HarmanCFLAGS=-O -Wall -g -DHAVE_SNMP -I/Users/bob/Development/hpoj-0.90/include
-I/usr/local/include/ucd-snmp -L/usr/local/lib
-L/Users/bob/Development/hpoj-0.90/lib/hpojip
-L/Users/bob/Development/hpoj-0.90/lib/ptal
-L/Users/bob/Development/hpoj-0.90/lib/sane
23c23
< $(CC) $(CFLAGS) -fPIC -c -o $@ $<
---
35c35
< $(CC) $(CFLAGS) -lptal -lhpojip -shared
-Wl,-soname,$(SOSHORT) -o $(SOLONG) $(SOCOMPS) -lc
---
Post by Phil Harman$(CC) $(CFLAGS) -dynamiclib -install_name
/usr/local/lib/$(SOLONG) -o $(SOLONG) $(SOCOMPS) -lptal -lhpojip -lc
diff -r hpoj-0.90.original/mlcd/ExMgr.cpp hpoj-0.90/mlcd/ExMgr.cpp
1244c1244,1245
< socklen_t remoteAddrLen,localAddrLen;
---
Post by Phil Harman//socklen_t remoteAddrLen,localAddrLen;
unsigned int remoteAddrLen,localAddrLen;
1333c1334,1335
< socklen_t remoteAddrLen;
---
Post by Phil Harman//socklen_t remoteAddrLen;
unsigned int remoteAddrLen;