Skip to Content
GuidesBLE Sensors

📡 BLE Sensors — Wireless Data Reading

Guide to configure BLE sensor reading on Rinho IoT devices.

This guide covers BLE sensor reading (temperature, humidity, fuel, presence). To configure a wireless serial terminal to send commands from your phone, see the BLE Pairing (SPP) guide.


🤔 What is BLE sensor reading for?

The BLE module allows connecting wireless sensors to the GPS device:

  • 🌡️ Temperature and humidity — Cold chain with Rinho Condition (L02S) sensors
  • Fuel — Tank level with Escort TD BLE
  • 🚪 Doors — Open/close with magnetic (Hall) sensor
  • 🏷️ Presence — Driver, tool or trailer detection with iBeacon
  • 🆘 Panic — Wireless emergency button with MoKo W6 wristband

Up to 4 simultaneous BLE sensors (BS00 to BS03) can be configured, each linked to a specific sensor by its MAC address.


🔧 Prerequisites

Before starting:

RequirementDetail
DeviceSpider IoT, Smart IoT or Zero IoT
BLE SensorRinho Condition (L02S), Escort TD, iBeacon or other compatible
Phone appCargando...
Serial terminalCable USB or Cargando...

🔄 Choose and load BLE firmware

Spider IoT / Smart IoT

The ESP32 has two interchangeable firmware partitions. To use BLE, the Nimble firmware must be loaded:

BLE and WiFi cannot coexist on the same Spider / Smart IoT partition. If both are needed, load each firmware on a different partition and switch with >SFRMCP0< / >SFRMCP1<.

Zero IoT

The Zero IoT has a single firmware that includes both BLE and WiFi. No firmware change is needed, but both features cannot be active simultaneously:

// Use BLE: turn off WiFi >SSSWIFPWR00< // Use WiFi: turn off BLE >SSSBTHPWR00<
SignalTurn onTurn offFunction
WIFPWR>SSSWIFPWR11<>SSSWIFPWR00<Controls the WiFi module
BLEPWR>SSSBTHPWR11<>SSSBTHPWR00<Controls the BLE module

The Zero IoT does not require special firmware. Just disable WiFi with >SSSWIFPWR00< to use BLE, and vice versa.

Load Nimble firmware on Spider / Smart IoT

Set download URL

Start download via WiFi or cellular

>SFRMM1< // Via WiFi (faster) >SFRMM2< // Via cellular (if no WiFi)

Wait for the update

The device downloads, installs and reboots automatically. It may take 2-5 minutes via cellular.

Verify firmware

>QVR<

The response should include NIMBLE:

>RVR RINHO IOT v1.09.16 SP EG915U LC86G 16MB NIMBLE 2025-01-15 10:30:00;ID=...

Firmware partitions (Spider / Smart): If WiFi is on one partition and BLE is desired on the other, use >SFRMCP0< or >SFRMCP1< to switch between partitions without losing either. Then reboot with >SRST<.


🌡️ Case 1: Temperature and humidity sensor — Rinho Condition (L02S)

The most commonly used sensor with Rinho devices. It measures temperature, humidity and has a magnetic sensor (Hall) for door detection.

📦 Rinho Condition datasheet · Cargando...

Step 0: Power on the sensor

The sensor comes powered off from factory:

  1. Unscrew the bottom cap of the sensor (counterclockwise)
  2. Remove the cap to access the interior
  3. Press the internal button for 3 seconds until the LED blinks
  4. Screw the cap back on

Once powered on, the sensor starts broadcasting via BLE automatically. To turn off: press and hold the button for 10 seconds.

Step 1: Configure the sensor with BeaconX Pro

Install the app

Cargando...

Connect to the sensor

  1. Open BeaconX Pro and scan for devices
  2. Tap the Rinho Condition (L02S) sensor to connect

Configure Slot 2 as Sensor Info

The sensor has 3 “slots” (broadcasting channels). For the Rinho device to read data correctly:

  1. Go to Slot 2 (SLOT2)
  2. Change type to Sensor Info
  3. Save changes

Note the MAC address

