IBM Support

Configuring a *LAN 3812 SNMP Device Description

Troubleshooting


Problem

This document contains information on configuring *LAN 3812 SNMP device descriptions for LAN attached ASCII printers.

Resolving The Problem

This document contains information on configuring *LAN 3812 SNMP device descriptions for LAN attached ASCII printers. The term SNMP refers to Simple Network Management Protocol. SNMP allows for two-way communication with the printer when attached to the LAN using a print server that also supports SNMP. Support for the SNMP print driver is available in the base code for the R450 operating system and above, and it was added to the R430 and R440 operating system through PTFs. This is an alternative to using Remote Output Queues (RMTOUTQs). *LAN 3812 SNMP device descriptions fully support the page range function.

Support for the SNMP print driver is largely dependent on the internal network interface card (NIC) or external print server used with the printer. Therefore, this column is as much of a statement about the NIC card or print server typically shipped with the printer, than it is about the printer itself. If it is unclear whether the network interface card (NIC) or print server and/or printer supports SNMP, contact the manufacturer.

Creating an SNMP Printer Device Description

This video shows how to create an *LAN 3812 printer device description that uses the SNMP print driver.

Hardware Requirements for *LAN 3812 SNMP Device Descriptions

There is no guarantee that printers that support *LAN 3812 PJL device descriptions will also support SNMP (or vice versa). For a *LAN SNMP device description to work, the following hardware requirements must be met:

  1. The printer connected via this print driver must support the industry standard Host Resource Management Information Base (RFC 1514). It is highly recommended (but not required) that the printer also support the Printer Management Information Base (RFC 1759).
  2. If the printer is connected to a network adapter, the adapter must be compatible with the printer and it must also support the Host Resource Management Information Base (RFC 1514).
    Note: Consult the manufacturer of the adapter to determine if it supports the printer, since some network adapters do not support all printers.
  3. If the printer is connected to an external network adapter that has more than one port, the printer should be connected to the first parallel port and there should be no other SNMP capable devices attached to the adapter.
  4. The printer and any adapter connected via this print driver must have set, at a minimum, a community name of "public". The community name of "public" is normally a factory default setting. Community names are a means of access control for SNMP devices. Read-only access to the "public" community is sufficient.

    Note: As of 6.1 PTF SI54993, 7.1 PTF SI50661, and the base code for 7.2 i5/OS, the SNMP system driver program will now attempt to connect with the printer using each community that is listed in the system SNMP configuration file, until it finds a community that is supported by the printer. If unable to access the printer community using any of these names, the SNMP system driver program will attempt one last time using the "public" community before failing with message CPD401A "Could not establish SNMP communications with device &1".

    To update the community names in the configuration file, run the following Configure TCP/IP Applications (CFGTCPAPP) command, CFGTCPAPP APP(*SNMP), and take Option 2 (Work with communities for SNMP), then take Option 1 (Add) to add the community name used for your SNMP printer. The change will take effect the next time the writer for your *LAN 3812 SNMP printer device description is started.

    Note: The IBM i SNMP code will accept any non-whitespace character that can be translated from the job CCSID to CCSID 500 and to ASCII CCSID 437 for the community name. Whether the receiving SNMP agent, such as the printer, supports the same set of allowable characters or the same ASCII CCSID will depend on the printer's implementation of SNMP. Meaning, some printers may accept special characters such as an exclamation mark (!), ampersand (&), or at sign (@), but others may not. Please contact the printer manufacturer or visit their website to find out what restrictions might apply for the SNMP community name on their hardware.

Note: Unlike *LAN 3812 PJL device descriptions, there is no requirement to use an IEEE 1284, bi-directional printer cable or to have the print server in BITRONICS, BI-DIRECTIONAL or ECP/MLC mode to print using a *LAN 3812 SNMP device description.

For a list of known printers that support SNMP, refer to Information on Printers from Various Manufacturers.

Required PTF Levels

There are no required PTFs in order to print using a *LAN 3812 SNMP device description, unless you plan to use SNMPv3 on IBM i 7.3 or 7.4. Beyond that, applying the latest recommended fixes for your release will typically help you avoid problems.

The IBM i Support: Recommended Fixes web page contains a list of recommended fixes for all systems and for specific products or functions for a given Version, Release, and Modification Level.

Notes on SNMPv3 Printing Support

