This document will walk through the setup process for the DA16K IoTConnect AT Command Interface Firmware.
The firmware provides a serial UART interface that allows for communication with IoTConnect and its cloud services using AT commands.
The DA16xxx acts as a gateway to IoTConnect for any embedded device with a UART connectionthat does not have a network interface or the resources to run a dedicated IoTConnect/MQTT client.
The device is able to configure the DA16K module and send telemetry to IoTConnect using this serial interface.
The interactions are as such:
Embedded client ← Serial/PMOD → DA16xxx ← WiFi → IoTConnect
The supported AT interface command set is documented in the AT Command Set Documentation.
- A computer running an actively supported version of Windows (10 / 11)
- A supported DA16K
- A terminal program, such as TeraTerm or HyperTerminal.
- A USB-to-Serial converter. We recommend the following:
-
FTDI FT-232H-based
- Current drivers for the USB-to-Serial converter or EVK
-
For FTDI-based dongles and DA16xxx EVK boards:
FTDI D2XX Drivers can be obtained here.
-
- Renesas DA16200 DA16600 Multi Downloader Tool
-
Can be obtained at the Renesas DA16200 Product Page
-
If you are running Linux, use the Developers Guide to set up the firmware and image instead.
The DA16xxx hardware platforms used here broadly speaking provide two usable serial ports for this project:
- The debug console
- Runs at 230400 Baud
- Used to configure the device and flash the firmware
- The AT command interface
- Runs at 115200 Baud
- This is the serial interface that will be used by the embedded client to send data to the DA16k for transmission to IoTConnect.
The SDK is intended for and tested with the following platforms:
- EVK Boards
- DA16200MOD EVK
- DA16600MOD EVK
- PMOD Dongles
- DA16200MOD
- DA16600MOD
You will be guided through the setup process below.
Please refer to the Renesas guide “User Manual, DA16200 DA16600 FreeRTOS Getting Started Guide, UM-WI-056” in case there are changes in the future.
16200MOD EVK | 16600MOD EVK |
---|---|
The EVK boards provide the serial connections using the.
16200MOD | 16600MOD |
---|---|
Connect the PMOD dongle to the FTDI dongle as follows:
16200MOD | 16600MOD |
---|---|
Note: RX/TX need to be crossed when connecting them, i.e.:
- The USB-Serial dongle's TX line goes to RX on the PMOD.
- The USB-Serial dongle's RX goes to TX on the PMOD.
The USB-Serial dongle, if it allows such setting, should be set to 3.3V operation.
Both the EVK boards and the PMOD modules will show up as USB Serial Device in the device manager:
-
On the EVK boards, the command console is on the lower port (at 230400 baud).
For example, after connecting it and installing the drivers, you should see two new USB Serial Device entries, such as:
- USB Serial Device (COM7)
- USB Serial Device (COM8)
In this case, the debug console is the first entry (COM7).
-
On the PMOD modules, connect the device to the USB-Serial dongle as described above.
The dongle will only add a single new USB Serial Device entry, which will then correspond to the debug console.
Before you can use the IoTConnect AT Command functions, you must flash the firmware.
You can either build it yourself (see the Developers Guide) or use the pre-built firmware images in the /images/
directory at the root of the repository.
This assumes that the device has an intact BOOT partition, as it would have from the factory or if another working firmware image was deployed before.
In the unlikely event that your device does not have an intact BOOT partition, follow the Developers Guide to build and flash one.
To flash the IoTConnect firmware, follow these steps:
-
Extract and launch the downloaded Multi Download Tool.
-
Click the
Settings
Button. -
In the
Settings
Window: -
Close the
Settings
window. -
Select the COM port corresponding to the debug console terminal (you may have to experiment to find it) and click Download.
-
The image will now be downloaded on the device.
-
Once the image is finished, a message indicating the success (or failure) will be displayed.
Before setting upthe IoTConnect-specific options, you must set up the device according to the User Manual DA16200 DA16600 FreeRTOS Getting Started Guide UM-WI-056 from Renesas.
Currently the document can be found linked at: Renesas DA16200 page or Renesas DA16600 page.
The following is a rough summary of the steps to be taken.
-
Connect to the command console (the same COM port used for flashing the firmware) using a serial terminal program of your choice.
Note: It is recommended that you disable Flow Control, if your application permits it.
After establishing the serial connection, boot the device.
-
You should see a command prompt:
[/DA16200] #
-
Type
setup
to:-
Associate a WiFi access point (SSID, password, etc.)
-
Enable and configure SNTP to start automatically on boot.
-
This setup process will write values to NVRAM that will be used when the DA16200 reboots.
-
The firmware might ask you if you wish to configure DPM.
At this point in time, DPM modes are unsupported.
Therefore, you must answer this question with
No
-
-
The following is an example log of this configuration process:
Wakeup source is 0x0 [dpm_init_retmemory] DPM INIT CONFIGURATION(1) ****************************************************** * DA16200 SDK Information * --------------------------------------------------- * * - CPU Type : Cortex-M4 (120MHz) (...) * ****************************************************** (...) [/DA16200] # setup Stop all services for the setting. Are you sure ? [Yes/No] : y [ DA16200 EASY SETUP ] Country Code List: AD AE AF AI AL AM AR AS AT AU AW AZ BA BB BD BE BF BG BH BL (...) UK US UY UZ VA VC VE VI VN VU WF WS YE YT ZA ZW ALL COUNTRY CODE ? [Quit] (Default KR) : DE SYSMODE(WLAN MODE) ? 1. Station 2. Soft-AP 3. Station & SOFT-AP MODE ? [1/2/3/Quit] (Default Station) : 1 [ STATION CONFIGURATION ] ============================================================================ [NO] [SSID] [SIGNAL] [CH] [SECURITY] ---------------------------------------------------------------------------- [ 1] AVNET_TEST -51 1 WPA2 (...) ---------------------------------------------------------------------------- [M] Manual Input [Enter] Rescan ============================================================================ Select SSID ? (1~14/Manual/Quit) : 1 PSK-KEY(ASCII characters 8~63 or Hexadecimal characters 64) ? [Quit] [123456789|123456789|123456789|123456789|123456789|123456789|1234] :*********** Do you want to set advanced WiFi configuration ? [No/Yes/Quit] (Default No) : n ============================================ SSID : AVNET_TEST AUTH : WPA/WAP2-PSK ENCRYPTION : TKIP/AES(CCMP) PSK KEY : *********** KEY TYPE : ASCII PMF MODE : Disable Hidden AP : Not connect ============================================ WIFI CONFIGURATION CONFIRM ? [Yes/No/Quit] : y IP Connection Type ? [Automatic IP/Static IP/Quit] : a IP Connection Type: Automatic IP IP CONFIGURATION CONFIRM ? [Yes/No/Quit] : y SNTP Client enable ? [Yes/No/Quit] : y SNTP Period time (1 ~ 36 hours) ? (default : 36 hours) [Quit] GMT Timezone +xx:xx|-xx:xx (-12:00 ~ +12:00) ? (default : 00:00) [Quit] SNTP Server 0 addr ? (default : pool.ntp.org) [Quit] SNTP Server 1 addr ? (default : 1.pool.ntp.org) [Quit] SNTP Server 2 addr ? (default : 2.pool.ntp.org) [Quit] ============================================ SNTP Client : Enable SNTP Period time : 36 hours SNTP GMT Timezone: 00:00 SNTP Server addr : pool.ntp.org SNTP Server addr1: 1.pool.ntp.org SNTP Server addr2: 2.pool.ntp.org ============================================ SNTP Client CONFIRM ? [Yes/No/Quit] : y Fast Connection Sleep 2 Mode ? [Yes/No/Quit] : y Configuration OK Reboot... Wakeup source is 0x0 [dpm_init_retmemory] DPM INIT CONFIGURATION(1) ****************************************************** * DA16200 SDK Information * --------------------------------------------------- * * - CPU Type : Cortex-M4 (120MHz) (...) * ****************************************************** >>> Wi-Fi Fast_Connection mode ... System Mode : Station Only (0) >>> Start DA16X Supplicant ... >>> DA16x Supp Ver2.7 - 2022_03 (...) -- DHCP Client WLAN0: BOUND(10) Assigned addr : 192.168.0.12 netmask : 255.255.255.0 gateway : 192.168.0.1 DNS addr : 192.168.0.1 DHCP Server IP : 192.168.0.1 Lease Time : 24h 00m 00s Renewal Time : 12h 00m 00s
Refer to the Application Setup Guide.
NOTE: It is impossible for the DA16xxx to process multiple possible certificates for a Root CA – all testing has used a single certificate. Obviously, if a certificate doesn’t allow a connection, then it may be required to manually swap to an alternative certificate.
Ensure all certificates are in place, and that iotconnect_config has been used to save the configuration -- before initiating iotconnect_client setup
.
If the configuration stage is missed, then there will be no valid values to setup.
To setup IoTConnect values, run: `
iotconnect_client setup
Ensure that all certificates are in place, that iotconnect_config has been used to save the configuration, and that "iotconnect_client setup" has been run -- before initiating "iotconnect_client start".
To run IoTConnect discovery/sync and update MQTT values and start mqtt_client, run
iotconnect_client start
Check that the device is shown as connected on the IoTConnect dashboard.
Note: must have been setup before starting.
To disconnect from IoTConnect but leave the runtime configuration intact
iotconnect_client stop
Check that the device is shown as disconnected on the IoTConnect dashboard.
Note: After stopping, there is no necessitgy to perform another setup before the next start. The previously determined values will be re-used.
To disconnect from IoTConnect and reset the entire runtime configuration, run:
iotconnect_client reset
Check that the device is shown as disconnected on the IoTConnect dashboard.
Note: After resetting, another setup must be performed before the next start.
To send an IotConnect message with up to 7 key/value pairs, run
iotconnect_client msg [name1] [value1] [name2] [value2] (...)
Verify in the dashboard that the device is shown as connected and that the message data can be seen.
Commands are automatically acknowledged and stored in a queue upon reception. They must be fetched using an AT Command and processed by the connected device.
OTA is not yet supported.
You may now wish to access the AT Command serial interface (for example, to send out telemetry).
Continue with the AT Console documentation to access and use it.