On the connected sensor’s main screen, write down the MAC address (e.g., AC233FA24B16). It will be needed to configure BS.

Configure Hall magnetic sensor (if using door detection)

Critical step if using the Hall effect sensor (door detection). Many users don’t see changes in magnetic state because they skip this step.

By default, the sensor has “Magnet On/Off” mode enabled, which turns the sensor on/off with a magnet instead of reporting magnetic state. To use it as a door sensor, this feature must be disabled:

  1. In BeaconX Pro, go to the Sensor section
  2. Find the “Magnet On/Off” option
  3. Disable “Magnet On/Off”
  4. Save changes

The sensor will now continuously report the magnetic field state in the mag_st attribute (0 = closed, 1 = open).

Step 2: Configure BS on the device

>SBS00E,AC233FA24B16,10,60,0,INVALID<
ParameterValueDescription
00IndexSensor position (00 to 03)
EEnableE=Enable, D=Disable
AC233FA24B16MACSensor MAC address (without :)
10Type10 = Rinho Condition / Sensor Info (MK)
60TimeoutSeconds without signal to consider disconnected
0Distance0 = no distance filter
INVALIDInvalid valueText when no valid reading

Step 3: Verify reading

Query sensor attributes with the QBS command:

>QBS00< // General sensor status >QBS00.temp< // Temperature (e.g., 23.5) >QBS00.hum< // Humidity (e.g., 65) >QBS00.mag< // Magnetic (0=closed, 1=open) >QBS00.batt< // Sensor battery (%) >QBS00.rssi< // BLE signal strength

Typical full response:

>RBS00E,AC233FA24B16,10,60,0,INVALID;mag_st:0,mot_st:0,mag_cnt:5,mot_cnt:0,x:0,y:0,z:0,temp:23.5,hum:65,batt:95,tag:MK,rssi:-52;ID=...

Available attributes for type 10 (MK): mag_st (magnetic), mot_st (motion), mag_cnt, mot_cnt, x, y, z, temp, hum, batt, tag, rssi.


⛽ Case 2: Fuel sensor (Escort TD BLE)

The Escort TD is a wireless fuel level sensor installed in the tank.

Configure BS

>SBS01E,A1B2C3D4E5F6,30,60,10,INVALID<
ParameterValueDescription
01IndexBS01 (can be any from 00-03)
30Type30 = Escort TD (Fuel)
A1B2C3D4E5F6MACEscort TD MAC

Query level

>QBS01.fuel_lvl< // Fuel level >QBS01.battery< // Sensor battery >QBS01.temp< // Temperature

Response:

>432;ID=... // 432 = fuel level (unit depends on sensor)

🏷️ Case 3: iBeacon for presence and panic

iBeacons are simple beacons that broadcast their identity. Useful for knowing if a driver, tool or trailer is nearby.

Configure BS with iBeacon

>SBS02E,AABBCCDDEEFF,2,30,5,0<
ParameterValueDescription
02IndexBS02
2Type2 = Eddystone UID / iBeacon presence
30Timeout30 seconds without signal = absent
5Distance5 meters maximum

Use signals in rules

Each BS sensor generates automatic signals that can be used in the event engine:

SignalMeaning
BS02+Beacon was detected (entered range)
BS02-Beacon was lost (left range or timeout)

Rule example: Report when a driver boards or leaves the vehicle:

// Rule: when driver's beacon is detected, report >SRL00E;TRG=BS02+;ACC={GCQ00H}< // Rule: when beacon is lost, report >SRL01E;TRG=BS02-;ACC={GCQ00H}<

🔍 BSW: Auto-detection for dynamic scenarios

The BSW (Bluetooth Smart Wildcard) system automatically detects sensors without knowing their MAC beforehand. It filters by iBeacon UUID, Major and Minor.

When to use BSW instead of BS?

ScenarioUse
Fixed sensor, always the sameBS (with MAC)
Interchangeable semi-trailerBSW (no MAC, filter by UUID)
Multiple identical sensors rotatingBSW
Fleet with trailers switching tractorsBSW

Example: Tractor connecting to different trailers

