How to setup HP JetDirect for network printing in FreeBSD?

SOLVED
It's now solved. But the title is too long to pre-pend SOLVED.

Greetings, all.
I guess the Title says it all. I just picked up an HP JetDirect 300X network adapter, and am attempting to make it work on FreeBSD. I've done quite a bit of searching on the Forums, but can't seem to sort it all out. I also read @wblock's article at
http://www.wonkity.com/~wblock/docs/html/lpdprinting.html (lpd Printing With FreeBSD) which suggested:

nc nethplaser 9100 < myfile.txt
I used:
nc ip.add.re.ss 9100 < /etc/rc.conf
But no joy. The network activity light blinked on the JetDirect, but emitted nothing to the printer (LaserJet 6p).

Any assistance would be greatly appreciated.

--Chris
 
Last edited by a moderator:
Re: How to setup HP JetDirect for network printing in FreeBS

A LaserJet won't eject a text page unless it has more than 66 lines or a form feed. Try nc ip.add.re.ss < `printf “This is a test\r\n\f”`.

Check the configuration of the JetDirect, also. Just telnet(1) to it and it shows a menu. Possibly a web page also, but that was back when HP jumped on the Java bandwagon and they were horribly slow. Anyway, use the menu to disable all the obsolete protocols like Appletalk, and disable banner pages (banner:0).

A couple of months back, I rewrote the printing chapter in the Handbook. So far, there have been no complaints, which I choose to believe means it is perfect. Anyway, it might be useful for additional details.
 
Re: How to setup HP JetDirect for network printing in FreeBS

Hello, @wblock@, and thank you very much for your reply.
wblock@ said:
A LaserJet won't eject a text page unless it has more than 66 lines or a form feed. Try nc ip.add.re.ss < `printf “This is a test\r\n\f”`.
Thanks for the suggestion. My results are in:
nc ip.add.re.ss < `printf "this is a test\r\n\f"`
`printf "this is a test\r\n\f"`: Ambiguous.

