BSW IoT Command
Bluetooth Smart Wildcard auto-detection system for automatic iBeacon device detection.
What is it for?
| Use case | Description |
|---|---|
| 👤 Driver identification | Automatically detects driver beacon without configuring specific MAC |
| 🔧 Tool control | Monitors tools with beacons without preconfiguration |
| 🚛 Trailer detection | Identifies trailers automatically when coupling |
| 🏢 Fleet filtering | Uses UUID/Major to segment by company or department |
| ⚡ Automatic injection | Configures BS sensors dynamically when detecting devices |
Description
The BSW (Bluetooth Smart Wildcard) system automatically detects Bluetooth iBeacon devices and can inject their MACs into BS sensors or work independently. Supports 4 simultaneous capturers (BSW00-BSW03) with filtering by UUID, Major, Minor and distance.
The BSW system is ideal for driver identification, tool control and trailer detection without the need to configure specific MACs.
Features
- 4 independent modules with own events (BSW/BSWN)
- Advanced filtering by UUID/Major/Minor/Distance with hysteresis (20%)
- Automatic injection into BS sensors or independent mode (FF)
- Real signal loss timeout (not forced timer)
- Compatible with variable iBeacon PDU
Associated Signals
| Signal | Description | Type |
|---|---|---|
BSWxx | Connection status (1=connected, 0=disconnected) | Persistent |
BSWNxx | New MAC detected (temporary trigger) | Non-persistent |
Where xx: 00 .. 03
SBSW Command (Configure BSW)
Syntax
SBSWiiE,targets[,UUID[,major[,minor[,timeout[,distance]]]]]Parameters
| Parameter | Description |
|---|---|
ii | BSW index (00-03) |
targets | FF (independent) | 00 | 00:01 | ALL |
UUID | 32 hex characters (optional) |
major/minor | iBeacon filters, 0=any (optional) |
timeout | Seconds without signal to disconnect (default: 30) |
distance | Maximum meters (0=no filter) |
Quick Commands
| Command | Action |
|---|---|
>SBSW00E< | Enable with existing configuration |
>SBSW00D< | Disable (keeps config) |
>SBSW00X< | Disconnect current device |
>SBSW00*< | Clear completely |
Examples
Independent mode with UUID, 5s timeout, 2m distance:
>SBSW00E,FF,2F234454CF6D4A0FADF2F4911BA9FFA6,,,5,2<Inject into BS00 and BS01:
>SBSW02E,00:01,11223344556677889900AABBCCDDEEFF,,,15,3<With major=1000, minor=2000 filters:
>SBSW03E,00,FEDCBA9876543210FEDCBA9876543210,1000,2000,5,2<Inject into all BS:
>SBSW00E,ALL,2F234454CF6D4A0FADF2F4911BA9FFA6,,,30,5<QBSW Command (BSW Query)
Syntax
QBSWiiResponse
RBSWiiE,targets,UUID,major,minor,timeout,distance;detects:N,active:1/0,mac:XX,rssi:XX,distance:X.XX,age:XXFields
| Type | Fields |
|---|---|
| Static | ii, E/D, targets, UUID, major, minor, timeout, distance |
| Dynamic | detects, active, mac, rssi, distance, age |
Individual Tokens
Syntax
>QBSWii.field<Available Tokens
| Category | Tokens |
|---|---|
| Configuration | enabled, targets, uuid, major, minor, timeout, distance |
| Status | detects, active, mac, rssi, age |
BS Targets
| Value | Description |
|---|---|
FF | Independent mode (doesn’t inject into BS, only generates events) |
00, 01, 02, 03 | Inject into specific BS |
00:01, 00:01:02:03 | Inject into multiple BS |
ALL | Inject into all available BS |
Events and Triggers
Generated Events
| Event | Description | Type |
|---|---|---|
BSWxx | Connection status (1=connected, 0=disconnected) | Persistent |
BSWNxx | New MAC detected (temporary trigger) | Non-persistent |
Available triggers: BSW00, BSW01, BSW02, BSW03, BSWN00, BSWN01, BSWN02, BSWN03
Examples with Event Engine
Driver identification system:
>SUC00 $DRIVER_CHANGE - | QBSW00,\3B1,0,100<
>SRL93E;TRG=BSWN00+;ACC={GU000H;@TRM}< # Driver change
>SRL91E;TRG=BSW00+;ACC={GU100H;@TRM}< # Driver present
>SRL90E;TRG=BSW00-;ACC={GU200H;@TRM}< # Driver absentLoss alerts:
>SRL80E;TRG=BSW01-;ACC={SMSALERT:TOOL_OUT;@TRM}<
>SRL81E;TRG=BSW02-;ACC={SMSALERT:TRAILER_DISCONNECTED;@TRM}<Use Cases
1. Control of 4 drivers (independent mode)
>SBSW00E,FF,2F234454CF6D4A0FADF2F4911BA9FFA6,,,5,2< # Driver A
>SBSW01E,FF,A1B2C3D4E5F6708192A3B4C5D6E7F8A9,,,5,2< # Driver B
>SBSW02E,FF,11223344556677889900AABBCCDDEEFF,,,5,2< # Driver C
>SBSW03E,FF,FEDCBA9876543210FEDCBA9876543210,,,5,2< # Driver D2. Major filters (enterprise fleet)
>SBSW00E,FF,COMPANY_UUID,1000,,10,3< # Major 1000 = Drivers
>SBSW01E,FF,COMPANY_UUID,2000,,10,3< # Major 2000 = Tools
>SBSW02E,FF,COMPANY_UUID,3000,,10,3< # Major 3000 = Vehicles
>SBSW03E,FF,COMPANY_UUID,4000,,10,3< # Major 4000 = PersonnelSystem Behavior
Filter Order
- Valid iBeacon
- UUID (if configured)
- Major (if >0)
- Minor (if >0)
- Distance (if >0)
Automatic Disconnection
- Occurs by real signal loss (not forced timer)
- If device not detected during configured timeout → disconnects
- Timeout=0 → maintains connection indefinitely until manual command
Distance hysteresis (20%): Prevents oscillations at range limit. Example: 5m limit → disconnects at 6m (5m + 20%)
Distance Calculation
- Uses iBeacon TX Power + RSSI + standard Bluetooth formula
- Result in meters with 2 decimal places
Zero IoT supports WiFi and BLE simultaneously. Spider/Smart IoT must choose between WiFi or BLE (NimBLE).
Compatibility
See Also
- BE IoT Command - iBeacon triggers
- BS IoT Command - BLE sensors
- Event Engine - Rule configuration