This example shows how to use SNMP to control an embedded system.
The Simple Network Management Protocol (SNMP) is mainly used in network management systems to monitor network-attached devices for conditions that warrant administrative attention. It is the most popular network management protocol in the TCP/IP protocol suite.
The following picture shows an exemplary connection of the development board and a Computer.
The SNMP Agent project is available as part of the Network Reference examples.
Following files implement application-specific logic in the example:
SNMP_Agent.c contains the application main thread which initializes the Network Component.SNMP_Agent_MIB.c contains the mib_data_table. Change this to the application's needs.Configuration files for the software components used in the project are available in the ./RTE/ directory and can be modified to adjust the operation of related components.
Following configuration files are provided with this example:
./RTE/Network/ folder:Net_Config_SNMP_Agent.h: SNMP Agent configuration.Net_Config_UDP.h: UDP Socket configuration.Net_Config_ETH_0.h: Ethernet Interface configuration.Net_Config.h: Network Core configuration.Net_Debug.h: Network Debug configuration../RTE/CMSIS/ folder:RTX_Config.h and RTX_Config.c: CMSIS-RTX Configuration files for the RTOS Kernel.When a board layer is added to the project, corresponding configuration files for the board and device components will become available in the local ./Board/ directory.
In order to build the project it shall be extended with a compatible board layer that provides following interfaces as connections:
CMSIS_ETH: CMSIS-Driver for Ethernet interfaceCMSIS_VIO: CMSIS-Driver for Virtual I/O interfaceSTDOUT: Standard Output redirectionWorking with MDK-Middleware Examples explains the workflow for accessing, configuring and building an MDK-Middleware example project for your target hardware.
Hardware Setup
Board-specific hardware setup such as jumpers, Ethernet ports, power supply, etc. is documented in the board layer description (README.md) of your selected target.
Example execution
To test this example, run the Windows application SNMPTest.exe that is available as part of Keil MDK uVision and is located in <install_dir>\ARM\Utilities\SNMPTest\Release\ folder, where <install_dir> refers to the Keil MDK uVision installation directory. The program runs stand-alone without installation.
Type in the IP address of your Embedded SNMP Agent and click Connect. When connected, you can change the LCD text on the target, control the on-board LED diodes and monitor the state of on-board push-buttons.