1.8 TCP/IP SNMP SDCARD FATFS

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 SDCARD FATFS MCC Configuration

The following Project Graph diagram shows the Harmony components included in the SNMP SDCARD FATFS 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

    HSMCI ( High Speed Multimedia Card Interface ) peripheral supports Multimedia card communication. SD multimedia memory card ( SDMMC ) driver provides abstraction to communicate with SD/eMMC card through the HSMCI peripheral library interface. The TCP/IP application use FAT file system with SDMMC driver to read/write to an SD card.

    tcpip_same70_v71_project

    Wolfssl crypto module enabled with MD5,SHA authentication and AES encryption/decryption privacy protocol are enabled. Wolfssl library configured with open secured socket.

    FreeRTOS component is required for RTOS application. For bare-metal (non-RTOS) FreeRTOS component should not be selected.

    The FAT file system is selected for this application to read and write from the SDHC( sdcard ) module. This is the below snapshot for the FAT FS configuration.

    tcpip_same70_v71_project
  • TCP/IP Configuration

    1. SAM E70 Xplained Ultra

      tcpip_same70_v71_project

    2. SAM V71 Xplained Ultra

      tcpip_same70_v71_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 443.

    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.

    SNTP Simple Network Time Protocol updates its internal time periodically using a pool of public global time servers.

    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.

  • TCPIP Data Link Layer

    Internal ethernet driver(gmac) is enabled with the external LAN8740 PHY driver library for SAME70 demonstartion.

    For SAM V71 demonstration , LAN8061 PHY driver ia selcted along with GMAC Internal ethernet driver.

    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 SDMMC FATFS Hardware Configuration

This is the section describes the hardware configuration for ATSAM E70/V71 Xplained Ultra Evaluation Kit and one can be used for the respective application demonstration.

  1. This section describes the required default hardware configuration use SAM E70 Xplained Ultra Evaluation Kit

    • Ensure ERASE jumper is Open.

    • Open the J805 Jumper

    • Refer to the SAM E70 Xplained Ultra User Guide

      required_hardware
    • Insert the LAN8740 PHY daughter board on the ETHERNET PHY MODULE header.

    • Connect the micro USB cable from the computer to the DEBUG USB connector on the SAM E70 Xplained Ultra Evaluation Kit

    • Establish a connection between the router/switch with the SAM E70 Xplained Ultra Evaluation Kit through the RJ45 connector

      required_hardware
  2. This section describes the required default hardware configuration use SAM V71 Xplained Ultra Evaluation Kit

    • No hardware related configuration or jumper setting changes are necessary

    • Ensure ERASE jumper is Open

    • Refer to the SAM V71 Xplained Ultra User Guide

      required_hardware
    • Connect the micro USB cable from the computer to the DEBUG USB connector on the SAM V71 Xplained Ultra Evaluation Kit

    • Establish a connection between the router/switch with the SAM V71 Xplained Ultra Evaluation Kit through the RJ45 connector

      required_hardware

TCP/IP SNMP SDMMC FATFS Application

This SNMP application opens a file named snmp.bib in the root directory of the SD card and reads its content into memory. Also web pages stored in an external SD card and is accessed through a FAT FS API.

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

Project NameTarget DeviceTarget Development BoardDescription
sam_e70_xult.XATSAME70Q21BSAME70 Xplained Ultra + LAN8740 PHY Daughter boardDemonstrates the SNMP SDCARD FATFS application on development board with ATSAME70Q21B device and LAN8740 PHY daughter board. This implementation is based on Bare Metal ( non-RTOS).
sam_e70_xult_freertos.XATSAME70Q21BSAME70 Xplained Ultra + LAN8740 PHY Daughter boardDemonstrates the SNMP SDCARD FATFS application on development board with ATSAME70Q21B device and LAN8740 PHY daughter board. This implementation is based on Freertos.
sam_v71_xult.XATSAMV71Q21BSAMV71 Xplained UltraDemonstrates the SNMP SDCARD FATFS application on development board with ATSAMV71Q21B device and KSZ8061 PHY daughter board. This implementation is based on Bare Metal (non-RTOS).
sam_v71_xult_freertos.XATSAMV71Q21BSAME70 Xplained UltraDemonstrates the SNMP SDCARD FATFS application on development board with ATSAMV71Q21B device and KSZ8061 PHY daughter board. This implementation is based on Freertos.
  • Ensure a SD card is formatted and loaded with the snmp.bib file along with the web pages provided within the< install-dir >/net_apps_sam_e70_v71/apps/snmpv3_sdcard_fatfs/firmware/src/web_pages directory.

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. SNMP Demo Execution:

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

      tcpip_same70_v71_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").

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

        snmp_demo_config
      • 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.