Printing

 

Adding a printer (LPD printing)

Configuring LPD

Configuring iocommd

 

Adding a printer (LPD printing)

The access server supports LPD printing from network hosts to a printer connected to a serial port.

  1. Use a cable as specified in Connectors and Cabling.
  2. On the IOCOMM Main menu page, select Serial ports configuration.
  3. Select the port number to which you have attached the printer.
  4. Select Access options.

    Note: The Description field is for information only.

  5. Check that Available for outgoing services is selected.
  6. Select No Access.
  7. Select Physical parameters.

    Note: The Terminal type field is for information only and is not relevant for printing.

  8. In the Attached device field, select the down arrow and then choose Printer.

    Note: You can copy this printer configuration to other ports by selecting the port number in the port list at the bottom of the page.

  9. In the Baud rate field, select the down arrow and then select the appropriate baud rate from the list provided.
  10. Select the Expert button.
  11. Set Character framing to match the settings for your printer by selecting the down arrow and then selecting the appropriate setting. The Inactivity timeout should be set to No timeout.
  12. Select Check here to reset port and make changes immediate.
  13. Select Submit; you will be returned to the Serial ports configuration main page.
  14. Select Return to the Main menu.
  15. Select Global configuration and then LPD printer groups.
  16. Ensure that the Enable LPD box is checked.
  17. If you wish to use a generic print name such as port1, check the Enable generic printer names box. If you use a generic print name you do not have to create an entry for a new LPD printer group. However, you can select Enable generic printer names and create an LPD printer group entry.
  18. If you wish to create a new LPD printer group entry, select Create new entry. If not, go to item 23.
  19. Select the box(es) for Enable LF to CR-LF mapping and Enable trailing Form Feed if you require these options. For an alternative method of enabling these functions see Configuring LPD.
  20. Enter the printer group name in the Printer group name field (e.g. hp_print).
  21. Enter the printer group description in the Description field (e.g. sales laserjet pr).
  22. Select the port number to which the printer is attached (as entered in item 3).
  23. Select Submit.
  24. Select Return to the Main menu.
  25. The port is now set up. Send a print job to the IOCOMM to test printing.

If you experience problems, re-check the settings you have made and also refer to Troubleshooting.

Configuring LPD

There are two methods of printing from the IOCOMM; LPD and iocommd. LPD is the recommended method, however, this will depend on your application and operating system.

LPD is the Line Printer Daemon protocol supported by most operating systems including Windows® and Unix. Check our FTP site for an LPR spooler for Windows® 95.

The client is the machine that contains the file to be printed and may be running one of a range of operating systems and applications. The client must support LPD. Unix systems normally include a version of LPD and there are a number of TCP/IP applications for DOS/Windows® that also support LPD.

When printing via LPD the client refers to the printer by IP address (or the name associated with this address from the Host table) and printer name or queue name. This may take one of three forms:

For example if the queue name is server_name9 (or server_name09) then serial port 9 will receive the print job. The Printer group name field in the LPD printer group menu does not need to be set.

Note: There is a maximum limit of 15 LPD connections per access server, which may be distributed to all of the available LPD ports as required. If the maximum is exceeded then the request is rejected and the connection is closed.

At present it is possible to print from Windows® 3.11 or DOS, although this will normally be accomplished via a separate application program like PC/TCP or Netmanage Chameleon. Windows® NT has a built-in LPD utility, and there are shareware packages on the Internet for Windows® 95 (check our FTP site).

LPD may be used to connect a printer that will be shared between both Windows® and Unix machines.

The actual printer will be referenced by the name of the IOCOMM serial port or, by the IOCOMM and port number.

Hunt groups are supported by the access server. To use this facility, you must specify the same print/queue name in the Unix string (e.g. laser1) as set in the Printer group name field in the LPD printer groups option (under Global configuration on the IOCOMM Main menu).

The Unix host should have a printer database, for BSD type systems this will be the file /etc/printcap and there should be an entry within this file for the server's LPD port that looks something like the following example (shown with no trailers being used):

lp|Laser Printer:\
:lp=:rm=accs_serv:rp=laser1:sh:sf:mx#0:\
:sd=/var/spool/output/laser1:lf=/var/log/lpd-laser1-errs:

Printing could then be accomplished using the following command:

lpr -Plp <file>

A limitation of printing with LPD on the IOCOMM is that no formatting of text can be carried out by the IOCOMM firmware. This is due to the lack of a spooler utility in the IOCOMM and the data being forwarded directly to the serial port. To overcome this, the local host must perform all of the necessary processing.

Note: The IOCOMM LPD printer group page on the IOCOMM web browser, enables you to map line feed to carriage return-line feed (LF to CR-LF) and enable form feed. If these options are enabled in the web browser, these attributes will apply to all print jobs. There are two ways to disable these attributes; one is to un-select the setting in the web browser page, the other is to use the raw trailer in the print command, as detailed below. If only some of your print jobs require these functions to be enabled, you have the option of leaving the browser set-up disabled and adding a trailer switch in the print command to set these options on a job-by-job basis.

For example, to force form feed on a particular print job, you could change the first print command example shown, to include the form feed trailer as shown below:

lp1|Laser Printer:\
:lp=:rm=accs_serv:rp=laser1_ff:sh:sf:mx#0:\
:sd=/var/spool/output/laser1_ff:lf=/var/log/lpd-laser1-errs:

As an alternative, the following + trailer can be used to set form feed:

