RAK4200 WisDuo Breakout Board Quick Start Guide
Prerequisites
What Do You Need?
Before going through the steps in the installation guide of the RAK4200 Breakout Board, make sure to prepare the necessary items listed below:
Hardware Tools
- 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 Tools
- RAK Serial Port Tool
- CH340 Drivers
- The Things Network account
What's Included in the Package?
- RAK4200 Breakout Board
- LoRa antenna
- Dupont lines (18x)
Product Configuration
Interfacing with RAK4200 Breakout Board
- To interface with the RAK4200 Evaluation Board with your Windows Machine, you need to download the RAK Serial Port Tool.
Before powering the RAK4200 Breakout Board, make sure you have installed the included LoRa Antenna. Not doing so might damage the board.
- Connect your USB to the UART adapter to the pin header on the RAK4200 via a set of 4 DuPont lines. Use Figure 1 for reference on wiring the device properly.
- Go to your Device Manager by pressing
Windows
+R
, and then typedevmgmt.msc
. Or, you can also 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 and LPT), and then find the name USB-SERIAL CH340. Take note of the COM Port Number as you will need it to connect with the board. You might have another model number but the wording USB-SERIAL should be present 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.
Connecting to The Things Network (TTN)
The Things Network is about enabling low-power devices to be used in long-range gateways that connect to an open-source, decentralized network and exchange data with Applications. Learn more about The Things Network.
In this section, you will be connecting 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.
Adding An Application
- Click the add application button.
Here are the things that you should take note of in adding an application:
- Application ID: a unique ID on the TTN network that should be in lower case with no spaces
- Description: This is a short and concise human-readable description of your application
- Application EUI: automatically generated by TTN
- Handler Registration: select the handler you want to register this application to
- 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 until you see the Devices section. You can also click the Devices button at the top.
- Click Register device.
Here are the things that you should take note of in registering your device:
- Device ID - this is the unique identifier for your RAK4200 Breakout Board in your application. You need to enter this manually.
- Device EUI - this is the unique identifier for your device in the network. You can change it later if you want.
- Populate the Device ID and Device EUI (generate a random one by pressing the arrows) fields and leave the rest as is. Click Register. Now, your device is registered under the corresponding application.
Depending on which authentication method you want to use, proceed to either the OTAA mode or ABP mode section.
OTAA Mode
When setting up a new device in TTN, its default is to join in OTAA mode. For configuration, you need the following three parameters: Device EUI, Application EUI, and App Key. You can get them all from the Overview page.
-
As an example, join in OTAA mode, EU868 frequency, and the default LoRa class is Class A.
-
Execute the following commands one by one and in the order given.
- 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 and in the order given.
- 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 can 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, you need to use the STM32CubeProgrammer to upgrade your firmware and upload the .hex
file (not the .bin
file) of the latest RAK4200 firmware. The lower versions of the firmware have a different bootloader code and will not work on 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.