Arduino ESP32 BLE Examples
Posted: Sun Dec 02, 2018 1:21 am
Hello, I'm trying to get the client / server examples working. Found it odd the service and char UUID don't match in the example. But that's no big deal right? I changed the client so it matches the server example and also tried changing the client so it matches the server but client will not connect.
It sees the advertised device
But it's never getting to this condition even though I've made the uuids the same.
The only thing I modified in the BLE_client and BLE_server sketchers is the uuid for service and char to match them up
Thanks
It sees the advertised device
Code: Select all
BLE Advertised Device found: Name: MyESP32, Address: 24:0a:c4:96:70:7a, txPower: -21
Code: Select all
if (advertisedDevice.haveServiceUUID() && advertisedDevice.getServiceUUID().equals(serviceUUID)) {
Code: Select all
// Client
// The remote service we wish to connect to.
static BLEUUID serviceUUID("4fafc201-1fb5-459e-8fcc-c5c9c331914b");
// The characteristic of the remote service we are interested in.
static BLEUUID charUUID("beb5483e-36e1-4688-b7f5-ea07361b26a8");
// Server
#define SERVICE_UUID "4fafc201-1fb5-459e-8fcc-c5c9c331914b"
#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8"