Skip to main content

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

What's Included in the Package?

  • RAK4200 Breakout Board
  • LoRa antenna
  • Dupont lines (18x)

Product Configuration

Interfacing with RAK4200 Breakout Board

  1. To interface with the RAK4200 Evaluation Board with your Windows Machine, you need to download the RAK Serial Port Tool.
warning

Before powering the RAK4200 Breakout Board, make sure you have installed the included LoRa Antenna. Not doing so might damage the board.

  1. 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.
Figure 7319: Powering up and interfacing with the board
  1. Go to your Device Manager by pressing Windows + R, and then type devmgmt.msc. Or, you can also search for devmgmt.msc in the Start Menu.
NOTE

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.

  1. 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.
Figure 7320: COM Port settings
  1. 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.
Figure 7321: Configuring the RAK Serial Port Tool

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).

  1. 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.
Figure 7322: The Things Network Home Page
Figure 7323: TTN Console Page
  1. Choose APPLICATIONS.
Figure 7324: Application Page

Adding An Application

  1. Click the add application button.
Figure 7325: Adding an Application
NOTE

Here are the things that you should take note of in adding an application:

  1. Application ID: a unique ID on the TTN network that should be in lower case with no spaces
  2. Description: This is a short and concise human-readable description of your application
  3. Application EUI: automatically generated by TTN
  4. Handler Registration: select the handler you want to register this application to
  1. 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.
Figure 7326: Application Overview
Register Device
  1. Scroll down until you see the Devices section. You can also click the Devices button at the top.
Figure 7327: Device Section
  1. Click Register device.
Figure 7328: Add your Device
NOTE

Here are the things that you should take note of in registering your device:

  1. Device ID - this is the unique identifier for your RAK4200 Breakout Board in your application. You need to enter this manually.
  2. Device EUI - this is the unique identifier for your device in the network. You can change it later if you want.
  1. 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.
Figure 7329: Device Overview

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.

Figure 7330: Device Overview Parameters
NOTE
  • 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.

  1. Set the LoRa join mode to OTAA.
at+set_config=lora:join_mode:0
  1. Set the LoRa class to Class A:
at+set_config=lora:class:0
  1. Set the frequency/region to EU868:
at+set_config=lora:region:EU868
Figure 7331: AT Command for OTAA Join Mode, Class and Region
NOTE

Execute the following commands one by one and in the order given.

  1. Set the Device EUI:
at+set_config=lora:dev_eui:XXXX
  1. Set the Application EUI:
NOTE

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
  1. Set the Application Key:
at+set_config=lora:app_key:XXXX
Figure 7332: AT Command for OTAA Device EUI, Application EUI and Application Key
  1. Reboot the RAK4200 Breakout Board to save the parameters.
at+set_config=device:restart
  1. Then join in OTAA mode:
at+join
Figure 7333: AT Command for OTAA LoRa Join via RAK Serial Port Tool
  1. After joining in OTAA mode successfully, try to send data from the RAK4200 Breakout Board to TTN:
at+send=lora:2:1234567890
Figure 7334: OTAA Test Sample Data Sent via RAK Serial Port Tool

You can see the data sent from the RAK4200 Breakout Board on the TTN website, as shown in Figure 17:

Figure 7335: OTAA Test Sample Data Sent Viewed in The Things Network

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.

NOTE

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/SoftwareRequirements
ComputerA Windows/Linux/Mac computer
Firmware FileBin firmware downloaded from the website.
OthersA USB to TTL adapter.
Firmware Upgrade Procedure

Follow this procedure to upgrade the firmware in Device Firmware Upgrade (DFU) mode through the UART1 interface.

  1. Download the latest application firmware of the RAK4200 module.

  2. Download the RAK Device Firmware Upgrade (DFU) tool. In this folder are the different DFU tools depending on your machine's OS.

  3. Connect the RAK4200 module with a computer through USB to TTL adapter, as shown in Figure 18:

  4. 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.

Figure 7336: Device Firmware Upgrade Tool
  1. Click on the Select Firmware button and choose the application firmware file of the module with the suffix . bin.
Figure 7337: Select firmware
  1. 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.
Figure 7338: Firmware upgrading
Figure 7339: Upgrade successful