Skip to main content

RAK4600 Breakout Board Quick Start Guide

This guide covers the following topics:

Prerequisites

What Do You Need?

Before going through the steps in the installation guide of the RAK4600 Breakout Board, make sure to prepare the necessary items listed below:

Hardware Tools

  • RAK4600 Breakout Board (provided) – including LoRa and BLE antenna, Dupont lines (9x), and 4-pin headers (2x)
  • Micro USB Cable (provided)
  • LoRa Gateway in range, for testing (not provided)
  • Windows PC (not provided)
  • USB to UART adapter (not provided)
  • RAKDAP1 Flash and Debug Tool (not provided)

Software Tools

Definition of Terms

List of acronyms
ABPActivation-By-Personalization
BLEBluetooth Low Energy
DFUDevice Firmware Upgrade
EUIExtender Unique Identifier
LoRaLong Range
OTAAOver-The-Air-Activation
TTNThe Things Network
P2PPeer to peer communication
SWDSerial Wire Debug
RUIRakWireless Unified Interface

Product Configuration

Interfacing with RAK4600 Breakout Board

To interface with the RAK4600 Breakout Board with your Windows PC, it is recommended to download and install the RAK Serial Port Tool.

warning

Before powering the RAK4600 Breakout Module, make sure you have installed the included LoRa and BLE antennas. Not doing so might damage the board.

Use Figure 1 as a reference to connect the antennas.

Figure 7796: RAK4600 Breakout Board antenna connection

Use Figure 2 and Figure 3 as a reference to identify the antennas.

Figure 7797: RAK4600 Breakout Board BLE antenna
Figure 7798: RAK4600 Breakout Board LoRa antenna

USB to UART

  • Connect your USB to a UART adapter to the pin header on the RAK4600 Breakout Board via a set of 4 Dupont lines. Use Figure 4 as a reference on wiring the device properly.
Figure 7799: Powering up and interfacing with the board
  • 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 7800: Configuring the RAK Serial Port Tool

BLE Interface

To configure the RAK4600 through BLE, execute the following steps.

  1. Install the “nRF Connect” or “nRF Master Control Panel (BLE)” app provided by Nordic Semiconductor.
  2. Open the app on the mobile device and scan for BLE devices.
  3. Reset the RAK4600 board. After a few seconds, a list of BLE devices will be shown. The RAK4600 is listed as “RUI-XX: XX: XX".
Figure 7801: Nordic app scan for BLE devices
NOTE

Connect within 60 seconds after resetting the RAK4600. After that time, the BLE broadcast will be stopped.

  1. After pressing the “CONNECT” button, a list will be displayed, as shown in Figure 7.
Figure 7802: Options to connect to the RAK4600
  1. Select the service named “Nordic UART Service”.
  2. To receive data from mobile, enable notification on TX Characteristic by clicking on the arrow.
Figure 7803: Enable notifications from mobile phone
  1. Write a value on RX Characteristic by clicking on the arrow.
Figure 7804: Send AT command
  1. A small input window will pop up. This is where AT commands shall be typed.
Figure 7805: nRF app AT command input window
  1. Send AT commands to RAK4600 in this dialog.

    • For example, to check the current firmware version, type at+version then click on the “SEND” button.
Figure 7806: nRF app, send at command over BLE

The console output shall be read on the TX Characteristic of the App.

Figure 7807: AT response over BLE

Connecting to The Things Stack (TTN V3)

This section will show how to connect the RAK4600 Breakout Board to The Things Stack (TTN V3) platform.

Figure 7808: The Things Stack diagram

As shown in Figure 13, The Things Stack is an open-source LoRaWAN Network Server suitable for global, geo-distributed public and private deployments as well as for small, local networks. The architecture follows the LoRaWAN Network Reference Model for standards compliancy and interoperability. This project is actively maintained by The Things Industries.

LoRaWAN is a protocol for low-power wide-area networks. It allows for large-scale Internet of Things deployments where low-powered devices efficiently communicate with Internet-connected applications over long-range wireless connections.

The RAK4600 board can be part of this ecosystem as a device, and the objective of this section is to demonstrate how simple it is to send data to The Things Stack using the LoRaWAN protocol. To achieve this, the RAK4600 must be located inside the coverage of a LoRaWAN gateway connected to The Things Stack server.

