Skip to main content

BBF — Bluetooth Beacon Scan

Performs an on-demand BLE (Bluetooth Low Energy) beacon scan for a configurable duration and returns the list of discovered devices.

Format

  • Set: >SBBFxx<
  • Query: >QBBF<
  • Response: >RBBFxx;y;name1,A1,addr1;name2,A2,addr2;...<

Parameters

ParameterTypeDescription
xxInteger (01–99)Scan duration in seconds. Value 00 is invalid.

Response Fields

FieldDescription
xxConfigured scan duration in seconds (zero-padded).
yScan status: 1 = scan is still running, 0 = scan has finished.
nameDevice advertised name. It is empty if device does not broadcast a name.
AAddress type: 0 = public address, 1 = random address.
addr12-character lowercase hexadecimal Bluetooth address (no colons).

The response lists up to 20 unique beacons. Duplicate addresses are suppressed automatically.

Examples

Start a 10-second scan:

>SBBF10<
>RBBF10;ID=351234567890123<

Query while scan is still running:

>QBBF<
>RBBF10;1;ID=351234567890123<

Query after the scan finishes (two beacons found):

>QBBF<
>RBBF10;0;P RHT 90251E,0,703bf221d4d5;,1,6f24996da077;ID=351234567890123<

Notes

  • A new scan clears the previous results.
  • Issuing >SBBFxx< while a scan is already active returns error ER51 (already in progress).
  • Results are held in memory only and are not persisted across reboots.