Skip to Content
GuidesBLE Pairing (SPP)

📲 BLE Pairing (SPP) — Wireless Terminal

Guide to configure the BLE virtual serial port (SPP) and send commands to the Rinho device from your phone, as if it were a USB cable.

This guide covers BLE SPP pairing (wireless terminal). If you need to configure BLE sensor reading (temperature, humidity, fuel), see the BLE Sensors guide.


🤔 What is BLE SPP for?

The BLE SPP (Serial Port Profile) module allows opening a virtual serial port from the phone to:

  • 🔧 Configure the device in the field without a USB cable
  • 🐛 Debug in real time (>SDB1<) viewing the output on the phone screen
  • 📡 Query sensor, GPS, communications status and more
  • 📤 Receive texts from the device (using rules with @BTH destination)

BLE SPP works simultaneously with BS/BSW sensors. Enabling CXBTH does not interfere with BLE sensor reading — they complement each other.


🔧 Prerequisites

RequirementDetail
DeviceSpider IoT, Smart IoT or Zero IoT
FirmwareWith BLE support (see notes per device below)
Phone appCargando...
RangeThe phone must be within BLE range (approx. 10-30 meters)

Firmware per device

DeviceRequired firmwareNote
Spider IoT.nimble.otaLoad on a partition, switch with >SFRMCP<
Smart IoT.nimble.otaLoad on a partition, switch with >SFRMCP<
Zero IoTBuilt-in firmwareTurn off WiFi with >SSSWIFPWR00< before using BLE

Zero IoT: No special firmware needed. Just disable WiFi with >SSSWIFPWR00< and the BLE module will be available.


📶 Configure BLE SPP step by step

Enable CXBTH with name and PIN

Use the CXBTH command to activate SPP:

>SCXBTH1,RINHO_IOT,12345<
ParameterValueDescription
1Enable1 = Turn on, 0 = Turn off
RINHO_IOTNameBLE name visible from the phone (up to 16 characters)
12345PINAccess password (up to 16 characters)

Without password: If you don’t want to use a PIN, leave the field empty: >SCXBTH1,RINHO_IOT,<. In this case it is not necessary to send QPW when connecting.

Verify configuration

>QCXBTH<

Expected response:

>RCXBTH1,RINHO_IOT,12345;ID=...

Connect from the phone

  1. Open Cargando...
  2. Go to Devices (hamburger menu)
  3. Select Bluetooth LE
  4. Search for the device with the configured name (e.g.: RINHO_IOT)
  5. Tap to connect

Authenticate with QPW

If a PIN was configured, the first message to send after connecting is:

>QPW12345<

The device will respond with OK if authentication was successful. From there, any command can be sent as if it were via USB cable.

If QPW is not sent as the first message (when a PIN is configured), the device will ignore all commands.


💡 What can you do via BLE SPP?

Everything the same as via serial cable:

ActionExample
Query version>QVR<
Configure sensors>SBS00E,AC233FA24B16,10,60,0,INVALID<
Query sensors>QBS00<, >QBS00.temp<
Activate debug>SDB1<
Configure rules>SRL00E;TRG=BS02+;ACC={GCQ00H}<
Update firmware>SFRMM1<
Restart device>SRST<

📤 Send text to the phone from rules

You can use the @BTH destination in event engine actions to send text to the phone connected via BLE:

// When a beacon is detected, send text to the BLE terminal >SRL08E;TRG=BS00+;ACC={STX SENSOR DETECTADO;@BTH}<

This is useful for:

  • Field notifications when an event occurs
  • Confirming that a rule triggered correctly
  • Real-time visual debugging

⚡ Turn BLE on and off with ignition

In some scenarios it is convenient to turn BLE on only when the vehicle is running to save battery:

// Turn on BLE with ignition ON >SRL31E;TRG=IGN+;ACC={SCXBTH1}< // Turn off BLE with ignition OFF >SRL32E;TRG=IGN-;ACC={SCXBTH0}<

The SCXBTH command turns on and off the complete BLE module, so it is not necessary to control BLEPWR separately.


🔧 Troubleshooting

ProblemPossible causeSolution
BLE name doesn’t appear on the phoneCXBTH disabledVerify with >QCXBTH<, enable with >SCXBTH1,name,pin<
Connects but doesn’t respond to commandsMissing QPW authenticationSend >QPWpin< as the first message
SCXBTH responds ERRFirmware without BLE supportSpider/Smart: load .nimble.ota. Zero: verify >SSSBTHPWR11<
Disconnects frequentlyOut of range or interferenceBring the phone closer to the device (less than 10 m)
Cannot connect via BLEWiFi active on Zero IoTTurn off WiFi with >SSSWIFPWR00<
Debug (SDB1) shows nothing via BLEDebug is sent only via USB serial portUse >SDB0+BLX< for BLE-specific debug, or view the data on the USB cable

📖 Command summary

CommandFunctionReference
>SCXBTH1,name,pin<Enable BLE SPP terminalCXBTH
>SCXBTH0<Disable BLE SPPCXBTH
>QCXBTH<Query SPP configurationCXBTH
>QPWpin<Authenticate via BLECXBTH
>STX text;@BTH<Send text to BLE terminalEvent engine
>SSSWIFPWR00<Turn off WiFi (Zero IoT)
>SSSBTHPWR11<Turn on BLE (Zero IoT)

🎯 Next steps

Last updated