AppSocket/JetDirect Printer Servers

George Brower browerg at verizon.net
Tue Jul 17 14:19:05 PDT 2007


The following may be obvious to many, but I'm new to Linux, and it was a struggle.

My Samsung ML-2250 has parallel and usb ports. It reaches my network through a NetGear PS101 printer server, which supports the HP AppSocket/JetDirect protocol, among others.

The printer works fine from various Windows boxes, and it worked fine under CUPS 1.1 and Knoppix 3.4. Unfortunately, I did not keep good enough records to repeat my success with Knoppix 5.1.1; CUPS 1.2.7 (and then 1.2.11) refused to recognize the printer or the PS101.

I'd been relying on the PS101's web interface, at 192.168.0.2. Unfortunately, those pages didn't give enough detail. They seemed to say that the values stored in the PS101's config file matched what I told CUPS. Then I discovered nmap, and learned that port 9100 was closed on my PS101:

    nmap <PS101's IP address>

Until I configured the PS101 manually, I had to specify port 9100 (nmap -p9100 <>) to get its status, which was "closed."

I don't know why the port was closed. All I did :-/ was burn a cd with Knoppix 5.1.1 and reboot. Honest! That's all! Anyway, the settings that worked with CUPS 1.1 and Knoppix 3.4 didn't work any more.

To configure the PS101 (and perhaps other AppSocket/JetDirect print servers):

~$ ftp -n <PS101's IP address>

> ls           # to get the list of files stored in the PS101
> get config   # the PS101's configuration file

# edit config to match what you told CUPS

> put config   # to save your changes in the PS101
> get reset    # to reset the PS101
> quit

In my case:

~$ ftp -n 192.168.0.2
Connected to 192.168.0.2.
220 Print Server Ready.
Remote system type is Print.
ftp> ls
200 Command OK.
150 Open ASCII Mode Connection.
200 CONFIG       # the configuration file
200 RESET        # resets the PS101 ONLY
200 DEFAULTC     # restores factory default config
200 PSINF        # PSINFormation: serial numbers, etc.
200 SETIP        # set an IP address
200 PASSRESET    # put sets a password
226 Transfer complete.
ftp> get config
local: config remote: config
200 Command OK.
150 Open ASCII Mode Connection.
WARNING! 27 bare linefeeds received in ASCII mode
File may not have transferred correctly.
226 Transfer complete.
509 bytes received in 0.96 secs (0.5 kB/s)
ftp>

No matter what you find when you open config in your favorite editor, this seems to be what you want:

0001 BOX_NAME:<the name you gave your print server on your network>
0012 TCPIP_P :Enable
0014 NETB_P:Enable
0040 P1_NAME:<the name you gave your printer in CUPS>
0100 L1_PROUT:<the name you gave your printer in CUPS>
0101 L1_PREST:
0102 L1_POSTR:
0103 L1_CHGLF:No
0120 L2_PROUT:
0121 L2_PREST:
0122 L2_POSTR:
0123 L2_CHGLF:No
0140 L3_PROUT:
0141 L3_PREST:
0142 L3_POSTR:
0143 L3_CHGLF:No
0501 LPT1MODE:Ack&Busy
4000 IP_ADDR:<your print server's IP address>
4001 GATEWAY:<your network server/router's ip address>
4002 MASK   :<your network mask>
4010 TCP_INT:2
4011 TCP_CNT:254
4012 WINS_IP:0.0.0.0
4020 DHCP_MODE:Disable # DHCP may work for your printer, it didn't work for me.
5000 SMBGNAME:<your network server/router's name>
5001 SMBDROP:No
5002 SMBDELAY:0

In my case:

0001 BOX_NAME:PSEC6D1B
0012 TCPIP_P :Enable
0014 NETB_P:Enable
0040 P1_NAME:ML-2250
0100 L1_PROUT:ML-2250
0101 L1_PREST:
0102 L1_POSTR:
0103 L1_CHGLF:No
0120 L2_PROUT:
0121 L2_PREST:
0122 L2_POSTR:
0123 L2_CHGLF:No
0140 L3_PROUT:
0141 L3_PREST:
0142 L3_POSTR:
0143 L3_CHGLF:No
0501 LPT1MODE:Ack&Busy
4000 IP_ADDR:192.168.0.2
4001 GATEWAY:192.168.0.2
4002 MASK   :255.255.255.0
4010 TCP_INT:2
4011 TCP_CNT:254
4012 WINS_IP:0.0.0.0
4020 DHCP_MODE:Disable
5000 SMBGNAME:HOMENET
5001 SMBDROP:No
5002 SMBDELAY:0

Save your edits, go back to your ftp connection (or start a new one), and

> put config
  ...
  logging information
  ...
> get reset
> quit

This time:

nmap 192.168.0.2

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2007-07-17 15:59 EDT
Interesting ports on ML-2250 (192.168.0.2):
Not shown: 1674 closed ports
PORT     STATE SERVICE
21/tcp   open  ftp
23/tcp   open  telnet
80/tcp   open  http
139/tcp  open  netbios-ssn
515/tcp  open  printer
9100/tcp open  jetdirect

Low and behold, when I opened the CUPS printers web page, I printed a test page! Then I printed from kwrite! I was amazed!

I expect to repeat these steps if the PS101's reset button is pushed or it looses power long enough.

I hope this helps someone!

HatGuy

(Cross posted from forums.freestandards.org General Discussions)




More information about the cups mailing list