Building a simple iBeacon fails

I have been trying to track the comings and goings of the family car using a Holyiot iBeacon tracker. I also have a few ESP32 Bluetooth proxies scattered around the house. This never really worked as well as I’d hoped, as there were usually significant delays reporting movement.

I have some ESP32 boards laying around so decided to build an iBeacon. At this point I don’t need to know its proximity or movement, just that it is either on or off, such as when the car starts the USB power will power up the ESP32 and the iBeacon will be detected.

This should be easy, right? I’m starting with the default template after initializing the board, and then adding the lines for esp32_ble_beacon as described here.

I can see the logs showing it is running, however my BT proxies fail to detect it, and it also does not show up under the HA iBeacon integration.

I’ve also tried a couple different models of ESP32 boards, neither seem to work.

What am I missing here??

How often are your beacons set up to advertise?

There’s some recommendations here about why integer intervals may not work well: BC04P Beacon – Deep Dive into the Configuration Screens – Blue Charm Beacons

1022.5ms works well for me.

Also are you using the Bermuda integration?

This is pretty much the gold standard for room tracking. GitHub - agittins/bermuda: Bermuda Bluetooth/BLE Triangulation / Trilateration for HomeAssistant

Unfortunately I don’t know anything about using an ESP32 as a beacon. I did not even realise it was possible. I’ve only ever seen it configured as a proxy receiver.

I couldn’t find much online about doing this, that’s why I posted here. So maybe it is just not possible!

I have been using Bermuda, but not messed around with the broadcast intervals. I’m not sure how well Holyiot supports that but I will definitely look into it.

It is in the ESPHome documentation, so it should be.

Can you share the config you used?

This is it:

esphome:
  name: ibeacon-mazda
  friendly_name: iBeacon Mazda

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "******"

ota:
  - platform: esphome
    password: "******"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  ap:
    ssid: "******"
    password: "******"

captive_portal:

esp32_ble_beacon:
  type: iBeacon
  uuid: '43214321-4321-4321-4321-432143217777'

Try this:

esp32_ble_beacon:
  type: iBeacon
  uuid: '43214321-4321-4321-4321-432143217777'
  major: 3838
  minor: 4949
  max_interval: 1285 ms
  min_interval: 1022 ms
1 Like

Brilliant. That works. Thank you very much for your input!

Any idea why using the default values doesn’t work?

I’m guessing it was looking for this:

  major: 3838
  minor: 4949

(you can set them to any value between 0 and 65535)
You could try removing the intervals to see if that was all it was looking for, but 100ms default is way too fast in my opinion.

1 Like