Each trailer has a beacon with the same UUID but different Major. The tractor automatically detects which trailer is attached:

// BSW00 captures beacons with specific UUID and injects into BS00 >SBSW00E,00,2F234454CF6D4A0FADF2F4911BA9FFA6,0,0,30,5<
ParameterValueDescription
00BSW IndexBSW00
EEnable
00TargetInject captured MAC into BS00
2F23...FFA6UUIDTrailer beacon UUID
0Major0 = any Major
0Minor0 = any Minor
30Timeout30 seconds
5Distance5 meters maximum

Query BSW status

>QBSW00<

Response with detected device:

>RBSW00E,00,2F234454CF6D4A0FADF2F4911BA9FFA6,0,0,30,5;detects:1,active:1,mac:AA:BB:CC:DD:EE:FF,rssi:-45,distance:1.50,age:3;ID=...

BSW with multiple targets

To monitor temperature in 4 zones of a refrigerated trailer, with one sensor per zone:

// BSW00 captures sensors with Major 1-4 and distributes them to BS00-BS03 >SBSW00E,00:01:02:03,2F234454CF6D4A0FADF2F4911BA9FFA6,1,4,60,0<

The Major 1 to 4 range makes BSW capture up to 4 different sensors and assign them to BS00, BS01, BS02 and BS03 respectively.


📊 Integrate BLE data into reports

To have the platform receive BLE sensor data, configure a user report (SUC) that includes QBS tokens:

Example: Report with temperature and humidity

>SUC04 $RCQ| #| QCQ,5,64| $;PA=temp:2:| QBS00.temp| $;PA=hum:2:| QBS00.hum| $;PA=mag:1:| QBS00.mag<
TokenDescription
$RCQReport header
#Sequence number
QCQ,5,64Standard GPS position
$;PA=temp:2:Additional parameter “temp” float type (2)
QBS00.tempBS00 temperature value
$;PA=hum:2:Additional parameter “hum” float type (2)
QBS00.humBS00 humidity value
$;PA=mag:1:Additional parameter “mag” integer type (1)
QBS00.magBS00 magnetic value

Data types for PA parameters

CodeTypeExample
1Integermag:1:0
2Floattemp:2:23.5
3Stringtag:3:MK

Generate the report

>GCQ04H< // Generates a SUC04 report and sends it

See G command for more generation options.

Device response:

>RCQ04...;PA=temp:2:23.5;PA=hum:2:65;PA=mag:1:0;ID=...

🔗 Create rules with BLE sensors

BS signals can be used to create automations with rules (RL) and user triggers (UV):

Example 1: High temperature alert

First create a user trigger (UV) that monitors temperature and activates when it exceeds 35 degrees:

// UV00: monitors QBS00.temp (float), activates when value is between 350 and 9999 // (sensor reports temp x10, so 350 = 35.0 degrees) >SUV00FQBS00.temp,0,10,350,9999< // Rule: if UV00 activates (high temp), generate report >SRL02E;TRG=UV00+;ACC={GCQ04H}< // Rule: if UV00 deactivates (normal temp), generate report >SRL03E;TRG=UV00-;ACC={GCQ04H}<
SUV ParameterValueDescription
00IndexTrigger UV00
FTypeFloat (floating point)
QBS00.tempCommandValue to monitor
0StartPosition of first character
10LengthNumber of characters to extract
350MinimumMinimum value to activate (35.0 degrees)
9999MaximumMaximum value

Example 2: Door open alert (magnetic sensor)

// UV01: monitors magnetic state, activates when mag is 1 or more >SUV01FQBS00.mag,0,10,1,2< // Rule: door open (magnetic = 1) >SRL04E;TRG=UV01+;ACC={GCQ04H}< // Rule: door closed (magnetic = 0) >SRL05E;TRG=UV01-;ACC={GCQ04H}<

Example 3: Driver presence (direct BS signal)

// BS02 has the driver's iBeacon // Rule: report when driver boards (beacon detected) >SRL06E;TRG=BS02+;ACC={GCQ00H}< // Rule: report when driver leaves (beacon lost) >SRL07E;TRG=BS02-;ACC={GCQ00H}<

