RAK4600 LoRa Module includes an nRF52832 MCU and an SX1276 LoRa chip. Its RF communication capabilities (LoRa+BLE) make it suitable for a variety of applications in the IoT field.More details can be found in this:
RAK4600 LoRa Module - RAKwireless Knowledge Hub.
RAK4600 can be ordered in RAK store:
https://store.rakwireless.com/products/rak4600-lora-module?variant=31767268851757
The following describes how the module builds the development environment in Arduino IDE and runs the demo project.
-
What is Arduino? If you know little about Arduino, please have a look below: https://www.arduino.cc/
-
You have known Arduino. Install the IDE first: https://www.arduino.cc/en/Main/Software
-
Which BSP is used? RAK4600 is based on nrf52832, therefore Arduino Core for Adafruit Bluefruit nRF52 Boards is suitable for RAK4600.
Refer to the following link to install Adafruit Bluefruit nRF52 in Arduino. https://github.com/adafruit/Adafruit_nRF52_Arduino
After installation, select the board according to the figure below.
-
Download the gpio map of RAK4600 from: https://github.com/RAKWireless/RAK4600_Arduino It contains gpio maping, serial tool, demo project and Softdevice hex.
- feather_nrf52832: GPIO maping of RAK4600.
- example: lorawan and ble demo project.
- serial tool: serial tool on PC.
- feather_nrf52832_bootloader.hex: Includes sotfdevice and bootloader.
-
Replace your folder with our folder
feather_nrf52832
, your file path maybe%APPDATA%\Local\Arduino15\packages\adafruit\hardware\nrf52\0.14.6\variants
-
The last step is program the bootloader hex file
feather_nrf52832_bootloader.hex
to RAK4600 with Jlink or DAP, etc.
At this point, the development environment is ready.
The bootloader of RAK4600 supports the serial port upgrade program. Use the Arduino IDE to upgrade as follows.
- Connect the pin 10 of module to the GND.
- After restarting the MCU, disconnect pin 10 from GND. The current state is bootloader mode.
- Click the
Upload
button to update the firmware to RAK4600.
Note:
1. If you use a WisBLOCK board (RAK5005), the silk screen of pin 10 on the back of the board is "RX1".
2. You can also refer to the following link to customize your own bootloader.Adafruit_nRF52_Bootloader
Adafruit provides many BLE demos, we open them from File->Examples.
- Open one of the demos, File->Examples->Adafruit Bluefruit nRF52 Libraries->peripheral->bleuart.
-
Update firmware with bootloader, View the log through the serial port on the PC.
-
We need to install an app in the mobile phone to connect with the module.
Refer to the following link for installation. nRF Connect for Mobile - nordicsemi.com
-
After the installation is completed, open Bluetooth and app. Scan and connect a device named "bluefruit 52". You can communicate with your device via Bluetooth.
- Here are the logs of mobile phone and PC。
RAK4600 uses open source protocol stack to realize lorawan communication.
-
What lorawan lib is used?
LMIC is a LoraWAN-MAC-in-C library, adapted to run under the Arduino environment.
Refer to the following link to install it.
-
Open the demo project
RAK4600_LoRaWAN_Demo.ino
in Arduino IDE. Modify the device parameters to your own.Notice:The APPEUI and DEVEUI must be in little-endian format.
- Update firmware with bootloader. When download ok, the RAK4600 will be auto join LoRaWAN and send data.
Please note that the default region is US915, if you want to use another region like EU868, you should open the file "lmic_project_config.h" in the folder <...\Documents\Arduino\libraries\arduino-lmic-master\project_config>, and modify the region to the one you want to use.
BLE and LoRa demo is RAK4600_ble_scan_lora.ino
, Modify the lora parameters to your own, compile and upload it as before.
We can see the following logs.