SNMP Driver

Not counted towards your tag license limit.

The SNMP driver can be used to communicate with any device that uses the Simple Network Management Protocol (versions 1, 2c or 3).

Driver Errors: To learn more about the cause of an error condition, refer to the Driver Summary Report and the Driver Error Report, both of which are available in the Reports page. The Show Stats button will also provide current and last error messages: Show Statistics Button Widget

SNMP data types influence your selection of I/O tag:

SNMP supports 12 data types. These are passed directly to the I/O tag, where further processing may be required.

  • SNMP data types: Integer32, Unsigned32, Gauge32, Counter32, Counter64 and TimeTicks can be used with numeric tag types.
  • SNMP data types: Integer(Enumerated), Octet String, Object Identifier, IpAddress, Opaque and Bits should be read in with a String I/O tag, with additional processing done using a Calculation tag as required.

SNMP drivers will commonly connect to UDP on port number 161 or 162, although variations may be found.

VTScada supports only ASCII-encoded MIB files.

Reference Notes:

I/O tags that are configured to use an SNMP driver will have an address selection feature. A button labeled "MIB" (management information base) will be added beside the Address field of the I/O tab. Clicking this will open an SNMP Address Select window (Address Assist / Address Select), from which you can choose the correct Object Identifier (OID) address.

The SNMP driver requires more configuration than other drivers. You will need to obtain the MIB library for your device from the manufacturer and you will need to tell VTScada where to find this information. See SNMP Addressing for details and configuration steps.

SNMP v3 Security

SNMP Driver properties, Communications tab

Use the Communications tab to select the port through which this driver will communicate as well as options for handling communication errors. In addition to the port parameters, this tab provides a location for you to specify the name of the SNMP group to which this driver instance will belong.

SNMP tag - communications tab

Port

Use the tag browser button to select the TCP/IP or UDP port tag to which the remote equipment is attached. The X button can use used to clear the current selection.

Maximum PDU Length (Bytes)

Use to specify the maximum length, as measured in bytes, of the Protocol Data Unit. This value need only be changed from the default if a different value is required by the equipment with which you will be communicating.

SNMP Group

The name of a VTScada RPC service to which this driver instance will belong. Alternate RPC services need only be created if your application uses multiple servers on separate sub-nets. In most applications you should leave the default value for this field.

Time-Out Limit

In the event that a connection cannot be made, sets the number of seconds until another attempt will be made.

Retries

The number of times to retry a message before declaring an error.

Use only if the driver is connected to a Serial port. When using TCP/IP, do not set to any value other than 0.

Hold

Check this to have I/O tags attached to the driver hold their last value in the event of a communication failure. If not checked, tags will have their value set to invalid on a communication failure.

Store Last Output Values

When selected, the driver will maintain a record of the last value written to each output address. This may be useful in at least two situations:

  • For hardware that does not maintain its state during a power loss and must be restored to that state when re-started.
  • When failed hardware is replaced by a new device and you would like to start that device with the values last written to the old one.

If the last output values are stored, they may be re-written by either of two methods:

  • Automatically, when communication is restored to the device.
  • Manually by way of a button press. See, Rewrite Outputs Widget for details.

Changing this value from selected to deselected will cause all stored values to be erased immediately.

If this driver is being used in conjunction with a Driver Multiplexer, then configure the Driver Multiplexer to store the last values, not the drivers connected to the Multiplexer. In this case, only the Multiplexer should be configured to re-write automatically.

Enable Auto Rewrite

If selected, the Store Last Output Values option will also be activated. This option causes the driver to rewrite the last value written to each output, in the event that communications are lost and then restored.

Use this option only if you are certain that you want the last values to be rewritten automatically after an interruption in driver communications.

SNMP Driver properties, Agent tab

Provides configuration options related to the SNMP device with which this driver will communicate.

Format for SNMP 1 and 2c.

SNMP Version

Select the simple network messaging protocol version that the agent is using. Supported versions include 1, 2c and 3. Defaults to 1. Selecting version 3 will cause the available configuration parameters to change as shown

(v1 & v2c) Read Community String

Used for authentication of the device. The default value of "public" should have been changed on the device in the interest of improved security.

(v1 & v2c) Read/Write Community String

Similar to the Read Community String, this value is used to authenticate an SNMP device that will be used to both read and write information. Like the former, this value should be changed on the device from the default of "public".

(v3) Username

The name required for authentication.

(v3) Context Name

A context is a collection of information accessible by an SNMP entity. A SNMP Engine may contain one or more contexts, where the default context has an empty name. Information is not constrained to a single SNMP Engine ID or context. The same information can be available via different means. A context is used to define information subsets. For example, an SNMP Engine exposed to this driver might contain multiple components, each of which implements MIB items that may have conflicting OID info. The concept of a context was introduced to avoid this ambiguity. For simple devices the default context is sufficient.

SNMP Driver properties, Traps tab

In general, it is recommended that the Allow Traps option be disabled unless explicitly required.

Used to specify the port on which the driver will listen for unsolicited (Trap) messages. The intended purpose of Traps in SNMP is to notify the network management service so that it can investigate as required. They are not intended to set data because doing so represents a weak point in security (although, many devices use Traps to do exactly that). Traps typically contain messages such as a timestamp and an event OID such as a device restart.

The port number defaults to 162. Should not match the local or the remote port number.

You may set the port number to zero (0) to prevent the SNMP driver from accessing the port. This may be useful in the case that the driver should not open a port or receive traps.

SNMP tag - traps tab

The following notes are for SNMP version 3 only:

Additional configuration options, within the Trap Data block will be enabled when SNMP v3 is in use.

When filtering for a specific SNMP user, check that the minimum security level is set as required. Note that the user/security-level/context setup on the Agent tab is for commands (Get/Set/GetBulk) and has no effect on traps.

Security levels available when SNMP v3 is in use include:

  • Accept traps with no security
  • Only accept authenticated traps.
  • Only accept authenticated and encrypted traps.

SNMP Driver properties, Informs tab

Set the credentials required to allow incoming Informs messages.

The authentication password field is enabled only when the security level is set to at least Authentication Only. The Privacy Password field is enabled only when the security level is set to Authentication and Encryption.

Security levels are set within the Agent tab.