Mount the AVR128DB48 Curiosity Nano host board
and the RNWF11 Add On Board on Curiosity Nano base board at
respective headers. For more details about the boards placement in the Curiosity Nano base,
refer to the Figure 6-1.
Connect the debugger USB port on the
AVR128DB48 Curiosity Nano board 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 rnwf_app.h,
add Wi-Fi configurations in HOME_AP_SSID,
HOME_AP_PASSPHRASE, HOME_AP_SECURITY.
In rnwf_app.h,
add Serial Number (Common Name) in the macro “CLIENT_ID”. This value is the same
as shown in Figure . The user can find the value again by navigating to All
devices>Things (refer Figure ).
In rnwf_app.c, change the broker name in both the fields
cloud_tls_cfg (5th parameter), and the
mqtt_cfg (.url parameter) to user’s AWS broker
name.
If the user prefers to use the
TrustNGo ECC608 Device instead of TrustFlex ECC608 Device, the user must set the
macro RNWF_TLS_ECC608_DEVTYPE to 1 in
rnwf_app.h. By default, the AWS demo uses Trustflex secure
device.
Option 2: Change the configuration via
MCC Melody.
For more details about Wi-Fi
configurations, refer Figure 3-5.
The following fields can be
configured via MCC Melody Wi-Fi settings:
SSID
Security Type
Passphrase
For more details about Cloud
configuration, refer Figure 3-9.
The following fields can be
configured via MCC Melody OTA configuration settings:
Cloud URL
Cloud Port
Client ID
Publish Topic Name
Sub Topic Name
For more details about TLS
configurations, refer Figure 3-11.
The following fields can be
configured via MCC Melody Net Sock settings - TLS:
Save the changes and then build and program
the project.
Connect to the “USB to UART” COM port and
configure the serial settings as follows:
Baud – 115200
Data – 8 Bits
Parity – None
Stop – 1 Bit
Flow Control – None
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.
To see event logs on the AWS IoT Server
Dashboard, go to “Monitor” and check for the “Messages published” increasing with time.