sorry for the ambiguity on the IP. But it's actually intertnet facing. I know. But that discussion, is for another time. :)
wblock@ said:
Check the configuration of the JetDirect, also. Just telnet(1) to it and it shows a menu. Possibly a web page also, but that was back when HP jumped on the Java bandwagon and they were horribly slow. Anyway, use the menu to disable all the obsolete protocols like Appletalk, and disable banner pages (banner:0).
I tried telnet(1), and ftp(1). But both simply timed out. The test page, created by pushing the "test" button. Emits all the current settings. Which indicated (among other things):
IP: 10.0.0.89
mask: 255.255.0.0
gateway: 10.3.0.1
...
AppleTalk settings
...
I'm also unable to get to the web configuration page. I wiped the above settings, by pressing the "test" button, while applying power to the JetDirect. Which turned the above IP related settings to: 0. But all attempts to access/use the printer/JetDirect, remain as before "resetting" the setup/configuration.
I fear I may be required to install net-mgmt/net-snmp to actually get access to the configuration settings. Other option is replacing FreeBSD with Windows*, and installing HP Web JetAdmin. :(
wblock@ said:
A couple of months back, I rewrote the printing chapter in the Handbook. So far, there have been no complaints, which I choose to believe means it is perfect. Anyway, it might be useful for additional details.
Thanks for the pointer @wblock@, I take a good hard look at it. I was reading 8.7 Setting up LPR/LPD on FreeBSD.
UPDATE
Here's all the information I have, regarding the JetDirect, should it be helpful to others:
HP JetDirect External Print Servers 300X, 500X, 170X, EX Plus Hardware Installation Guide, and
HP JetDirect Print Servers 600N/400N/500X/300X Administrator's Guide
 
Last edited by a moderator:
Re: How to setup HP JetDirect for network printing in FreeBS

If you really reset the JetDirect, it changes to a default address of 192.0.0.192. Connecting to the 300X to change that requires setting up an address in the same netblock on a computer or adding a manual route.

The 300X might have come out before HP had embedded web servers in them. I had a 300X up until last year, but it has since moved on, so I can't test.

Check the switches on it, also. And it's also possible that the wall-wart power supply has moved on and should be replaced. (I once tested an access point that almost worked, but failed due to a failing external power supply.)
 
Re: How to setup HP JetDirect for network printing in FreeBS

Chris_H said:
Thanks for the suggestion. My results are in:
nc ip.add.re.ss < `printf "this is a test\r\n\f"`
`printf "this is a test\r\n\f"`: Ambiguous.

Ah, the shell. Always there, helping to prevent things from working. All right:
Code:
% printf "this is a test\r\n\f" > /tmp/testfile.txt
% nc ip.add.re.ss < /tmp/testfile.txt
 
Re: How to setup HP JetDirect for network printing in FreeBS

Hello @wblock@, and thanks for the update...
wblock@ said:
Chris_H said:
Thanks for the suggestion. My results are in:
nc ip.add.re.ss < `printf "this is a test\r\n\f"`
`printf "this is a test\r\n\f"`: Ambiguous.

Ah, the shell. Always there, helping to prevent things from working. All right:
Code:
% printf "this is a test\r\n\f" > /tmp/testfile.txt
% nc ip.add.re.ss < /tmp/testfile.txt
the results:
printf "this is a test\r\n\f" > ./testfile.txt
output:
nc ip.add.re.ss < ./testfile.txt
usage: nc [-46DdEhklnrStUuvz] [-e policy] [-I length] [-i interval] [-O length]
[-P proxy_username] [-p source_port] [-s source] [-T ToS]
[-V rtable] [-w timeout] [-X proxy_protocol]
[-x proxy_address[:port]] [destination] [port]

however
nc ip.add.re.ss 9100 < ./testfile.txt
eventually times out, with nothing printed. The "Activity" led on the 300X does show activity, tho.

Thanks again, @wblock@.

--Chris
 
Last edited by a moderator:
Re: How to setup HP JetDirect for network printing in FreeBS

Whoops, sorry about leaving out the port. Yes, it needs to be nc ip.add.re.ss 9100 < ./testfile.txt. Just tested here on a LaserJet 4250 with built-in JetDirect, worked.

It acts like a network problem, most likely on the JetDirect itself. What are the DIP switch settings?
 
Re: How to setup HP JetDirect for network printing in FreeBS

NP. It wasn't hard to deduce. :)

I chose All Down (default) and it shows up on the network @100Mbit (as it should).

Thanks.

--Chris
 
Re: How to setup HP JetDirect for network printing in FreeBS

wblock@ said:
If you really reset the JetDirect, it changes to a default address of 192.0.0.192. Connecting to the 300X to change that requires setting up an address in the same netblock on a computer or adding a manual route.
Yes. So the manual states. But a "reset" changed the IP/MASK, and GW to 0.0.0.0
wblock@ said:
The 300X might have come out before HP had embedded web servers in them. I had a 300X up until last year, but it has since moved on, so I can't test.

Check the switches on it, also. And it's also possible that the wall-wart power supply has moved on and should be replaced. (I once tested an access point that almost worked, but failed due to a failing external power supply.)
Hehe. Yea. PSU. That's a story in itself. I couldn't find a barrel jack with large enough hole in the center to accommodate the JetDirect. So I split the JD case, and desoldered the jack, and hung a pigtail from the land patterns. I had many a PSU that fit the requirements. The current one I'm using is 16vdc w/o load @850ma, and 13.5-14.2vdc @800ma loaded. I also tried another PSU within the rated specs, but showed no difference.

In the end, I fear that I'll need to go through the installation, and all the related hoops to setup net/mgmt/net-snmp. Though, not sure it's worth all the bother.

Thank you very much, @wblock@, for all your input.

--Chris
 
Last edited by a moderator:
Re: How to setup HP JetDirect for network printing in FreeBS

UPDATE

It finally correctly registered itself on the network. Well almost. It's NOT using the correct IP, but that's another issue, and one I'm confident I can correct -- it's MY network, after all. :)

Another HUGE thanks, @wblock@, for all your help, and input.

--Chris

UPDATE: Almost forgot to indicate the possible solution.
I experimented with the dip switches. Seems moving it to MANUAL, and 100Mbit, and Half, or Full duplex. Caused it to register itself on the network. I think MANUAL is the key, here.
 
Last edited by a moderator:
Re: How to setup HP JetDirect for network printing in FreeBS

Yes. Autonegotiation is still a problem sometimes. That particular hardware could be nearly fifteen years old.
 
Re: How to setup HP JetDirect for network printing in FreeBS

wblock@ said:
Yes. Autonegotiation is still a problem sometimes. That particular hardware could be nearly fifteen years old.
Indeed. In fact the test page indicates it was built in 2000.

If nothing else. You can't say HP build their stuff Cheap, of Fragile, back then. :)
In fact. I think my Laserjet 6p, is older still.
Speaking of old 6p; now I have to figure out the ideal printcap(5) for that ancient device. :p
Oh well, at least my current one actually reaches it now. :)

Thanks again, @wblock@

--Chris
 
Last edited by a moderator:
Back
Top