RAK4200 WisDuo Breakout Board Quick Start Guide
Prerequisites
Before going through the steps in the installation guide of the RAK4200 Breakout Board, make sure to prepare the necessary items listed below:
Hardware
- RAK4200 Breakout Board (provided) – including LoRa antenna, Dupont lines (13x)
- USB to UART adapter – CH340 for example (not provided)
- Gateway in range, for testing (not provided)
- RAKDAP1 DAPLink Tool (not provided)
Software
- RAK Serial Port Tool
- CH340 Drivers
- The Things Network account
Package Inclusions
- RAK4200 Breakout Board
- LoRa antenna
- Dupont lines (18x)
Product Configuration
Interface with RAK4200 Breakout Board
- To interface with the RAK4200 Breakout Board with a Windows Machine, download the RAK Serial Port Tool.
Before powering the RAK4200 Breakout Board, ensure the included LoRa antenna is properly installed. Failure to do so could damage the board.
- Connect the USB-to-UART adapter to the pin header on the RAK4200 using 4 DuPont lines. Refer to Figure 1 for proper wiring instructions.
- Open the Device Manager by pressing
Windows
+R
, typingdevmgmt.msc
, and pressing Enter. Alternatively, you can search fordevmgmt.msc
in the Start Menu.
Windows 10 should recognize the board and automatically install drivers. However, if it is missing in the COM and LPT ports list, you need to manually install the CH340 Drivers.
- Look for Ports (COM & LPT) and locate the entry named USB-SERIAL CH340. Note the COM port number, as you will need it to connect to the board. If you have a different model, the name should still include USB-SERIAL in some form.
- Open the RAK Serial Port Tool. Select the COM Port number (the one you noted in the previous step) and set the Baud Rate to 115200. Click OPEN, and you should be connected to the board and be able to send commands.
Connect with The Things Network (TTN)
The Things Network enables low-power devices to connect to long-range gateways, forming an open-source, decentralized network to exchange data with applications. Learn more at The Things Network.
In this section, you will connect the RAK4200 Breakout Board to The Things Network (TTN).
- If you don't have an account yet, head on to the TTN site and create one. Once done, log in to your account and go to the console. See the highlighted box in Figure 4.
- Choose APPLICATIONS.
Add an Application
- Click the add application button.
Here are the key points to consider when adding an application to TTN:
- Application ID: A unique identifier on the TTN network, written in lowercase with no spaces.
- Description: A short and concise human-readable description of your application.
- Application EUI: Automatically generated by TTN.
- Handler Registration: Select the handler to which you want to register this application.
- After filling in the necessary information, press the Add application. If the page is the same as shown in Figure 8, then you have successfully registered your application.
Register Device
- Scroll down to the Devices section, or click the Devices button at the top.
- Click Register device.
Here are the key points to remember when registering your device:
- Device ID: A unique identifier for your RAK4200 Breakout Board within your application. This must be entered manually.
- Device EUI: A unique identifier for your device on the network. You can modify this later if needed.
- Fill in the Device ID and Device EUI fields (you can generate a random Device EUI by clicking the arrows). Leave the other fields unchanged and click Register. Your device will now be registered under the corresponding application.
Depending on the authentication method you are using, proceed to either the OTAA Mode or ABP Mode section.
OTAA Mode
When setting up a new device in TTN, the default join mode is OTAA. For configuration, you will need the following three parameters: Device EUI, Application EUI, and App Key. These can be obtained from the Overview page.
-
As an example, join in OTAA mode, using the EU868 frequency, with the default LoRa class set to Class A.
-
Execute the following commands one by one, in the given order.
- Set the LoRa join mode to OTAA.
at+set_config=lora:join_mode:0
- Set the LoRa class to Class A:
at+set_config=lora:class:0
- Set the frequency/region to EU868:
at+set_config=lora:region:EU868
Execute the following commands one by one, in the given order.
- Set the Device EUI:
at+set_config=lora:dev_eui:XXXX
- Set the Application EUI:
All zero value Application EUI at+set_config=lora:app_eui:0000000000000000
is not supported and will return error.
at+set_config=lora:app_eui:XXXX
- Set the Application Key:
at+set_config=lora:app_key:XXXX
- Reboot the RAK4200 Breakout Board to save the parameters.
at+set_config=device:restart
- Then join in OTAA mode:
at+join
- After joining in OTAA mode successfully, try to send data from the RAK4200 Breakout Board to TTN:
at+send=lora:2:1234567890
You will see the data sent from the RAK4200 Breakout Board on the TTN website, as shown in Figure 17:
Miscellaneous
Firmware Update
Before you start working with the RAK4200, it is recommended to keep the RAK4200 module updated to the latest version of the firmware.
For RAK4200 modules with firmware version V3.0.0.12 and below, use the STM32CubeProgrammer to upgrade the firmware by uploading the .hex
file (not the .bin
file) from the latest RAK4200 firmware. Firmware versions below V3.0.0.12 have a different bootloader code and are incompatible with the RAK DFU Tool.
In the following sections, two (2) options for flashing new firmware in a RAK4200 module are shown: Firmware Upgrade through DAPLink and Firmware Upgrade through UART1.
Firmware Upgrade Through DAPLink
Refer to RAKDAP1 Flash and Debug Tool Quickstart Guide.
Firmware Upgrade Through UART1
Minimum Hardware and Software Requirements
Hardware/Software | Requirements |
---|---|
Computer | A Windows/Linux/Mac computer |
Firmware File | Bin firmware downloaded from the website. |
Others | A USB to TTL adapter. |
Firmware Upgrade Procedure
Follow this procedure to upgrade the firmware in Device Firmware Upgrade (DFU) mode through the UART1 interface.
-
Download the latest application firmware of the RAK4200 module.
-
Download the RAK Device Firmware Upgrade (DFU) tool. In this folder are the different DFU tools depending on your machine's OS.
-
Connect the RAK4200 module with a computer through USB to TTL adapter, as shown in Figure 18:
-
Open the RAK Device Firmware Upgrade (DFU) tool. Select the serial port and baud rate of the module, and then click on the Select Port button.
- Click on the Select Firmware button and choose the application firmware file of the module with the suffix
. bin
.
- Click on the Upgrade button to upgrade the device. After the upgrade is complete, the RAK4200 module is now ready to work with the new firmware.