ModSnmp Manual - Introduction

Introduction

ModSnmp is an SNMP to Modbus bridge - that is, it converts between SNMP (Simple Network Management Protocol) and the Modbus protocol.

ModSnmp acts as an SNMP agent, handling requests from SNMP managers [1]. It handles an SNMP request by sending a corresponding Modbus request (or requests) to a Modbus slave (or slaves) [2] and using their responses to construct an SNMP response. Note that ModSnmp acts as a Modbus master when it communicates with Modbus slaves.

Running ModSnmp

ModSnmp can be run with a GUI, or without a GUI as a server process. It is normally run as a server process (see the Running as a server section), but must be initially run with a GUI interface in order to configure various settings.

To run ModSnmp with a GUI, use the command:

java -jar modsnmp1.15.jar

You will need to use the full pathname for the modsnmp1.15.jar file if it's not in your current directory.

To run ModSnmp under Windows, you can also use the Windows Run dialog or double-click on the icon or filename.

To exit from ModSnmp, select the FileExit menu item or click the close button of the main window.

Setup overview

When you start ModSnmp the main window (Figure 1, “Main window”) is displayed.

At the top of the window are the usual menu bar and tool bar.

At the bottom of the window is a "status bar", which is used to display error and information messages. Many of the error messages displayed in the status bar have an Error Help button, which provides help on the error message (you can also get this help by pressing the F4 key).

On the left side of the main window there is a list of settings options. When you select one of these options, a panel is displayed on the right side of the window, which contains the items corresponding to the option.

The settings options are in five groups:

  • Modbus Interfaces: These are used to configure the Modbus master component of ModSnmp - that is, how ModSnmp communicates with Modbus slaves. These options are described in the Modbus Interfaces section.

  • SNMP: These are used to configure the SNMP agent component of ModSnmp - that is, how ModSnmp communicates with SNMP managers. These options are described in the SNMP Setup section.

  • Modbus OIDs: These are used to configure the conversion between the SNMP and Modbus protocols. These options are described in the Modbus OID Settings section.

  • Constant OIDs: These are used to configure fixed responses to SNMP requests. These options are described in the Constant OID Settings section.

  • Logging: This is used to configure the logging of error and information messages. This option is described in the Logging section.

Each panel has buttons for various actions, typically an Apply button (which saves the changes you have made), a Reset button (which restores the settings to their last saved state), and a Help button (which provides help on the panel - you can also get halp by pressing the F1 key).

Each panel also has a "status bar" below its buttons, which is used to display error and information messages that are specific to the panel. Many of the error messages displayed in the status bar have an Error Help button, which provides help on the error message (you can also get this help by pressing the F4 key).

The list of settings options uses colour-coding to indicate the state of the corresponding panel:

  • Blue/grey: The panel is selected (i.e. displayed in the window).

  • Yellow: The panel has unapplied changes.

  • Red: The panel has an error message in its status bar.

Saving and restoring the settings

ModSnmp's settings can be saved to a disk file by selecting the FileSave Settings menu item. This displays a dialog that enables you to enter or select the name of the file to save the settings to. ModSnmp's settings are saved to the file in an XML format.

To restore the settings from a file, use the FileLoad Settings menu item. This displays a dialog that enables you to enter or select the name of the file to restore the settings from. If ModSnmp is "running" (i.e. the Run button is depressed), you will have to click the Run button before you can load the settings.

You can also load the settings from a file when you start ModSnmp, by passing the name of the file as a command-line argument, e.g.:

java -jar modsnmp1.15.jar config.xml

See the section Command line options for more information.

There is, currently, no formal DTD (Document Type Definition) or XML schema for the format of the XML files in which the settings are saved. However, the format should be fairly evident to a human reader, and can easily be edited, if necessary, using a text editor.



[1] If you are not familiar with SNMP terminology, you may find it helpful to substitute "SNMP client" for "SNMP manager", and "SNMP server" for "SNMP agent".

[2] In this manual the traditional Modbus terms "master" and "slave" are used. If you are from a networking background, you might find the manual easier to read if you substitute "client" for "master" and "server" for "slave".