🐛 BLE Debugging

When a sensor doesn’t appear or data is incorrect, enable BLE debug:

View raw BLE frames

Use the DB command to enable BLE debug:

>SDB0+BLX<

This shows in the debug console all BLE packets received by the device, including MACs, types and raw data. Useful for:

  • Verifying the sensor is broadcasting
  • Confirming the MAC address
  • Checking if the sensor type is correct
  • Diagnosing unknown sensors

Disable BLE debug

>SDB0-BLX<

Enable general debug

>SDB1< // Level 1: main messages >SDB2< // Level 2: more detail

🔧 Troubleshooting

ProblemPossible causeSolution
QVR doesn’t show NIMBLE or BLEIncorrect firmware (Spider/Smart)Load Nimble firmware (see firmware section)
Sensor not detectedIncorrect MACVerify MAC with BeaconX Pro
QBS00 returns INVALIDSensor out of range or powered offMove sensor closer, check battery
Temperature always 0Wrong sensor slot configurationConfigure Slot 2 as Sensor Info in BeaconX Pro
WiFi stopped working (Spider/Smart)BLE and WiFi share partitionNormal: use partitions (>SFRMCP<)
WiFi stopped working (Zero)BLE and WiFi mutually exclusiveTurn off BLE with >SSSBTHPWR00< before using WiFi
Hall always 0”Magnet On/Off” mode activeDisable in BeaconX Pro, Sensor section
Device slowerBLE scanning uses resourcesNormal, consider scan intervals
Sensor works intermittentlyWeak signal or interferenceCheck >QBS00.rssi<, move sensor closer

📱 Useful apps

AppPlatformUse
Cargando...Android/iOSConfigure MoKo sensors (slots, intervals, Hall)
Cargando...AndroidSend commands to Rinho device via BLE
Cargando...Android/iOSScan and debug generic BLE devices

📝 Full example

Typical configuration of a device with Rinho Condition (L02S) temperature sensor and driver presence beacon:

// 1. Verify BLE firmware >QVR< >RVR RINHO IOT v1.09.16 SP EG915U LC86G 16MB NIMBLE ...;ID=... // 2. Configure temperature sensor on BS00 >SBS00E,AC233FA24B16,10,60,0,INVALID< >RBS00E,AC233FA24B16,10,60,0,INVALID;... // 3. Verify temperature reading >QBS00.temp< >23.5;ID=... // 4. Configure driver beacon on BS02 >SBS02E,DDEEFF112233,2,30,5,0< >RBS02E,DDEEFF112233,2,30,5,0;... // 5. Create report with temperature >SUC04 $RCQ| #| QCQ,5,64| $;PA=temp:2:| QBS00.temp| $;PA=hum:2:| QBS00.hum< // 6. Rule: report when driver boards/leaves >SRL00E;TRG=BS02+;ACC={GCQ04H}< >SRL01E;TRG=BS02-;ACC={GCQ04H}< // 7. Rule: high temperature alert >SUV00FQBS00.temp,0,10,350,9999< >SRL02E;TRG=UV00+;ACC={GCQ04H}< // 8. Test manual report >GCQ04H< >RCQ04...;PA=temp:2:23.5;PA=hum:2:65;ID=...

📖 Command summary

CommandFunctionReference
>SBS00E,MAC,type,...<Configure BLE sensorBS IoT
>QBS00<Sensor statusBS IoT
>QBS00.temp<Read specific attributeBS IoT
>SBSW00E,...<Configure auto-detectionBSW IoT
>QBSW00<Wildcard statusBSW IoT
>SUV00F...<User triggerUV
>SRL00E;TRG=...;ACC={...}<Event engine ruleRL
>SUC04 ...<User reportUser reports
>GCQ04H<Generate reportG
>SDB0+BLX<BLE debugDB
>SFRMM1< / >SFRMM2<Update firmware
>SFRMCP0< / >SFRMCP1<Switch partition
>SSSWIFPWR00<Turn off WiFi (Zero IoT)
>SSSBTHPWR00<Turn off BLE (Zero IoT)

🎯 Next steps

Last updated