Registration to TTN and Creating LoRaWAN Applications

The first step is to go to The Things Network platform and select a cluster, as shown in Figure 14. The Things Industries adds more clusters from time to time, so select the one closes to your location. In this guide, Europe 1 is selected.

Figure 7809: Selecting Cluster in TTN V3

You can use the same login credentials on the TTN V2 if you have one. If you have no account yet, you need to create one.

  1. To register as a new user to TTN, click on Login with The Things ID then select register on the next page, as shown in Figure 15 and Figure 16.
Figure 7810: Login using TTN account
Figure 7811: Registration of new account
  1. You should now be on the step of creating your TTN account. Fill in all the necessary details and activate your account.

  2. After creating an account, log in to the platform using your username/email and password then click Submit, as shown in Figure 17.

Figure 7812: Logging in to TTN platform
  1. Click Authorize to proceed.
Figure 7813: Authorization to TTN
  1. Now that you are logged in to the platform, the next step is to create an application. Click Create an application.
Figure 7814: Creating TTN application for your LoRaWAN devices
  1. To have an application registered, input first the specific details and necessary information about your application, then click Create application.
Figure 7815: Details of the TTN application

If you have no error on the previous step, you should now be on the application console page. The next step is to add end-devices to your The Things Stack application. LoRaWAN specification enforces that each end device has to be personalized and activated. There are two options for registering devices depending on the activation mode selected. Activation can be done either via Over-The-Air-Activation (OTAA) or Activation-By-Personalization (ABP).

NOTE

Once you have the application in The Things Stack (TTN V3), you need to ensure that you are in coverage of a LoRaWAN gateway that is registered to The Things Stack (TTN V3) as well. Without the coverage of that LoRaWAN gateway, you cannot activate any device that you will register in your application.

RAKwireless has LoRaWAN gateways that you can connect to The Things Stack (TTN V3) if no LoRaWAN gateway coverage is available in your location.

The Things Stack OTAA Device Registration

  1. Go to your application console to be able to register a device. To start adding an OTAA end device, click + Add end device, as shown in Figure 21.
Figure 7816: Add end device
  1. To register the module, start by clicking Manually, as shown in Figure 22.
Figure 7817: Manually register device to The Things Stack
  1. Configure the activation method by selecting Over the air activation (OTAA) and compatible LoRaWAN version. Afterwards, click on the Start button, as shown in Figure 23.
Figure 7818: Device activation configuration
  1. Then input a unique End device ID and EUIs (DevEUI and AppEUI), as shown in Figure 15. Check if your module has a DevEUI on sticker or QR that you can scan then use this as the device unique DevEUI.
NOTE

Optionally, you can add a more descriptive End device name and End device description about your device.

  1. After putting all the details, click Network layer settings to proceed to the next step.
NOTE

It is advisable to use a meaningful End device ID, End device name, and End device description that will match your device purpose. The End device ID rak-device is for illustration purposes only.

Figure 7819: OTAA Device Information
  1. Next step is to set up Frequency plan, compatible Regional Parameter version, and LoRaWAN class supported. Then you can click Join settings.
Figure 7820: OTAA Configuration
  1. The last step in the registration of a new OTAA end-device is the configuration of the AppKey. To get the AppKey, you must click the generate button. Then click Add end device to finish your new device registration.
Figure 7821: OTAA AppKey generation and device registration
  1. You should now be able to see the device on The Things Stack console after you fully registered your device, as shown in Figure 27.
NOTE
  • The AppEUI, DevEUI, and AppKey are the parameters that you will need to activate your LoRaWAN end-device via OTAA. The AppKey is hidden by default for security reasons, but you can easily show it by clicking the show button. You can also copy the parameters quickly using the copy button.

  • The three OTAA parameters on The Things Stack device console are MSB by default.

  • These parameters are always accessible on the device console page, as shown in Figure 27.

Figure 7822: OTAA device successfully registered to The Things Stack

RAK4600 OTAA Configuration for The Things Stack

The RAK4600 Breakout Board supports a series of AT commands to configure its internal parameters and control the functionalities of the module. To set up the RAK4600 board to join The Things Stack using OTAA, start by connecting the RAK4600 board to the computer (see Figure 1), open the RAK Serial Port Tool, and then wait for the communication to start. It is recommended to test the serial communication and verify the current configuration by sending either of these two AT commands:

