Home | Sign in | English EN
  • Overview
  • Activation
  • Implementation
  • Connecting to the device
  • Reading information
  • Identifier, OID and MIB
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
Managing the SNMP protocol
SNMP (Simple Network Management Protocol) is the standard protocol for managing the network devices. The SNMP functions allow you to create applications used to monitor the network elements: PC, servers, switches, robots, ... These functions can also be used to:
  • Monitor the network load
  • Optimize the operating mode of the network
  • Manage the potential network problems.
Remark: SNMP version V1 is supported.
In order for the PCs found on a network to provide information, the SNMP agent must be enabled.
In Windows, the following steps must be performed:
  1. Display the control panel.
  2. Select "Add/Remove programs".
  3. Select "Add/Remove Windows components".
  4. Add (if necessary) the "Management and monitoring tool" module.
  5. Start the Windows service manager and select "SNMP service".
  6. In the service properties (right mouse click), in the "Security" tab, add two communities: a "public" community with read-only rights and a "private" community with read/write rights.
The SNMP functions are implemented in two steps:
  1. Connecting to the relevant device.
  2. Retrieving the requested information.

Connecting to the device

The connection is established by SNMPStartSession.
SessionID = SNMPStartSession("TestDoc", "public")
This function requires:
  • The IP address of the device.
  • The name of the SNMP community with which the dialog will be implemented.
The returned identifier is used to dialog with the device.

Reading information

The information is read in the SNMP tree structure by SNMPGet.
This function requires:
  • the session identifier,
  • the SNMP identifier of the value to retrieve ("" for the RAM for example).
Identifier, OID and MIB
The identifier of the value to retrieve is named OID. This value can be found:
  • on Internet for the standard values.
  • in the documentation of the device. This documentation is called MIB and it groups all the specific values of your device.
Remark: SNMPLoadMIB is used to load in memory the information coming from a MIB in order to use the string identifier of the OID instead of its numeric identifier.
Related Examples:
The SNMP functions Unit examples (WINDEV): The SNMP functions
[ + ] Using SNMP functions
See also
Minimum version required
  • Version 12
This page is also available for…
Click [Add] to post a comment