IBM i 7.5 introduced SNMPv3 printing capability and this has been PTF'd back to 7.3. SNMPv3 printer configuration requires the use of two additional parameters on the device description, SNMP user name (SNMPUSR), and SNMP context name (SNMPCNTX). Follow these steps to enable SNMPv3 on the IBM i for printers configured to use the *IBMSNMPDRV system driver program.

  • Ensure the Allow SNMPv3 support (ALWSNMPV3) parameter on the Change SNMP Attributes (CHGSNMPA) command is set to *YES to allow both SNMPv1 and SNMPv3 messages or *V3ONLY to support only SNMPv3 messages.
  • Add the SNMP user configured on the printer hardware to the IBM i using the Add User for SNMP (ADDUSRSNMP) command.  The authentication protocol (AUTPCL), authentication password (AUTPWD), privacy protocol (PVYPCL), and privacy password (PVYPWD) parameters must match the authentication and privacy protocols and passwords configured on the printer hardware.
  • Create the printer device with the Create Device Description (Printer) (CRTDEVPRT) command specifying SYSDRVPGM(*IBMSNMPDRV) and the SNMP user name (SNMPUSR).  If an SNMP context is configured on the printer hardware, then it must also be specified for the SNMP context name (SNMPCNTX) parameter.  Otherwise, specify SNMPCNTX(*NONE).  CHGDEVPRT also supports specifying the SNMP user name and SNMP context name.  This is only available for 3812 LAN attached printers.   

PTFs needed to enable SNMPv3:

IBM i 7.3 - SI77454 and SI77692 add SNMPv3 printer support and update the CRTDEVPRT and CHGDEVPRT commands.

IBM i 7.4 - SI85369 adds SNMPV3 support to the CRTDEVPRT and CHGDEVPRT commands.

Configuration Instructions

To take advantage of this new function, the printer connected using this print driver must have a dedicated port that accepts SNMP commands.

To configure an SNMP device, use the CRTDEVPRT command. The following parameters should be specified:

Device Class (DEVCLS)
This needs to be set to *LAN.

Device Type (TYPE)
This needs to be set to 3812.

Device Model (MODEL)
This needs to be set to 1.

LAN Attachment (LANATTACH)
This needs to be set to *IP.

Port number (PORT)
This specifies the port number that the LAN-attached printer or LAN print server is expecting for SNMP data. The port number is specific to the print server hardware, not the printer hardware but is typically set to one of the following:

o 9100 for HP LaserJets, Lexmark Optras, and IBM/Lexmark 4039s and 4049s.
o 9100 for HP LaserJet or compatible printers that are connected to an external HP JetDirect print server, since the hardware requirements state that the printer should be connected to the first parallel port and there should be no other SNMP capable devices attached to the adapter.
o 2501 for IBM Network Printer 12, 17 and 24 (4312, 4317 and 4324), IBM InfoPrint Color 8 (4308), and IBM InfoPrint 20, 32 and 40 (4320, 4332 and 4340).
Typically, this is the same port number value that is used for a *LAN 3812 PJL device description, but there is no guarantee that the port number will be the same or that a printer that supports PJL will support SNMP (or vice versa). For a complete list of known SNMP port number values, please refer to the following document:

N1019571: Recommended SNMP Port Number Values for *LAN 3812 SNMP Device Descriptions

If this document does not list an SNMP port number value for your printer hardware, consult the manufacturer of your printer and/or print server to determine if they have a dedicated port that accepts SNMP commands. If they provide you with an SNMP port number value that works, please contact the Rochester Support Center at 1-800-IBM-SERV so this information can be added to document New.

Note: SNMP communications requires communicating with an SNMP-capable printer using the TCP/IP port specified in the Port (PORT) parameter in the *LAN 3812 SNMP device description and also using TCP/IP port 161. If the wrong port is specified for the printer, or if the correct port is specified but either that port or port 161 are being blocked by a router, switch, firewall or SOCKS server, then the *LAN 3812 SNMP DEVD will fail to connect.

Font (FONT) = 011
This is typically set to 011, which is the default 10 CPI font. A font ID is required to create the device description. Unless special requirements in your operation dictate something different, this should suffice.

Form Feed (FORMFEED)
This defaults to *TYPE, but should be set to *AUTOCUT if printing to a cut sheet printer (such as an IBM InfoPrint 21) to indicate that the printer automatically feeds cut sheet paper and should be set to *CONT if printing to a continuous forms printer (such as an IBM 6400). Leaving this set at *TYPE or setting it to the wrong value can cause problems with both drawer selection and paper size.