at+set_config=device:restart
at+version
Figure 7823: AT Command response

As an example, these are the list of the parameters you need to configure in RAK4600:

  • LoRa join mode: OTAA
  • LoRa class: Class A
  • LoRa region: EU868
  • Device EUI: 1133557799224466
  • Application EUI: 1000000000000009
  • Application Key: 04FA4E626EF5CF227C969601176275C2
  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
  1. Set the Device EUI.
at+set_config=lora:dev_eui:1133557799224466
  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:1000000000000009
  1. Set the Application Key.
at+set_config=lora:app_key:04FA4E626EF5CF227C969601176275C2
Figure 7824: Configuring LoRa Parameters
NOTE

After configuring all the parameters, you need to reset your RAK4600 Module to save parameters.

  1. After resetting, join in OTAA mode.
at+join

After 5 or 6 seconds, if the request was successfully received by a LoRa gateway, then you should see the messages shown in Figure 30.

  1. Try to send a message from the RAK4600 board.
at+send=lora:2:1234567890
Figure 7825: OTAA Test Sample Data Sent via RAK Serial Port Tool

You can see the data sent from the RAK4600 board on The Things Stack platform, as shown in Figure 31.

Figure 7826: OTAA Test Sample Data Sent Viewed in The Things Stack

The Things Stack ABP Device Registration

  1. To register an ABP device, go to your application console and select the application where you want your device to be added. Then click + Add end device, as shown in Figure 32.
Figure 7827: Add end device
  1. To register the module, start by clicking Manually, as shown in Figure 33.
Figure 7828: Add end device
  1. Configure the activation method by selecting Activation by personalization (ABP) and compatible LoRaWAN version. Afterwards, click on the Start button, as shown Figure 34.
Figure 7829: Manually register device to The Things Stack
  1. Input a unique End device ID and DevEUI, as shown in Figure 35. Check if your module has a DevEUI on sticker or QR that you can scan then use this as the device unique DevEUI.
NOTE

Optionally, you can add a more descriptive End device name and End device description about your device.

  1. After putting all the details, click Network layer settings to proceed to the next step.
NOTE

It is advisable to use a meaningful End device ID, End device name, and End device description that will match your device purpose. The End device ID rak-device-abp is for illustration purposes only.

Figure 7830: Device Information
  1. Next step is to set up Frequency plan, compatible Regional Parameter version, and LoRaWAN class supported. In an ABP device, you also need to generate Device Address and NwkSKey (Network Session Keys). Then you can click Application layers settings.
Figure 7831: ABP Configuration in The Things Stack
  1. The last step in the registration of a new ABP end-device is the configuration of the AppSKey. To get the AppSKey, you must click the generate button. Then click Add end device to finish your new device registration.
Figure 7832: ABP Configuration in The Things Stack
  1. You should now be able to see the device on The Things Stack console after you fully registered your device, as shown in Figure 38.
Figure 7833: RAK4600 registered at The Things Stack

RAK4600 ABP Configuration for The Things Stack

To set up the RAK4600 Breakout Board to join The Things Stack using ABP, start by connecting the RAK4600 board to the computer (see Figure 1) and open the RAK Serial Port Tool. It is recommended to test the serial communication by sending either of these two AT commands:

at+set_config=device:restart
at+version
Figure 7834: AT Command response

As an example, these are the list of the parameters you need to configure in RAK4600:

  • LoRa join mode: ABP
  • LoRa class: Class A
  • LoRa region: EU868
  • Device address: 260BDE80
  • Network Session Key: 433C7A924F7F6947778FE821525F183A
  • Application Session Key: A585653A949C2B2D44B55E99E94CB533
  1. Set the LoRa join mode to ABP.
at+set_config=lora:join_mode:1
  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
  1. Set the Device Address.
at+set_config=lora:dev_addr:260BDE80
  1. Set the LoRa Network Session Key.
at+set_config=lora:nwks_key:433C7A924F7F6947778FE821525F183A
  1. Set the LoRa Application Session Key.
at+set_config=lora:apps_key:A585653A949C2B2D44B55E99E94CB533
Figure 7835: AT Command for ABP LoRa parameters via RAK Serial Port Tool
NOTE

After configuring all the parameters, you need to reset the RAK4600 Module to save the parameters.

  1. After resetting, join in ABP mode.
