JDServer

JDServer is a print server that implements HP's JetDirect protocol, sometimes known as Raw.

Copyright © 2009-2015 Dave Higton

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License version 2 along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

You may contact the author:

by e-mail as dave@davehigton.me.uk, or

by snail-mail at 76 Glenfield Crescent, Southampton, Hants, SO18 4RF, United Kingdom.

What it is

JDServer is a print server that implements HP's JetDirect protocol, sometimes known as Raw. It allows other computers on a network to use a printer connected to a RISC OS computer, via the network and an orderly queue.

What it isn't

JDServer isn't Uniprint. It still requires each of the client computers to have a driver for the printer; it doesn't share the printer driver.

Installation

This application should work on any RISC OS computer, running any version of RISC OS from 3.1 upwards and running the Printer Manager application, !Printers. You need a printer connected in some way to the RISC OS computer - any way that works is OK.

Copy the !JDServer application into a convenient location. I recommend the $.Apps directory.

You will probably want the application to run automatically when the computer starts up. One way is to drop the app into Configure -> Boot -> Run. Another way is to edit the Desktop file: on an Iyonix, for example, this is normally found in the $.!Boot.Choices.Boot directory. Add a line such as:

Filer_Run $.Apps.!JDServer

- but note that, if you decide to put the !JDServer somewhere other than in $.Apps, you'll have to modify the above line to suit.

Upgrade

To upgrade from any of the previous versions, simply drag the new !JDServer application over the old one. All your choices will be preserved (they are stored in the proper Choices: system).

Printer type

The "Filetype" menu item leads to a submenu where you choose the filetype that JDServer sends to the Printer Manager. If you have a PostScript-compatible printer, the files should be of type "PoScript". For all other printers, the files should be of type "Printout". JDServer defaults to "Printout" on first installation. Your choice is saved in the Choices: directory system, so, whenever JDServer starts, it uses the saved choice.

Port number

The standard port number for JetDirect/Raw printing is 9100, and that's the way the !Run file is written. In the unlikely event that you want JDServer to listen on a different port instead, you can modify the !Run file:

• If JDServer is running, quit it;

• Open the !JDServer application directory by shift-double-clicking on !JDServer;

• Open !JDServer's !Run file by shift-double-clicking it;

• Find the line that says "Set JDServer$Port 9100";

• Change the port number to your chosen value and save the file;

• Close the !JDServer directory.

• Run JDServer again if you wish.

Running

If you've added the line to the Desktop file, JDServer should run automatically whenever the computer starts. Otherwise just double-click on the !JDServer application. JDServer will silently refuse to run a second instance of itself (except to reinstate the icon bar icon - see below).

Running without an icon bar icon

If you want to run JDServer without an icon on the icon bar, click the "No icon" menu item. Just as with the filetype above, the choice is saved in the Choices: directory system, so, whenever JDServer starts, it uses the saved choice.

To get the icon bar icon back again, double-click on the !JDServer application.

If JDServer is running without the icon bar icon, and you simply want to quit it for some reason, you can of course do that from the Task Manager.

Connecting to it - General

When setting up a client computer to use the printer, you will need to tell the client the RISC OS machine's IP address. If you also need to tell it the port number, it's 9100, which is the standard port for the JetDirect/Raw protocol - unless you've modified the !Run file as described above. Some operating systems will find which protocol is on offer, on condition that it's using the standard port, so you may not need to tell it.

Connecting to it from another RISC OS machine

These instructions are for setting up the client RISC OS machine, and assume that you have the RISC OS Printers app installed (with or without Gutenprint) and running, with a driver installed for the printer that is on the JDServer machine.

You will need to get the JetDirectFS module, currently available from http://www.sbellon.de/sw-modules.html and ensure that it is RMRun'd before trying to print anything.

Open up the "Connections" window for the printer and set it to print to File with a filename of the form:

JetDirectFS:myserver

replacing "myserver" with either the hostname or IP address of the JDServer machine. If you used a non-standard port number, add a colon and the port number to the filename.

Connecting to it from Windows 7

• Click Start -> Devices and Printers;

• Click "Add a printer";