Printer Error Message (PRTERRMSG)
This defaults to *INQ, but should be set to *INFO so the printer's message queue will receive informational messages whenever possible. If this is set to *INQ and a problem occurs on the printer (such as out of forms or a paper jam) a message will be sent to the printer's message queue that must be answered before printing can continue. Often, this can also cause the writer to end while in the middle of a spooled file.

Message queue (MSGQ)
This defaults to *CTLD, which indicates the message queue defined in the attached controller. There is no attached controller for *LAN printer device descriptions, so leaving the Message queue (MSGQ) parameter set to *CTLD will in affect set it to the QSYSOPR message queue in library QSYS. If another message queue is to be used for this particular printer device, verify that the message queue exists before entering the message queue and library in the MSGQ parameter. Otherwise, the CRTDEVPRT command will fail with message CPF2799 - Message queue &1 in library &2 not found.

Note: The Queue for writer messages (MSGQ) parameter on the Start Printer Writer (STRPRTWTR) command defaults to *OUTQ, which means that writer messages are sent to the message queue specified in the MSGQ parameter in the printer device description. Another message queue can be specified when using the STRPRTWTR command to start a printer writer, or the message queue can be changed after the printer writer has been started by using the Change Writer (CHGWTR) command.

Activation Timer (ACTTMR)
This defaults to 170 (seconds), but can be set to any value from 1 to 2550 seconds (or 42.5 minutes). The activation timer refers to the amount of time to wait for the LAN-attached printer device to respond. The printer device is considered not available, and an error message is posted if there is no connection before this timer expires.

Inactivity Timer (INACTTMR)
This defaults to *ATTACH, but can be set to any value from 1 to 30 (minutes), as well as *SEC15 (15 seconds), *SEC30 (30 seconds) or *NOMAX (no maximum). This value determines when the print driver closes the connection to the printer (freeing it up to received spooled output from another source) once there are no OS/400 spooled files left in RDY (ready) status. It is recommended that this be set to *SEC15 so OS/400 will free up the printer 15 seconds after all RDY spooled files have been processed. Setting it to *NOMAX will cause OS/400 to maintain the connection until the writer is ended, so the printer device will not be shared with other systems. For *LAN printer device descriptions, *ATTACH maps to the recommended value of *SEC15.

Host Print Transform (TRANSFORM)
This needs to be set to *YES so the OS/400 system's Host Print Transform (HPT) function will convert both SCS and AFPDS spooled files to the printer's data stream.

Manufacturer Type and Model (MFRTYPMDL)
This indicates the type of ASCII printer being used. This value is used by HPT to determine what ASCII controls to use when converting the spooled file from SCS or AFPDS to ASCII. For recommendations on the value to use for certain known printers, please refer to the following document:

N1019605: Information on Printers from Various Manufacturers

Paper source 1 (PPRSRC1) and Paper source 2 (PPRSRC2)
These parameters indicate the paper size used in paper source 1 and paper source 2 in the printer hardware. The default value is *MFRTYPMDL, which indicates that the paper size will be determined based on the default paper size for the Manufacturer type and model (MFRTYPMDL) setting selected. Other choices for the PPRSRC1 and PPRSRC2 parameters include the following:
 
*LETTER Letter sized (8.5 x 11 inch) paper
*LEGAL Legal sized (8.5 x 14 inch) paper
*LEDGER Ledger sized (11 x 17 inch) paper
*EXECUTIVE Executive sized (7.25 x 10.5 inch) paper
*A3 A3 sized 297mm x 420mm (11.7 x 16.5 inch) paper
*A4 A4 sized 210mm x 297mm (8.3 x 11.7 inch) paper
*A5 A5 sized 148mm x 210mm (5.85 x 8.3 inch) paper
*B4 B4 sized 250mm x 353mm(10.1 x 14.3 inch) paper
*B5 B5 sized 176mm x 250mm (7.2 x 10.1 inch) paper
*CONT80 Continuous form (8.0 inches)
*CONT132 Continuous form (13.2 inches)
*NONE No paper source specified

Note: If the *LAN 3812 SNMP device description is being configured for a continuous form printer, such as an IBM 6400 line matrix printer, set the PPRSRC1 parameter to *CONT80 or *CONT132. Using *CONT132 rather than *CONT80 can ensure that spooled files will not be printed in a condensed or compressed font because of Computer Output Reduction (COR) processing. Also, the PPRSRC2 should typically be set to *NONE, unless the continuous form printer has a second tractor feed path.