at+join
NOTE

By using the ABP mode in LoRaWAN, it doesn’t require to join a network before sending a LoRaWAN package. But to keep the consistency of internal states of the firmware of the RAK4600 board, it is still required to send the at+join command in the ABP mode. This time, the firmware should reply almost immediately with an “OK”.

  1. Try to send data from the RAK4600 to The Things Network in ABP mode.
at+send=lora:2:1234567890
Figure 7836: ABP Test Sample Data Sent via RAK Serial Port Tool

You can see the data sent by the RAK4600 board on The Things Stack device console Live data section and the Last seen info should be a few seconds ago.

Figure 7837: OTAA Test Sample Data Sent Viewed in The Things Stack

Connecting with ChirpStack

This section shows how to connect the RAK4600 Breakout Board to the ChirpStack platform. As described in the ChirpStack website:

“ChirpStack provides open-source components for LoRaWAN networks. Together they form a ready-to-use solution including a user-friendly web interface for device management and APIs for integration. The modular architecture makes it possible to integrate within existing infrastructures. All components are licensed under the MIT license and can be used for commercial purposes.”

Figure 7838: RAK4600 Breakout Board in the context of the ChirpStack platform

The architecture of the ChirpStack platform is shown in Figure 43. Similar to the case of TTN, the RAK4600 Breakout Board is located in the periphery and will transmit the data to the backend servers through a LoRa gateway. For a more technical understanding of the ChirpStack components, refer to its Architecture page.

  • In this section, it is assumed that you are using a RAK LoRa gateway, such as the RAK7243. The gateway must be configured and registered previously to ChirpStack deployment. More information can be found at Connect the Gateway with Chirpstack.
NOTE

The frequency band used in this example is EU868 which is supported by the high-frequency version of the RAK4600 Breakout Board.

  • These are the steps needed to send data to the ChirpStack platform from a RAK4600 Breakout Board:

    1. Create a new Application
    2. Register a new device on the platform:
    3. Configure the Join Mode:
      • OTAA mode on the platform
      • OTAA mode on the RAK4600
      • ABP mode on the platform
      • ABP mode on the RAK4600 Breakout Board
    4. Send data from the RAK4600 Breakout Board and receive it at the platform

The following section gives the details of each of these aforementioned steps. Before you start, you must choose to use either ABP or OTAA mode to register the device to the network server.

Create a new Application

  1. Go to the Application section then click on the “+ CREATE” button.
Figure 7839: Application Section
  1. ChirpStack LoraServer supports multiple system configurations, with only one by default. By default, a new Application should be created, although it is possible to reuse the existing ones. For this setup, create a new Application by clicking on the "CREATE APPLICATION" button.
Figure 7840: Creating a New Application
  1. Create an Application named “rak_node_test”. Fill in the required parameters, as shown in Figure 46. To finish, click on the “CREATE APPLICATION” button.
  • Application Name: rak_node_test
  • Application Description: test
  • Service profile: field is to select the system profile.

The Application Description field is just a descriptive text.

Figure 7841: Filling Parameters of an Application
Register a new Device
  1. Click on the Application “rak_node_test” created in the previous step.
Figure 7842: List of Applications Created
  1. Select the “DEVICES” tab, as shown in Figure 48.
Figure 7843: Devices Tab of an Application
  1. Inside of the “DEVICES” tab, create a new device (LoRa node) by clicking on the “+ CREATE” button.
Figure 7844: Add a New Device
Figure 7845: New Device Registration Form
  1. Once the device is created, fill in the necessary data. You can generate a Device EUI automatically by clicking the icon highlighted in Figure 51. Or, you can write a correct Device EUI in the edit box.

Fill in the parameters requested:

  • Device name and Device description: These are just descriptive texts.
  • Device EUI: This interface allows you to generate a Device EUI automatically by clicking the icon highlighted in red in Figure 51. You can also add a specific Device EUI directly in the form.
  • Device-profile: To join in OTAA mode, select “device_profile_otaa” or “device_profile_abp” to join in ABP mode.
  1. To finish, click on the “CREATE DEVICE” button.
NOTE

ChirpStack doesn’t support AS923 in ABP mode.

Figure 7846: Generate a new Device EUI in the device registration form

LoRaWAN Join Mode

