Persistent BLE Bonding Fails on Some Heltec Boards – MAC Address Workaround Solved It? #17632
Unanswered
marcotidei
asked this question in
ESP32
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm a beginner, so please bear with me if I miss something obvious.
I'm working on a project using the Heltec Wireless Stick V3 to control GoPro cameras via BLE (aioble). I’ve had two of these boards paired with two GoPros for months—connections were stable, bonding was persistent, and everything worked reliably.
Recently, I added more Wireless Stick V3 boards (and some LoRa 32 V3 units—same chip, different board and display). Suddenly, BLE bonding is no longer persistent:
First boot: Camera is in pairing mode → board scans, connects, and pairs successfully.
After reboot: It fails to reconnect despite successful pairing previously.
I reached out to Heltec, and they confirmed all boards are the same revision (REV 3.1), and no hardware changes have been made. So I shifted my focus to the firmware side.
The strange part is:
The exact same firmware (compiled on the same machine) works fine on an M5Stack and a generic ESP32-S3 board, maintaining bonding and reconnecting as expected.
After quite a bit of testing and learning, I verified that the issue is not related to storing the pairing keys.
I vaguely remembered reading that someone with a similar problem fixed it by setting a custom BLE MAC address. So I tried this, and surprisingly—it worked!
In mpnimbleport.c - void mp_bluetooth_nimble_port_hci_init(void), I added:
My question:
Could this issue be caused by how Heltec programmed (or didn’t program) the BLE MAC address?
Is it possible that some of their boards are shipped without a unique or valid MAC for BLE, causing bonding to fail after reboot?
Would love to hear if anyone else experienced something similar or knows how ESP32 BLE MAC assignment works at the hardware level (efuses, factory vs software MACs, etc.).
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions