1.7 TCP/IP SNMP NVM MPFS

The Microchip SNMP Server is a multi-lingual implementation, which supports SNMPv1, V2c, and V3 server features simultaneously. The SNMP Server is implemented to address the requirements of embedded applications and works with both IPv4 and IPv6 addresses.

TCP/IP SNMP NVM MPFS MCC Configuration

The following Project Graph diagram shows the Harmony components included in the SNMP NVM MPFS application demonstration.

  • MCC is launched by selecting Tools > Embedded > MPLAB® Code Configurator from the MPLAB X IDE and after opening the project, TCP/IP demo project is ready to be configured and regenerated.

  • TCP/IP Root Layer Project Graph

    The root layer project shows that UART2 peripheral is selected to do read and write operation for TCP/IP commands.

    This is the basic configuration with SYS_CONSOLE, SYS_DEBUG and SYS_COMMAND modules. These modules are required for TCP/IP command execution.

    tcpip_pic32mz_project

    NOTE - The above diagram contains FreeRTOS component and that is required for RTOS application. For bare-metal(non-RTOS) FreeRTOS component shouldn't be selected.

    The file system component is required to select MPFS module. This is the below snapshot for the FS configuration.

    tcpip_pic32mz_project
  • TCP/IP Configuration

    • PIC32MZ EF Starter Kit

      tcpip_pic32mz_project

  • TCP/IP Required Application

    TCP/IP demo use these application module components for this demo.

    Announce module to discover the Microchip devices within a local network.

    DHCP Client module to discover the IPv4 address from the nearest DHCP Server.

    DNS Client provides DNS resolution capabilities to the stack.

    HTTPNET Server module is selected to run the web_server for the port number 80.

    NBNS NetBIOS Name Service protocol associates host names with IP addresses. This assign of human-name host names to access boards on the same subnet.

    SMTP CLIENT let applications send e-mails to any recipient worldwide.

    SNMP and SNMPv3 are an application layer protocols that facilitates the exchange of management information among network devices.

    Maximum SNMP Message Size can be increased and the value should be multiple of 32 bytes for larger GET-Bulk response.

  • TCP/IP Data Link Layer

    Internal ethernet driver(ethmac) is enabled with the external LAN8740 PHY driver library for both the starter kits. The MIIM Driver supports asynchronous read/write and scan operations for accessing the external PHY registers and notification when MIIM operations have completed.

TCP/IP SNMP NVM MPFS Hardware Configuration

This section describes the hardware configuration for PIC32MZ EF Starter Kit and one can be used for the respective application demonstration.

  1. This section describes the PIC32MZ EF Starter Kit default hardware configuration which uses the on-board debugger and programmer for this application demonstration.

    • Refer to the PIC32MZ EF Starter Kit User Guide for the programming/debugging options supported & setting up the hardware.

      required_hardware
    • Connect the mini USB cable from the computer to the USB DEBUG connector on the PIC32MZ EF Starter Kit

    • Connect the mini USB cable from the computer to the USB-UART connector on the PIC32MZ EF Starter Kit

    • Establish a connection between the router/switch with the PIC32MZ EF Starter Kit through the RJ45 connector on PHY daughter board

TCP/IP SNMP NVM MPFS Running Application

The Non-Volatile Memory (NVM) Microchip Proprietary File System (MPFS) has the snmp.bib file along with other web page files stored in internal Flash and are accessed through the MPFS API.

This table list the name and location of the MPLAB X IDE project folder for the demonstration.

Project NameTarget DeviceTarget Development BoardDescription
pic32mz_ef_sk.XPIC32MZ2048EFH144PIC32MZ EF Starter KitDemonstrates the SNMP NVM MPFS on development board with PIC32MZ2048EFH144 device and LAN8740 PHY daughter board. This implementation is based on bare-metal(non-RTOS).
pic32mz_ef_sk_freertos.XPIC32MZ2048EFH144PIC32MZ EF Starter KitDemonstrates the SNMP NVM MPFS on development board with PIC32MZ2048EFH144 device and LAN8740 PHY daughter board. This implementation is based on FreeRTOS.

Running Demonstration Steps

  1. Build and download the demonstration project on the target board.

  2. If the board has a UART connection:

    1. A virtual COM port will be detected on the computer, when the USB cable is connected to USB-UART connector.

    2. Open a standard terminal application on the computer (like Hyper-terminal or Tera Term) and configure the virtual COM port.

    3. Set the serial baud rate to 115200 baud in the terminal application.

    4. See that the initialization prints on the serial port terminal.

    5. When the DHCP client is enabled in the demonstration, wait for the DHCP server to assign an IP address for the development board. This will be printed on the serial port terminal.

      • Alternatively: Use the Announce service or ping to get the IP address of the board.

      • Run tcpip_discoverer.jar to discover the IPv4 and IPv6 address for the board.

  3. Execution :

    1. After the successful board bring up, the console output becomes

      tcpip_pic32mz_project
    2. The SNMP and SNMPv3 server is hosted by the application.

    3. Open a SNMP manager (iREASONING SNMP manager is recommended) and Follow the steps given in iREASONING Networks MIB Browser section in the Third-Party help for complete details on using and configuring the application demonstration using the iREASONING SNMP Manager.

    4. SNMP MIB Browser -

      • Several SNMP MIB browsers are available. Users can also install a customized MIB browser specific to their application.

      • Verify SNMP Get, GetNext, GetBulk, Set requests and Get response operations .

      • For SNMP v2c , the Agent can be configured with three Read communities (E.g - "public", "read", " ") and three Write communities (e.g - "private","write","public").

        Community IndexReadWrite
        1publicprivate
        2readwrite
        3-----public

        Also the SNMP v2c Community string can be Configured from the web browser.

        tcpip_pic32mz_project
      • For SNMP v3, the Agent is configured as per the following table:

        TypeUSER 1USER 2USER 3
        USM UsermicrochipSnmpAdminroot
        Security Levelauth, privauth, no privno auth, no priv
        Auth AlgorithmMD5SHA1N/A
        Auth Password< As Per The Configuration >< As Per The Configuration >N/A
        Privacy AlgorithmAESN/AN/A
        Privacy Password< As Per The Configuration >N/AN/A

        The Microchip SNMP Stack supports both TRAP version 1 and TRAP version 2. The default trap output is a multi-varbind SNMPv3 TRAP version 2. Trap receiver setting of iReasoning to be selected and configured to visualize the trap output in the iReasoning MIB browser.