• Click "Add a network, wireless or Bluetooth printer";

• Click "The printer I want isn't listed" (otherwise you will have a long wait for the next page);

• Select "Add a printer using a TCP/IP address or hostname" and click Next;

• From "Device type", select "TCP/IP Device";

• In "Hostname or IP address", enter either the hostname (if Windows can resolve it), or the IP address, of the computer running JDServer;

• In "Port name", you may want to overwrite the text that Windows copied, with a name of your choosing, so that you can remember what this port relates to;

• Ensure "Query the printer and automatically select the driver to use" is NOT checked;

• Click Next;

• At this point there is usually a long delay while Windows tries and fails to find JDServer. When it gives up, a window opens saying "Additional port information required". Select "Custom" and click "Settings...";

• In "Protocol", ensure that "Raw" is checked;

• In "Port Number", make sure that the number is the port number you have chosen - this is 9100 by default;

• Click OK;

• Click Next;

• Select the make and model of printer and click next;

• Edit the printer name if you wish, then click Next;

• You can print a test page (this is a good idea to test that the system is working). Finally, click Finish.

Connecting to it from Windows XP

Rather bizarrely, Windows XP considers a printer connected via a network as being connected locally. So, to get XP to print to JDServer:

• Run the "Add Printer" wizard;

• Select the "Local printer attached to this computer" button;

• Ensure that "Automatically detect and install my Plug and Play printer" is not selected;

• Click "Next";

• Select "Create a new port:" and choose "Standard TCP/IP Port" from the drop-down list;

• Click "Next";

• Fill in the "Printer Name or IP Address" box with either JDServer's host computer's name (if Windows can resolve it) or IP address;

• You probably want to put a meaningful name into the "Port Name" field, so that you can remember what Windows is pointing at;

• Click "Next". You may now have to wait a surprisingly long time for the next step;

• With "Device type" "Standard" selected, choose your printer type from the drop-down list;

• From there on it's like selecting any other printer in Windows; select the make and the model.

My thanks to Doug Munsinger for that solution.

Connecting to it from Mac OS

These instructions were kindly supplied by Richard Porter.

• First of all, JDServer needs to be running, otherwise Mac OS will come up with an error message "Unable to verify the printer on your network." If this happens you can click "Continue" and it will set up the printer anyway, but, if JDServer is running, it will save trouble.

• Go to "System Preferences" and click "Printers & Scanners";

• Click on the + sign near the bottom left corner. The "Add" window will open;

• If you can see the "Advanced" tool, skip the next three steps;

• On the pop-up menu (Ctrl-click) click "Customise toolbar";

• Drag the "Advanced" tool on to the "Add toolbar";

• Click on the "Advanced" tool. You'll see "Searching for printers";

• When the setup form appears, enter:

Type: JetDirect
Device: Another Device (only option)
URL: socket://<LAN IP address of your JDServer computer>:9100
Name: Whatever you want to call it, e.g. JDServer
Location:
Use: Generic PostScript Printer, or as appropriate

• Click "Add". A window pops up "Setting up device" then it and the "Add" window close;

• In the "Printers & Scanners" window you should see your printer in the Printers list on the left. If desired Ctrl-click on the printer and select "Set default printer".

On a Macbook you can use two-fingers-click instead of Ctrl-click.

Limitations

• JDServer will only print to the currently selected printer.

• JDServer will only accept 10 simultaneous print streams.

Download

You can download JDServer here.

Revision history

0.01 2009 October 17 First issue
0.02 2009 December 5 Added "No icon" facility
0.05 2012 July 30 File copy handled internally. Revised Help file. Better error handling
0.06 2012 August 17 File copy handled by OS_FSControl 26. Fixed bug that sent wrong length to Message_PrintSave
0.07 2012 September 30 Added another method to determine host address
0.08 2013 April 28 Can no longer create a second icon on the icon bar. App name in Task Manager changed to JDServer
2015 January 7 Added printer setup instructions for Windows 7 and Mac OS. No change to the application code
2015 January 10 Added printer setup instructions for RISC OS. No change to the application code

Page last updated 2015 January 10