• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Extending ESP32 BLE Server

Q&A Forum › Category: ESP32 › Extending ESP32 BLE Server
0 Vote Up Vote Down
dragon541 asked 4 years ago

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:
mq135Descriptor.setValue(“MQ 135”);
mq135Characteristics.addDescriptor(new BLE2902());

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
mq135Characteristics.notify();

Client side is very similar.

Is this all I need to do or am I forgetting/missing something?


Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2023 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.