The LoRaWAN specification defines that to join in a LoRaWAN network, each end-device has to be personalized and activated. Activation can be done either via Over-The-Air-Activation (OTAA) or via Activation-By-Personalization (ABP). In OTAA, the end-device previously personalized is activated when is deployed or reset. In ABP, personalization and activation are done as a single step.

OTAA Mode
Configure the OTAA Mode on the Platform
  1. If you have selected “device_profile_otaa”, then after the device is created, an Application key must be also created for this device.
Figure 7847: Chirpstack OTAA Activation
  1. A previously created Application key can be entered here, or a new one can be generated automatically by clicking on the icon highlighted in red in Figure 53.
Figure 7848: Chirpstack OTAA Set Device Keys
  1. Once the “Application key” is added in the form, the process can be finalized by clicking on the “SET DEVICE-KEYS” button.
  • As shown in Figure 54, a new device should be listed in the “DEVICES” tab. The most important parameters, such as the Device EUI, are shown in the summary.
Figure 7849: Chirpstack OTAA List of Device in the Device Tab
  1. To end the process, it is a good practice to review that the “Application key” is properly associated with this device. The “Application key” can be verified in the “KEYS(OTAA)” tab.
Figure 7850: Application Key associated to the new device
NOTE

Standard OTAA mode requires the Device EUI, Application Key, and the Application EUI. But in ChirpStack’s implementation, only Device EUI and the Application Key are mandatory. The Application EUI is not required and is not recorded in the Application tab. Nevertheless, the Application EUI is a mandatory parameter in the RAK4600 Breakout Board firmware. To resolve this mismatch, you can reuse the Device EUI as the Application EUI during the configuration on the side of the node.

Configure the OTAA Mode on the RAK4600 Breakout Board

RAK4600 Breakout Board complies with the LoRaWAN 1.0.2 specification. By default, the LoRa join mode is OTAA and the LoRa Class is Class A.

To set up the RAK4600 Breakout Board to join ChirpStack using OTAA, start by connecting the breakout board to the Windows PC, as shown in section Interfacing with RAK4600 Breakout Board, open the RAK Serial Port Tool, and then wait for the communication to start. It is recommended to test the serial communication by sending either of these two AT commands:

at+get_config=lora:status
at+version
Figure 7851: at+version command response

As an example, the following parameters will be configured in the RAK4600 Breakout Board:

  • LoRa join mode: OTAA
  • LoRa class: Class A
  • LoRa region: EU868
  • Device EUI: d045f054b2797f7c (from ChirpStack registration)
  • Application EUI: d045f054b2797f7c (from ChirpStack registration)
  • Application Key: 2cb29aefe344c0d7b044e7a7d3afda6d (from ChirpStack registration)
  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 (for Europe).

Refer to the Datasheet for the list of supported frequencies.

at+set_config=lora:region:EU868
NOTE

Remember that the device frequency shall be in the same frequency band as the gateway.

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

The App EUI parameter is not needed for the ChirpStack platform; therefore, you will use the same ID as the Device EUI. Otherwise, the firmware will fail to connect to the network server.

  1. Set the Application Key.
at+set_config=lora:app_key:2cb29aefe344c0d7b044e7a7d3afda6d
Figure 7852: Chirpstack OTAA configuration via RAK Serial Port Tool
NOTE

After configuring all the parameters, you need to reset your RAK4600 Breakout Board to save the parameters.

  1. After resetting, start to join.
at+join
  1. After 5 or 6 seconds, if the request is successfully received by a LoRa gateway, then the “OK Join Success” message will be shown.
Figure 7853: Chirpstack OTAA Join the Network via RAK Serial Port Tool
  1. The JoinRequest and JoinAccept messages are also displayed on the ChirpStack platform, specifically in the LORAWAN FRAMES tab.
Figure 7854: Checking LoRaWAN Joint Request in Chirpstack OTAA Console
  1. Try to send data from the RAK4600 Breakout Board to ChirpStack.
at+send=lora:2:1234567890
Figure 7855: Send a LoRaWAN Message via RAK Serial Port Tool
  • On the ChirpStack console, the messages shall appear in the “LORAWAN FRAMES” tab, as shown in Figure 61. By convention, messages sent from nodes to the gateway are considered as UPLINK, while messages sent by the gateway to nodes are considered as a DOWNLINK.
Figure 7856: Chirpstack Data Received Preview
ABP Mode
Configure the ABP Mode on the Platform

