Add RNWF from Device Resource
to Project Resource as illustrated below
After adding RNWF to Project
Resources, follow the note from RNWF>Software Settings>Select
UART as below:
To follow the configurations mentioned in the above figure (RNWF Select
UART), Select UARTx component available in Builder Window and select
USART2 from drop-down under UARTx Configurations>Dependency
Selector (Scroll to bottom)>UART PLIB Selector as illustrated
below:
Configure UARTx instance
specific TX and RX pins referring host MCU data sheet. Hint will be
generated in the Notifications [MCC] tab about UARTx pin re-mapping as
illustrated below:
Note: When using the AVR128DB48 with Curiosity Nano Base for Click boards,
configure Port F pins- PF4 and PF5 as UART2 TX and RX pins respectively,
as illustrated below:
For clock Settings – Select Clock
Control (CLKCTRL) from Project Resource>System>Clock Control
(CLKCTRL). Configure Clock Control as illustrated below:
Configure MCC Melody based RNWF02 driver for
different services as below:
Wi-Fi Settings:
This section allows Wi-Fi service configuration as mentioned
below:
Wi-Fi
Modes: Drop-down to select Wi-Fi modes. Available
options are:
StationMode
ProvisionMode
SoftAPmode
Provision
Method: Drop-down to select Wi-Fi Provisioning method.
Available options are:
Mobile
App
Web
Server
SSID:
Wi-Fi Access Point/Network Name
Passphrase: Wi-Fi Access point/Network password
Security
Type: Wi-Fi security protocol
Provision
Callback Handler: Configure callback function name for
Wi-Fi Provisioning states (Applicable only if selected Wi-Fi
Mode is ProvisionMode)
WiFi-Callback
Handler: Configure callback function name to handle
Wi-Fi service specific events (for example, Wi-Fi STA connection
and disconnection, DHCP resolution, Wi-Fi Scan indication)
OTA DFU Settings
This section allows OTA DFU service configuration as mentioned
below:
Enable OTA
Configs: Toggle to enable/disable OTA DFU settings. If
disabled, OTA system service source and header files will not be
generated
OTA Tunnel
Selection: Tunnel to receive the OTA server and Image
details. Drop-down to select OTA Tunnel. Currently supports TCP
only
OTA Tunnel
Port: Configure OTA server port
OTA Callback
Handler: Configure callback function name to handle OTA
service events (for example, downloading firmware binary from
OTA server, erasing RNWF Flash before programming it with newly
downloaded firmware image from server and perform RNWF
Reset/Reboot with new firmware image)
DFU TX
Pin: Configure DFU UART TX pin name
DFU RX
Pin: Configure DFU UART RX pin name
Note: Configure chip-select (CE) for RNWF
Flash as illustrated in pin settings (see Figure 3-19)
Note: Configure Port E input pin - PE1 as MCLR_N
for DFU as illustrated below:
Cloud Configuration
Settings
This section allows Cloud service configuration as mentioned
below:
Enable Cloud
Configs: Toggle to enable/disable cloud configuration
settings. If disabled, cloud system service source and header
files will not be generated
Azure DPS:
Toggle to enable/disable Azure DPS option (applicable only when
Azure endpoint is used)
Scope
ID: Provide Scope ID from Azure IoT Central
portal for registered device
Device
Template: Configure Azure DPS specific device
template
User Name and
Password: Configure cloud client credentials
Client ID:
Device ID registered with cloud provider
MQTT Callback
Handler: Configure Callback function name to handle MQTT
specific service events (for example, MQTT Client-Broker
connection/disconnection, handling periodic/event based
telemetry)
Publish:
Toggle to enable/disable MQTT Publish option. If enabled, it
offers related configurations such as Publish Topic Name, Pub
QoS, Retain Flag.
Keep
Alive: Toggle to enable/disable Keep Alive MQTT specific
option.
Keep
Alive Interval: Configure the field in the range
of 1-1000 (in seconds)
Subscribe:
Toggle to enable/disable MQTT Subscribe option. If enabled, it
provides subscribe specific configurations such as Total
Subscribe Topics, Table for Subscribe Topics, Sub. QoS
TLS:
Toggle to enable/disable TLS Configuration option. If enabled,
it will further prompt to enter details as below:
Server
Certificate
Device
Certificate
Device
Key
Device
Key Password
Server
Name
Domain
Name
Net Sock SettingsFigure 3-23. Net Sock Settings:
TLS
This section allows Net Sock service configuration as mentioned
below:
Enable NetSock
Configs: Toggle to enable/disable Net Sock configuration
settings. If disabled, Net Sock system service source and header
files will not be generated
Currently,
NetSock Service supports 20 Non-TLS and 2 simultaneous TLS
socket instances.
Total
Sockets: Configure this field in the range of 1-2.
Socket
Callback Handler: Configure callback function name to
handle Net Sock service specific events (for example, Socket
connection/disconnection, handling socket read/write events and
notifying an error to the application)
Server/Client
Mode Selection: Toggle to ON state will enable Server
and toggle to OFF will enable Client mode
Server IP and
Port: Configure these fields with respective server
details
Protocol:
Drop-down to select an underlying Network Layer protocol.
Available options:
TCP
UDP
TLS:
Toggle to enable/disable TLS Configuration option. If enabled,
it will further prompt to enter details as below:
Server
Certificate
Device
Certificate
Device
Key
Device
Key Password
Server
Name
Domain
Name
The online versions of the documents are provided as a courtesy. Verify all content and data in the device’s PDF documentation found on the device product page.