Bluetooth Activity Markers

Bluetooth Activity Markers

There are 2 types of bluetooth activity markers:

  1. Static
  2. Dynamic

1. Bluetooth Versions

Minimum supported version is Bluetooth 4.0 from 2010, also known as Bluetooth LE (Bluetooth Low Energy). Following are all supported Bluetooth versions:

  1. Bluetooth 4.0 - Bluetooth Low Energy
  2. Bluetooth 4.1 - direct IoT connection
  3. Bluetooth 4.2 - direct IPv6 connection
  4. Bluetooth 5.0 - higher speed longer range
  5. Bluetooth 5.1 - direction finding
  6. Bluetooth 5.2 - improved audio
  7. Bluetooth 5.3 - better signal quality and security

2. Bluetooth Assigned Numbers

Static Bluetooth Activity Marker

In locations where access to 5V is challenging, traditional Bluetooth Beacons can be used to provide a Static (broadcasting a signal that changes LESS than once every year) bluetooth signals.

Daxia DX-CP28

The DX-CP28 has dual batteries for up to 5 years operation (actual figure depends on broadcast settings and batteries used).

dxcp28

Broadcast features Product specifications
Chipset DA14531
Bluetooth BLE 5.1
Protocols GATT, Eddystone, iBeacon
Current 28 uA average (with broadcast interval 500ms at 2.5 dBm)
Battery 2 x 3V CR2477 (2 x 880 mAh)
Transmit +2.5 dBm
Diameter 61 mm
Height 18 mm
Waterproof no
Sample Aliexpress

Note most CR2477 batteries now has 1000 mAh instead of 880 mAh.

Holyiot 23006

The 23006 has dual batteries for up to 5 years operation (actual figure depends on broadcast settings and batteries used) and also a waterproof rating.

23006_1

Broadcast features Product specifications
Chipset nRF52810
Bluetooth BLE 5.0
Protocols GATT, Eddystone, iBeacon
Current 45 uA average (with broadcast interval 500ms at 4 dBm)
Battery 2 x 3.6V ER14250 (2 x 1200 mAh)
Transmit +4 dBm
Diameter 52 mm
Height 23 mm
Waterproof IP66
Sample Aliexpress

23006_2

This a more expensive option when higher transmission power and waterproofing is required.

Signal Detection

Scan Timing

Out of the 40 Bluetooth LE channels, 3 are used for advertising signals (despite their consective numbering the channels 37, 38, 39 are actually NOT next to each other)


Source: MathWorks

Many companies (e.g. Apple) advertises on all 3 channels at once to increase chance of the signal getting detected.

Setting of Bluetooth Advertising Interval, Scan Interval and Scan Window is important, as they must overlap for discovery to happen (those tall dotted boxes shown in diagram below).


Source: Nordic

The Advertising Interval can be set from 20ms to 10.24 seconds (in steps of 0.625ms) with random delay from 0ms to 10ms added.

Sensor Station

Scan Duration

For Sensor Stations with mains power supply the bluetooth scan defaults for performing scanning are:

  • Scan Duration: 10s
  • Scan Interval: 211ms
  • Scan Window: 120ms

You can increase the Window value to closer to the Interval value to improve detection coverage BUT that will use more power and take away airtime from the WiFi module sharing the 2.4G radio.

Interval size of 211 is a prime number to avoid keep on missing some advertisements made on even intervals.

Signal Strength

Some Sensor Station operating system (e.g. esphome) displays the signal strengths as graphics (colour bars) instead of actual dB values, we have converted those 4 graph times (which are 4 dB ranges) into 4 exact dB values:

esphome graphics esphome value range our exact value
4 Green Bars >= -50 dB -50dB
3 Yellow Bars >= -65 dB -59dB
2 Yellow Bars >= -85 dB -76dB
1 Red Bar < -85dB -85 dB

Direction Detection

Bluetooth 5.1 direction finding is very nice, by attaching Constant Tone Extension (CTE) data sequence behind the CRC in a Bluetooth packet in order to get Angle of Departure (AoD) or Angle of Arrival (AoA) with multiple antennas at either transmitter or receiver.

That would be great for our indoor positioning, unfortunately it is not readily available yet, so we will be using the Received Signal Strength Indication (RSSI) and triangulation from multiple fixed Bluetooth sources instead.

Reverse Bluetooth Detection

Personal Console uses the mobile phone to scan for emitted bluetooth signals to determine current position. It is also possible to do it the other way round - use other nearby Bluetooth devices to scan for bluetooth signals emitted by the the mobile phone.

This way is NOT receommneded, as we believe our way is substantially more private, however it is interesting to know there are alternatives available:

Bluetooth MAC Address

Apple iOS devices will NOT show the owner the Bluetooth MAC addresses of surrounding devices, if some day they unlock your data (data that you have collected with your own resources on your own device) then you can use the Bluetooth MAC address directly as Activity Marker original design.

Cup Compute

On most device the Bluetooth MAC Addresses can be set to broadcast an Activity Marker instead of its default Bluetooth MAC address.

For the popular Cup Compute, the Bluetooth MAC address can be changed in the firmware, there is no direct support for that in esphome yet, but that feature can be added easily.

Activity Marker

The default firmware for Cup Compute is as an Activity Marker that scans surrounding radio signals and broadcasts its own radio signal.

1. Signal Scanning

Default scanning frequency is 6 times a day, for example at these local times:

0:02 - bluetooth
0.08 - wifi

4:02 - bluetooth
4.08 - wifi

8:02 - bluetooth
8.08 - wifi

12:02 - bluetooth
12.08 - wifi

16:02 - bluetooth
16.08 - wifi

20:02 - bluetooth
20.08 - wifi

Increasing scanning frequency will increase power consumption.

  • Maximum scanning frequency is 96 times a day (every 15 minutes).
  • Minimum scanning frequency is once a day (every 24 hours).

2. Signal Broadcast

By default broadcast signals are changed once a day:

01:00 - signal change

Increasing change interval will increase power consumption:

  • Maximum signal change frequency is 48 times a day (every 30 minutes).
  • Minimum signal change frequency is once every 30 days.

Beacon Alternative

Apple blocks its iphone customers from accessing the WiFi and Bluetooth MAC addresses that they collected themselves on their own phone in their own environment.

Until Apple removes that block, their customers need to use other bluetooth broadcast signals (e.g. Apple's ibeacon signal which will be our initial focus).