During the registration of a new device, if “device_profile_abp” is selected, then the ChirpStack platform will assume that this device will join the LoRaWAN network using the ABP mode.

NOTE

Check Disable frame-counter validation to prevent the node-side counting frame counting from starting from zero after the node is powered on during the test, and the server cannot synchronize the node-side counting, causing the transmission to fail.

  1. Fill the parameters requested, as appears in Figure 62:
  • Device name and Device description: These are just descriptive texts.
  • Device EUI: You can also add a specific Device EUI directly in the form.
Figure 7857: Configuring a Device in ABP Mode
  1. Once these parameters are filled, click on the “CREATE DEVICE” button.

After selecting the ABP mode, the following parameters appear in the “ACTIVATION” tab:

  • Device address
  • Network Session Key
  • Application Session Key
Figure 7858: Chirpstack ABP Activation Parameters Needed
  • The parameters can be generated as random numbers by the platform or can be set with user values. Once these parameters are filled properly, the process is completed by clicking on the “(RE)ACTIVATE DEVICE” button.
Configure the ABP mode on the RAK4600 Breakout Board

RAK4600 Breakout Board complies with the LoRaWAN 1.0.2 specification. By default, the LoRa join mode is OTAA, and the LoRa Class is Class A.

To set up the RAK4600 Breakout Board to join ChirpStack using ABP, start by connecting the breakout board to the computer, as shown in section Interfacing with RAK4600 Breakout Board, open the RAK Serial Port Tool, and then wait for the communication to start. It is recommended to test the serial communication by sending either of these two AT commands:

at+get_config=lora:status
at+version
Figure 7859: at+version command response

As an example, the following parameters will be configured in RAK4600:

  • LoRa join mode: ABP
  • LoRa class: Class A
  • LoRa region: EU868
  • Device address: 26011af9 (from ChirpStack registration)
  • Network Session Key: c280cb8d1df688bc18601a97025c5488 (from ChirpStack registration)
  • Application Session Key: 4d42ec5caf97f03d833cdaf5003f69e1 (from ChirpStack registration)
  1. Set the LoRa join mode to ABP.
at+set_config=lora:join_mode:1
  1. Set the LoRa Class to Class A.
at+set_config=lora:class:0
  1. Set the frequency/region to EU868 (for Europe).

Refer to the Datasheet for the list of supported frequencies.

at+set_config=lora:region:EU868
  1. Set the Device Address.
at+set_config=lora:dev_addr:26011af9
  1. Set the Network Session Key.
at+set_config=lora:nwks_key:c280cb8d1df688bc18601a97025c5488
  1. Set the Application Key.
at+set_config=lora:apps_key:4d42ec5caf97f03d833cdaf5003f69e1
Figure 7860: Chirpstack ABP Parameters Configuration via RAK Serial Port Tool
NOTE

After configuring all the parameters, you need to reset your RAK4600 Breakout Board to save the parameters.

  1. After resetting, join in ABP mode.
at+join
NOTE

The ABP mode in LoRaWAN doesn’t require to join a network before sending a LoRaWAN package. But, to keep the consistency of internal states of the firmware of the RAK4600, it is still required to send the at+join command in the ABP mode.

Figure 7861: RAK Serial Port Tool join LoRaWAN in ABP mode.
  1. Try to send data from the RAK4600 Breakout Board to ChirpStack.
at+send=lora:2:1234567890

The console will feedback with an “OK” message.

Figure 7862: Chirpstack Sample Data Sent via RAK Serial Port Tool

The sent data shall be displayed on the ChirpStack console on the “LORAWAN FRAMES” tab.

Figure 7863: ChirpStack Console UPLINK LoRaWAN Frame in ABP mode.

LoRa P2P

Refer to LoRa P2P guide.

Miscellaneous

Bluetooth Connection Modes

There are three BLE modes in the RAK4600 Breakout Board from the firmware V3.0.0.6: the Peripheral Mode, the Central Mode, and the Beacon Scan Mode. You can change the work mode of RAK4600 Breakout Board BLE using the AT command provided, which is defined. For further information, refer to RAK4600 Breakout Board AT Command Manual.

at+set_config=ble:work_mode:<mode>:<long_range>

