Adding ESP32 to another ESP32's BLE whitelist

PavloEE
Posts: 1
Joined: Thu Jul 08, 2021 3:50 pm

Adding ESP32 to another ESP32's BLE whitelist

Postby PavloEE » Thu Jul 08, 2021 4:01 pm

Hi,

I've just developed an authentication method to my ESP32 being a local BLE server to log into in with a 6-digit passkey from my phone. However, at the same time, I would like to add another ESP32 module being the server's client to the BLE whitelist to have it bonded with the server by default and ready to receive data sent from my smartphone to the server.
I wanted to define this whitelist entry by the use of the BLEAddress of the client in hex form 00:00:00:00:00:00. I have an issue with the proper definition of the entry since I'm unable to use this address as the argument to the function BLEDevice::whiteListAdd.
Here's how I tried to do it:

Code: Select all

BLEDevice::whiteListAdd(BLEAddress (std::string(3C:71:BF:FA:1A:6A));
I also tried other options for converting the hex to string in order for it to work with the BLEAddress method, but none of them work and I'm unable to find the information on what kind of data type this method works with when inputting the BLE address manually.

Any help would be appreciated, thanks in advance!
P

Who is online

Users browsing this forum: No registered users and 74 guests