6.2.1.2 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, user can setup the TCP server using macros SYS_RNWF_NET_SOCK_ADDR0 and SYS_RNWF_NET_SOCK_PORT0. These macros allow to define the address and port number of the TCP server that the TCP Client needs to connect to.
    2. Option 2: Change the configuration via MCC.
      • 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
      • Refer Figure 3-47 to understand how to make NET Configuration changes.
        • The following fields can be configured via MCC NET configuration settings:
          1. Mode – Select Client Mode
          2. Server IP
          3. Socket Port
  4. Save the changes and then build and program the code to the hardware using MPLAB X IDE.
    Figure 6-38. Programming the Board
  5. Open the Terminal application (for example, Tera Term or PuTTY) on the PC
  6. 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
  7. As the board boots up, it will connect to Home-AP and print the IP address obtained. The board will establish a connection with configured TCP Server and print a success message. Once the TCP client-server connection is successful, the application will continue listening on the socket for incoming messages and then write them back to the server.
    Figure 6-39. TCP Client Serial Logs
  8. Use any standard utility on the laptop (such as a python script, packet sender or any other preferred utility) to run a TCP Server.