Description: Set the work mode for BLE.

  • mode - 0: BLE peripheral mode, 1: BLE central mode. 2: Beacon scan mode.
  • long_range - 0: normal range. RAK4600 Breakout Board does not support BLE long-range.

BLE Peripheral Mode

Using the Peripheral Mode, you can scan RAK4600 Breakout Board BLE and connect it using your mobile device.

BLE Central Mode

Using the Central Mode, the RAK4600 Breakout Board BLE will not advertise, so your mobile device will not be able to scan it. This is very useful if you want to make the breakout board act as a BLE gateway wherein BLE Sensor Nodes (up to 20 devices) can send sensor data.

Beacon Scan Mode

Using the Beacon Scan mode, the RAK4600 Breakout Board can scan around for Beacon devices. It is useful to scan iBeacon and Eddystone.

RAK4600 Breakout Board BLE Default Settings

By default, the RAK4600 Breakout Board will work on Peripheral Mode. In this mode, you can configure it through BLE including DFU easily. It should be noted that after resetting the breakout board, you only have 60 seconds to establish a connection with your mobile device through BLE based on its power consumption settings. If no connection has been established within 60 seconds, the breakout board will stop the BLE advertising and enter power-saving mode. On the other hand, there is no limitation once you are already connected with the RAK4600 Breakout Board BLE.

If you set the RAK4600 Breakout Board to work in Central Mode, the RAK4600 Breakout Board will work first on Peripheral Mode for 30 seconds, and if no connection is established after 30 seconds, it will automatically change to Central Mode. In this mode, the breakout board will stop the BLE advertising and will not be visible on your mobile device up until you change the work mode to peripheral mode or reset the RAK4600 Breakout Board again.

Upgrading the Firmware

Before you start working with the RAK4600 Breakout Board, it is recommended to keep the breakout board updated to the latest version of the firmware. The latest firmware can be found in the firmware section of the RAK4600 Breakout Board Datasheet.

In the following sections, two (2) options for flashing new firmware in a RAK4600 Breakout Board are shown: Upgrade through DAPLink and Upgrade through BLE.

Firmware Upgrade Through DAPLink

Refer to the RAKDAP1 Flash and Debug Tool guide in the Accessories category.

Firmware Upgrade Through BLE

  1. Install the nRF Connect for Mobile, developed by the Nordic Semiconductor company. This tool is available on Google Play Store and Apple App Store.

  2. Download the DFU package for the RAK4600 Breakout Board and save it on your mobile phone.

  3. Make sure the Bluetooth on your mobile is turned on. Open the “nRF Connect for Mobile” application, and you will see all BLE devices in range in the scan list:

Figure 7864: Available Bluetooth Devices in the nRF Connect app
  1. Turn on your RAK4600 Breakout Board and wait for a couple of seconds. Search for a BLE Device named “RUI-...” in the scan list of the app. Connect to this device and then click on “Secure DFU Service”.
NOTE

The “RUI-...” BLE device is visible only for 60 seconds. For more information, see Bluetooth Connection Modes.

Figure 7865: Secure DFU Service in the nRF Connect App
  1. In the “Secure DFU Service”, click the button highlighted in red in Figure 71.
Figure 7866: Buttonless DFU
  1. Click the arrow highlighted in Figure 72. A Write value pop-up window will appear and press “Send”.
Figure 7867: Resetting the Bootloader via Bluetooth
  1. Now, the RAK4600 Breakout Board is now working in DFU Mode. In the application, you will see the default status of the breakout board, as shown in Figure 73.
Figure 7868: RAK4600 Breakout Board Default Status Overview after Resetting
  1. In the nRF Connect device list, search for a BLE device named “DfuTarg” and then, click on the “CONNECT” button.
Figure 7869: RAK4600 Breakout Board Default Bluetooth ID after Resetting
  1. After connected, select the DFU Icon. On the Select file type, choose the “Distribution packet (ZIP)”, and press OK. This will then prompt you to select the zip file of the DFU package that you have downloaded.
Figure 7870: Distribution Packet File Type under DFU
  1. The DFU application automatically starts to upgrade the firmware of your RAK4600 Breakout Board through DFU over BLE. After upgrading, the application restarts the breakout board, and the DFU mode is disabled. Now, you can use the RAK4600 Breakout Board with the latest firmware.
Figure 7871: DFU Upgrading of RAK4600 Breakout Board Firmware via BLE