Stretching my wings, I’m trying to better understand your code so I want to extend the ESP32 BLE Server and Client to include another sensor, say the MQ-135 for example. I know I need to add a BLECharacteristic and BLEDescriptor, something like:
BLECharacteristic mq135Characteristics("UUID Number", BLECharacteristic::PROPERTY_NOTIFY); BLEDescriptor mq135Descriptor(BLEUUID((uint16_t)0x2904));
and have it on both the client and server.
A couple of questions …
First is this a UUID version 1 or UUID version 4 number?
Second, what is the last number on the second line?
Your sketch seems to show that each number at the end of the BLEDescriptor line is unique.
Does it matter what this number is and what is it used for (the 0x2904)?
I don’t see that number except in the definition.
later you add in something like:
I know this creates a new BLE2090 instance with the defined characteristics.
Then get the value from the mq135 and
mq135Characteristics.setValue(put mq135 reading here);
and advertise there is a new value
Client side is very similar.
Is this all I need to do or am I forgetting/missing something?