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.
Connect the debugger USB port on the SAME54
Xplained Pro evaluation kit to computer using a micro USB cable
Change the configuration. There are two
options to change the configuration:
Option 1: Change the configuration
manually in the code
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.
(Optional) The subscribe and
publish topics are same, therefore the user can see the received messages on the
terminal. The users can subscribe and publish to another topic of their choice
and exchange message. Change Publish topic name in
SYS_RNWF_MQTT_TOPIC_NAME in
configuration.h.
(Optional) In
app.c, the user can add subscribe topic name of their choice
in g_subscribeList.
Option 2: Change the configuration via MCC.
For more details about Wi-Fi
configurations, refer Figure 3-31.
The following fields can be
configured via MCC Wi-Fi settings;
SSID
Security Type
Passphrase
Refer Figure 3-37 to understand how to make Cloud Configuration changes
Publish Topic Name
(Optional)
Sub Topic Name (Optional)
Save the changes and then build and program
the project.
Open the Terminal application (for example, Tera Term or PuTTY) on the PC.
Connect to the host board’s COM port and
configure the serial settings as follows:
Baud – 115200
Data – 8 Bits
Parity – None
Stop – 1 Bit
Flow Control – None
Press the SW0 (Soft Reset) button on the host board.
The board boots up and lists certificates available on the board. After successfully
connecting with Wi-Fi, it connects to test.mosquitto.org on port 1883
(unencrypted).
To demonstrate successful MQTT connection, the board subscribes to topic
mchp/sample/b and publishes a message on the same topic. The received message is
printed in the terminal.
If the user wants to change the Subscribe topic and Publish topic, make changes in the
configuration, build the program, and run it again. Make a note of the Publish Topic Name
and Subscribe Topic Name.
Open a MQTT Client software tool (for example, MQTT.fx).
Enter Subscribe topic in the tool at which the user wants to publish the message from the
device. When the RNWF11 device connects to
test.mosquitto.org it will publish message to the entered Publish Topic Name and
the user can receive and see the messages in MQTT Client Software tool.
Follow a similar method to receive messages on the user’s preferred Subscribe Topic Name.