lp2|Laser Printer:\
:lp=:rm=accs_serv:rp=laser1+:sh:sf:mx#0:\
:sd=/var/spool/output/laser1+:lf=/var/log/lpd-laser1-errs:

In the same way, you can set LF to CR-LF, as shown in the example below:

lp3|Laser Printer:\
:lp=:rm=accs_serv:rp=laser1_onlcr:sh:sf:mx#0:\
:sd=/var/spool/output/laser1_onlcr:lf=/var/log/lpd-laser1-errs:

Finally, you can set both form feed and LF to CR-LF as shown in the following example:

lp4|Laser Printer:\
:lp=:rm=accs_serv:rp=laser1_ffonlcr:sh:sf:mx#0:\
:sd=/var/spool/output/laser1_ffonlcr:lf=/var/log/lpd-laser1-errs:

Notes: The trailer switch can be specified in either lower case or caps, but generally, you should not mix the two. You can use ff and onlcr trailers in the same statement (as shown in the above example), but you cannot use the + and onlcr in the same statement.

Regardless of what settings you have selected in the IOCOMM LPD printer group page, you are able to output data in raw form (i.e. no form feed, LF to CR-LF or other formatting) by using the text raw in the printer command as shown in the following example.

lp5|Laser Printer:\
:lp=:rm=accs_serv:rp=laser1_raw:sh:sf:mx#0:\
:sd=/var/spool/output/laser1_raw:lf=/var/log/lpd-laser1-errs:

If filtering or formatting is required then a local linking print queue needs to be created. This would be something like the following:

# Local queue to link to accs_serv lpd Printer on port
16
link? 9 laser1| IOCOMM lpd Printer 16:\ :lp=/dev/null:sf:sd=/usr/spool/lpd/laser1:\ :lf=/usr/spool/lpd/lpd_printer/log:of=/etc/IOCOMM/ link-laser1:

The shell script output file link-laser1 has the contents:

#!/bin/sh
lpr -Plp3

This would be sufficient to print a header page and perform form feeds. If a specialised filter program is required for something like a plotter, the script may be similar to:

#!/bin/sh
/usr/local/filter "$@" | lpr -Plp3

Configuring iocommd

The Chase supplied iocommd provides a pseudo TTY interface to Unix print spoolers. This software and the binaries associated with it are available on the CD provided with the IOCOMM or from any Chase web site.

If your system cannot use LPD for printing, then it is suggested you use the Chase supplied utilities. The iocommd utility supplied by Chase can be used for Unix printing only. Iocommd is a Unix tty port redirector.

Note: Some Unix systems may require Transport Layer Interface (TLI) to be fully implemented for iocommd print jobs to complete successfully.

Printing configuration can be carried out on the IOCOMM from a Web browser as follows:

  1. On the IOCOMM Main menu page, select Serial ports configuration.
  2. Select the port number to which you have attached the printer.
  3. Select Access options

    Note: The Description field is for information only.

  4. Check that the Available for outgoing services field is selected.
  5. Select Physical parameters.

    Note: The Terminal type field is for information only.

  6. In the Baud rate field, select the down arrow and then select the appropriate baud rate from the list provided.
  7. In the Attached device field, select the down arrow and then select the Printer option.
  8. Select Expert.
  9. Set Character framing to match the flow control requirements of your printer by selecting the down arrow and then selecting the appropriate setting. An Inactivity timeout can also be set in the same way. If required, select the appropriate box(s) for Special wiring.
  10. Select Check here to reset port and make changes immediate.

    Note: At this point, it is advisable to make a note of the settings chosen. Print the browser page for future reference.

  11. Select Submit. You will be returned to the Serial ports configuration main page
  12. Select Return to the Main menu.
  13. On the IOCOMM Main menu page, select Outbound services configuration.
  14. Select Create new entry.
  15. Enter the print queue file name in the Service name field (e.g. HP_laserjet). This can be any name you wish to assign, but must be one continuous string (no spaces).
  16. Enter the print queue description in the Description field. This can be any description you wish to assign and can include spaces.
  17. In the TCP port field enter an appropriate port number. This can be any unused number in the range 10001 to 65535.
  18. Select to activate/deactivate as required in the Configuration option fields.

    Full carrier indication required
    This waits to see a carrier detect signal.
    Output translation: map LF to CR-LF
    This maps new line to carriage return/new line.
    Output only: ignore input from port
    This ignores all input signals from the port.
     
  19. Select the port number to which the printer is attached.

    Note: This should be the same port number as set in the Serial ports configuration menu item 2.

  20. Select Submit.
  21. Select Return to the Main menu.

On the host side:

If you are already familiar with iocommd, all you have to do for the above configuration is create the following file:

# iocommd -P (server name) 10006 (device
name)

This will start the iocommd process and create a device in /dev. If you are not familiar with the iocommd program see the iocommd section more details.

000127


Links to Configuration Tasks

Getting Started | Web Access | First Time Configuration Tour | Configuring DNS on IOCOMM | Changing Serial Line Configuration | Resetting a Serial Port | Using a Modem for Dial-in Operation | Outgoing Services | Disable Access | Adding a Terminal | Configuring the Synchronous Port (B) | Printing | Configuring RADIUS | Local Authentication | Dynamic Routing (RIP) | Enabling TCP Security | Global Messages | Configuring Status Logging | Telnet Service (telnetd) | Monitoring Status | Making Changes to IOCOMM