Remote Location (RMTLOCNAME)
This should be set to the printer's TCP/IP address, host name or DNS name. If a TCP/IP address is used, it should be entered without leading zeros (for example, use 192.186.10.2 rather than 186.010.002). If a TCP/IP address is used, verify that operating system can reach the printer by using the PING or Verify TCP/IP Connection (VFYTCPCNN) command with that TCP/IP address. If a host name or DNS name is used, verify that the operating system can reach the printer by using the PING or Verify TCP/IP Connection (VFYTCPCNN) command with that host name or DNS name.

User-Defined Options (USRDFNOPT)
Should be set to *IBMSHRCNN, which causes the print driver to open and close the connection to the data port on the printer for every copy of every spooled file. This allows multiple writers and systems to access the printer while the print driver is active and there are files in ready status.

System Driver Program (SYSDRVPGM)
This specifies the name of a system-defined driver program, which provides the capability to send operating system printer output to a printer attached over a TCP/IP network. This should be set to *IBMSNMPDRV whenever configuring a *LAN 3812 SNMP device description for a printer that is directly attached to the LAN.

Workstation Customizing Object (WSCST)
This is typically set to *NONE, but can be used to specify a modified Workstation Customizing Object (WSCST).

Text 'description' (TEXT)
Specifies the text that briefly describes the printer device description. This text can be seen when working with printer device descriptions when using the Work with Device Descriptions (WRKDEVD) command.

SNMP user name (SNMPUSR)
This is an SNMPv3 Specific option. Specify the SNMP user name if desired.

SNMP context name (SNMPCNTX)
This is an SNMPv3 Specific option. If an SNMP context is configured on the printer hardware, then it must also be specified for the SNMP context name (SNMPCNTX) parameter.  Otherwise, specify SNMPCNTX(*NONE).  

Configuration Example

To configure a *LAN 3812 SNMP device description for an IBM InfoPrint 40 printer, type CRTDEVPRT and press the F4 (Prompt) key. The following is an example of using the Create Device Printer (CRTDEVPRT) command to create a *LAN 3812 SNMP device description:
 

                    Create Device Desc (Printer) (CRTDEVPRT)

 Type choices, press Enter.

 Device description . . . . . . . > IP40SNMP      Name
 Device class . . . . . . . . . . > *LAN          *LCL, *RMT, *VRT, *SNPT, *LAN
 Device type  . . . . . . . . . . > 3812          3287, 3812, 4019, 4201...
 Device model . . . . . . . . . . > 1             0, 1, 2, 3, 4, 10, 13, 301...
 LAN attachment . . . . . . . . . > *IP           *LEXLINK, *IP, *USRDFN
 Port number  . . . . . . . . . . > 9100          0-65535
 Online at IPL  . . . . . . . . .   *YES          *YES, *NO
 Font:
   Identifier . . . . . . . . . . > 11            3, 5, 11, 12, 13, 18, 19...
   Point size . . . . . . . . . .   *NONE         000.1-999.9, *NONE
 Form feed  . . . . . . . . . . . > *AUTOCUT      *TYPE, *CONT, *CONT2, *CUT...
 Separator drawer . . . . . . . .   *FILE         1-255, *FILE
 Separator program  . . . . . . .   *NONE         Name, *NONE
   Library  . . . . . . . . . . .                 Name, *LIBL, *CURLIB
 Printer error message  . . . . . > *INFO         *INQ, *INFO
 Message queue  . . . . . . . . .   *CTLD         Name, *CTLD, *SYSOPR, QSYSOPR
   Library  . . . . . . . . . . .                 Name, *LIBL, *CURLIB
 Activation timer . . . . . . . .   170           1-2550, *NOMAX
 Inactivity timer . . . . . . . . > *SEC15        1-30, *ATTACH, *NOMAX...
 Host print transform . . . . . .   *YES          *NO, *YES
 Manufacturer type and model  . . > *LEXOPTRAT       
 Paper source 1 . . . . . . . . . > *LETTER       *MFRTYPMDL, *LETTER...
 Paper source 2 . . . . . . . . . > *LETTER       *MFRTYPMDL, *LETTER...
 Envelope source  . . . . . . . . > *NONE         *MFRTYPMDL, *MONARCH...
 ASCII code page 899 support  . .   *NO           *NO, *YES
 Image configuration  . . . . . .   *NONE         *NONE, *IMGA01, *IMGA02...
 Character identifier:
   Graphic character set  . . . .   *SYSVAL       1-32767, *SYSVAL
   Code page  . . . . . . . . . .                 1-32767
 Remote location:
   Name or address  . . . . . . . > '9.5.208.46'                                
                                                                                
                                                                                
                                                    
 User-defined options . . . . . . > *IBMSHRCNN    Character value, *NONE
               + for more values              
 User-defined object:
   Object . . . . . . . . . . . .   *NONE         Name, *NONE
     Library  . . . . . . . . . .                 Name, *LIBL, *CURLIB
   Object type  . . . . . . . . .                 *DTAARA, *DTAQ, *FILE...
 Data transform program . . . . .   *NONE         Name, *NONE
   Library  . . . . . . . . . . .                 Name, *LIBL, *CURLIB
 System driver program  . . . . . > *IBMSNMPDRV      
 Secure connection  . . . . . . .   *NO           *NO, *YES
 Validation list  . . . . . . . .   *NONE         Name, *NONE
   Library  . . . . . . . . . . .                 Name, *LIBL, *CURLIB
 Publishing information: 
   Support duplex . . . . . . . .   *UNKNOWN      *UNKNOWN, *SIMPLEX, *DUPLEX
   Support color  . . . . . . . .   *UNKNOWN      *UNKNOWN, *NOCOLOR, *COLOR
   Pages per minute black . . . .   *UNKNOWN      1-32767, *UNKNOWN
   Pages per minute color . . . .   *UNKNOWN      1-32767, *UNKNOWN
   Location . . . . . . . . . . .   *BLANK                          
   Data streams supported . . . .   *UNKNOWN      *UNKNOWN, *PCL, *PS, *PDF...
                + for more values           
 Text 'description' . . . . . . . > '*LAN 3812 SNMP DEVD for IBM IP40'          
      

                            Additional Parameters

 Remote network identifier  . . .   *NETATR       Name, *NETATR, *NONE
 Workstation customizing object     *NONE         Name, *NONE
   Library  . . . . . . . . . . .                 Name, *LIBL, *CURLIB
 Authority  . . . . . . . . . . .   *CHANGE       Name, *CHANGE, *ALL, *USE...


