6.2.6.4 Running the Application

  1. Mount the RNWF11 Add On Board on SAME54 Xplained Pro Evaluation Kit at respective header. For more details about the boards placement, refer Figure 6-37.
  2. Connect the debugger USB port on the SAME54 Xplained Pro evaluation kit to computer using a micro USB cable.
  3. Change the configuration. There are two options to change the configuration:
    1. Option 1: Change the configuration manually in the code.
      1. Open the code in MPLAB IDE v6.00 or higher and add Home AP and device information in the application code.
        • In configuration.h, add Wi-Fi configurations in SYS_RNWF_WIFI_STA_SSID, SYS_RNWF_WIFI_STA_PWD, SYS_RNWF_STA_SECURITY.
        • In configuration.h, change the macros SYS_RNWF_MQTT_CLIENT_ID, SYS_RNWF_MQTT_SERVER_CERT and SYS_RNWF_MQTT_TLS_SERVER_NAME
          • To get the value that needs to be set for SYS_RNWF_MQTT_CLIENT_ID, navigate to All devices>Things (refer Figure ).
          • Set the SYS_RNWF_MQTT_TLS_SERVER_NAME as the AWS Broker name to which RNWF should connect.
        • The AWS demo uses Trustflex as the secure device, by default. If the user prefers to use TrustNGo, then the macro SYS_RNWF_TLS_ECC608_DEVTYPE must be set to 1in configuration.h.
    2. Option 2: Change the configuration via MCC Melody.
      • For more details about Wi-Fi configurations, refer Figure 3-31.
        1. The following fields can be configured via MCC Wi-Fi settings:
          1. SSID
          2. Security Type
          3. Passphrase
      • For more details about Cloud configuration, refer Figure 3-37.
        1. The following fields can be configured via MCC OTA configuration settings:
          1. Cloud URL
          2. Cloud Port
          3. Client ID
          4. Publish Topic Name
          5. Sub Topic Name
          6. Server Certificate
          7. Server Name
  4. Save the changes and then build and program the project.
    Figure 6-57. Make and Program Device Main Project
  5. Connect to the “USB to UART” COM port and configure the serial settings as follows:
    1. Baud – 115200
    2. Data – 8 Bits
    3. Parity – None
    4. Stop – 1 Bit
    5. Flow Control – None
  6. The board boots up and the application starts running. It displays Wi-Fi information, certificates on the board, Serial number of the device, connects to Home-AP and then to AWS cloud Server. It publishes messages periodically on a subtopic with a running counter.
    Figure 6-58. Device Interface Debug Log with Telemetry Data
  7. To see event logs on the AWS IoT Server Dashboard, go to “Monitor” and check for the “Messages published” increasing with time.
    Figure 6-59. AWS Event Logs