Track indoor floor levels with RAK WisBlock and Blues Notecard. This is a LoRaWAN-based IoT solution for precise altitude tracking in indoor environments.
In today's world, it is common to see groups of people spending short periods indoors, whether in shopping centers, tourist attractions, or, as in this example, emergency response teams. In these scenarios, coordinators need to know the location of personnel and equipment on different floors within indoor spaces.
GPS or GNSS modules are not suitable for this type of application because walls obstruct stable connections. Wi-Fi and Ethernet are also inadequate, since they require a local area network (LAN) to be installed in the building, which may not be available during emergencies. Bluetooth lacks the necessary range, leaving LoRaWAN and cellular networks as the only viable solutions.
This project presents a complete solution that includes the hardware, software, and IoT platforms needed to address indoor tracking challenges. It uses a high-precision pressure sensor to determine the floor level where a team is located, starting from a single reference point for the initial altitude.
By the end of this tutorial, you will be able to collect data and transmit it wirelessly using two of the most widely used IoT communication protocols: LoRaWAN and NB-IoT.
Use Case
The purpose of this project is to illustrate a real-world scenario where the solution can be applied effectively. We will replicate the project developed in the Blues Wireless Accelerator, which provides a system where a coordinator monitors the exact position of response team members during emergency events.
We will reproduce the project as outlined in its official repository, beginning with the hardware configuration shown in Figure 4.
Requirements
Necessary Hardware
- RAK19001 WisBlock Baseboard
- RAK4631 WisBlock Core
- RAK1902 Barometric Pressure Sensor
- RAK13102 WisBlock Blues Carrier Module
- LiPo Battery
- Blues Notecard (choose one according to your location)
- Blues Notecarrier A, B or F (optional)
Gateway
- RAK7268V2 WisGate Edge (used in this guide)
Back-End Services
Hardware Connection
The hardware adopts a modular approach provided by WisBlock. The complete firmware is developed and available in the official RAKwireless GitHub repository, and the IoT data visualization platforms are cloud-ready. Additionally, we will replicate the project developed by Blues Wireless by using JSON data to access the information.
Connecting the WisBlock elements is straightforward:
Mount the core module onto the core slot, and attach RAK1902 to the sensor slot A. In this example, the RAK19001 base board, but you can select another WisBlock base board.
Connect the Blues Notecard via the WisBlock Blues Carrier Module then plug it into the baseboard's IO slot.
Finally, to prepare your setup for deployment using the WisBlock enclosure designed for this purpose.
Now that the devices are connected, you can begin programming.
The Notecard requires a peak current of 2 A to send data. The VDD pin of the WisBlock cannot provide this current, so it is recommended to use a battery or connect an additional USB cable to the Notecard during your project testing.
Blues Hardware Assembly
After completing the instructions outlined in the hardware configuration and uploading the code provided by Blues on GitHub to the Notecard, the final assembly should look like the image below:
Firmware Development
The code can be downloaded from our official RAKWireless GitHub repository. It was developed using Visual Studio Code and PlatformIO, two widely used tools for embedded programming.
In case the libraries are not available on Platform IO, you can find them from the following sources:
For more information about how to configure and code your WisBlock setup with Platform IO, check the setting up WisBlock on the PlatformIO guide.
Sending Data to the Cloud
LoRaWAN communication
The process of communicating with end devices via LoRaWAN networks can be accomplished through a public network like Helium or by setting up your own network using a LoRaWAN gateway. In this case, the second option will be used.
You will need:
The setup process is straightforward and takes only a few minutes. For step-by-step instructions, refer to the RAK7268V2 gateway documentation.
Once configured and connected to the TTN LNS, use the payload decoder below.
TTN Payload Decoder
function Decoder(bytes, port) {
// Basic dictionary that holds all the decoded measurement values
var decoded = {};
// Working with bytes for decoding of payload
if (port === 2) {
// Adapt this to the payload byte structure of the messages your device is sending
var temperature = ((bytes[0] << 16)|(bytes[1] << 8)|(bytes[2]))/100;
var pressure = ((bytes[3] << 16)|(bytes[4] << 8)|(bytes[5]))/100;
var altitude= ((bytes[6] << 16)|(bytes[7] << 8)|(bytes[8]))/100;
console.log("received sensor data");
// Working with Location
decoded.Temperature = temperature;
// Working with battery
decoded.Pressure = pressure
// Working with Sensor data
decoded.Altitude = altitude;
// Working with status and booleans
decoded.leakage_detected = false;
// Working with Configuration Fields
} else if (port === 100) {
console.log("received configuration data");
}
// Extract Gateway Metadata and LoRaWAN statistics
// We are encapsulating this with a Try-Block in case the Gateway does not provide metadata such as RSSI, SNR, etc.
try {
decoded.lorawan_rssi = (!!normalizedPayload.gateways && !!normalizedPayload.gateways[0] && normalizedPayload.gateways[0].rssi) || 0;
decoded.lorawan_snr = (!!normalizedPayload.gateways && !!normalizedPayload.gateways[0] && normalizedPayload.gateways[0].snr) || 0;
decoded.lorawan_datarate = normalizedPayload.data_rate;
} catch (e) {
console.log("Failed to read gateway metadata");
}
// Return data to datacake
return decoded;
}
Blues Communication
Create an account on the Notehub page and start a new project. For detailed steps, refer to the Blues documentation.
Blues Payload Decoder
This payload decoder is used when the transmitted data is sent via the Blues Wireless hardware.
function Decoder(request) {
var data = JSON.parse(request.body);
var device = data.device;
var file = data.file;
var decoded = {};
if (file === "_track.qo") {
decoded.voltage = data.body.voltage;
decoded.motion = data.body.motion;
decoded.seconds = data.body.seconds;
} else if (file === "_session.qo") {
decoded.voltage = data.voltage;
} else if (file === "data.qo") {
decoded.altitude = data.body.altitude;
decoded.pressure = data.body.pressure;
decoded.temperature = data.body.temperature;
} else if (file === "sensors.qo") {
decoded.temperature = data.body.temp;
decoded.humidity = data.body.humidity;
}
if (("tower_lat" in data) && ("tower_lon" in data)) {
decoded.tower_location = "(" + data.tower_lat + "," + data.tower_lon + ")";
}
if (("where_lat" in data) && ("where_lon" in data)) {
decoded.device_location = "(" + data.where_lat + "," + data.where_lon + ")";
}
decoded.rssi = data.rssi;
decoded.bars = data.bars;
decoded.orientation = data.orientation;
decoded.card_temperature = data.body.temperature;
// Array where we store the fields that are being sent to Datacake
var datacakeFields = []
// take each field from decodedElsysFields and convert them to Datacake format
for (var key in decoded) {
if (decoded.hasOwnProperty(key)) {
datacakeFields.push({field: key.toUpperCase(), value: decoded[key], device: device})
}
}
// forward data to Datacake
return datacakeFields;
}Datacake Connection
The connection to Datacake will be established by integrating the TTN and Notehub with the platform. You can create two devices in DataCake or configure a single device to receive data from multiple platforms.
After configuring your device on the Datacake, verify that the payload fields are received correctly. If so, label each field with the correct variable name.
Figure 5: Datacake Fields Configuration
If everything has been set up correctly, you should see a data history display similar to the following image:
Figure 6: Datacake History of Data
After completing the Notehub and TTN integration using Datacake's official guides, your dashboard should look similar to Figure 7:
Figure 7: Datacake Dashboard Result
You can now send data to DataCake using LoRaWAN or NB-IoT/BLE/Cat-1.
Some Strengths of Working with WisBlock
Production-Ready: A finished product ready for real-world use.
Modular Design: Quick and easy setup using WisBlock's plug-and-play architecture.
Clean and Professional: Results in a polished and compact final product with minimal assembly.
Developer-Friendly Firmware: Compatible with Arduino and PlatformIO, no need for complex IDEs.
Multi-Network Communication: Supports LoRaWAN and cellular (NB-IoT, LTE-M, CAT-1) connectivity.
Quick Integration with Dashboards: Easily connected to IoT platforms, no advanced front-end/backend coding required.
Space-Efficient: Small form factor ideal for installations with limited space.
Stock Notice: Some components used in Blues' reference solution may no longer be available.
Summary
As presented in this tutorial, WisBlock is a modular hardware solution developed by RAKwireless that simplifies industrial-grade IoT development. When paired with Blues Wireless components, it enables rapid deployment without the need for a custom PCB design and offers some good features like:
Plug-and-Play Hardware: There's no need to design your PCBs. Just stack the modules and go.
Industrial Application Ready: Designed for reliable use in professional and commercial environments.
Prebuilt Firmware: Core functionality is already developed and ready for deployment, saving time and effort.
Developer-Friendly: Seamlessly compatible with Arduino and PlatformIO.
Changelog
-
Version 1 - Indoor Floor-Level Tracker with RAK WisBlock and Blues
Notecard
- Date Published: 12/07/2026
Updated