After the printer device description is created, vary on the printer device description using the Vary Configuration (VRYCFG) or Work with Configuration Status (WRKCFGSTS) command. Then, start the printer writer using the Start Printer Writer (STRPRTWTR) or Work with Writers (WRKWTR) command.

Problem Areas for Consideration

Testing the *LAN 3812 SNMP Device Description

If you then place a spooled file in the printer's output queue and it goes to MSGW (message wait) status with MSGCPA3394 "Load form type '&4' device &5 writer &1. (G B I H R C)" then chances are good that the spooled file will print once you answer this message with a "G".

However, if the spooled file stays in RDY (ready) status or goes to PND (pending) status without printing, look in the writer job log for messages that indicate why the spooled file is not printing. If the writer ends, look in the writer job log for messages that indicate why the writer ended.

To look at the writer job, do the following:

Check to see if the writer is still active. If not, look for the failed writer job. On the operating system command line, type the following:

WRKJOB JOB(writer-name)

Press the Enter key. This brings you to the Select Job panel or the Work with Job panel. If it brought you to the Select Job panel, the most current failed writer job is at the top of the list. Select Option 1 on this job, and press the Enter key.

1 Check to see if the writer is still active. If not, look for the failed writer job.
2 On the operating system command line, type the following:

WRKJOB JOB(writer-name)

Press the Enter key. This brings you to the Select Job panel or the Work with Job panel. If it brought you to the Select Job panel, the most current failed writer job is at the top of the list. Select Option 1 on this job, and press the Enter key.
3 If the writer is still active, take menu option 10 (Display job log, if active or on job queue) on the Work with Job panel. Press the F10 key and the Page Up and Page Down keys to view the messages in the writer job log.
4 If the writer has ended, take menu option 4 (Work with spooled files) on the Work with Job panel. From the Work with Job Spooled Files panel, select Option 5 (Display) to display the QPJOBLOG spooled file or Option 2 (Change) to requeue the spooled file to a different output queue so it can be printed.
For information on the most common messages dealing with *LAN 3812 SNMP device descriptions, refer to the following document:

N1019570: Configuration Settings and Error Messages for *LAN 3812 SNMP Device Descriptions

Configuring the Printer and Print Server Hardware

The success of *LAN 3812 SNMP device descriptions is dependent on the configuration settings in the operating system and on the printer and print server hardware. For more information about configuring the time-out values on the printer and print server hardware and common error messages that you can receive when printing through a *LAN 3812 SNMP device description, refer to the following document:

N1019570: Configuration Settings and Error Messages for *LAN 3812 SNMP Device Descriptions
 

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Historical Number

19932815

Document Information

Modified date:
08 February 2024

UID

nas8N1019572