• 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

Multiple UUIDS & Characteristics

Q&A Forum › Category: ESP32 › Multiple UUIDS & Characteristics
1 Vote Up Vote Down
Rushi Patel asked 6 years ago

Hello Rui,
I am facing problem with multiple UUIDs. All UUIDs Characteristics need descriptor or we define common descriptor for all? How we parse json file using BLE?  Can you help me? Please.

Question Tags: BLE
12 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Yes, I recommend using the common descriptor for all your characteristics. Where’s that JSON file?

0 Vote Up Vote Down
Rushi Patel answered 6 years ago

Hi I create 3 characteristics but its shows only 2. Is it the limitation of BLE ?

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

No.. You can create many characteristics (I don’t know a maximum number), but it looks like you forgot to initialize some section that is required in order to create a 3rd characteristic…
Regards,
Rui

0 Vote Up Vote Down
Rushi Patel answered 6 years ago

Hi Rui, here i add my characteristics code part. What i do wrong in that? Can you help me please?

BLEService *pService = pServer->createService(SERVICE_UUID);
// Create a BLE Characteristic
pCharacteristicTX = pService->createCharacteristic(
CHARACTERISTIC_UUID_TX,
BLECharacteristic::PROPERTY_NOTIFY);

pCharacteristicTX->addDescriptor(new BLE2902());
pCharacteristicM = pService->createCharacteristic(
CHARACTERISTIC_UUID_MODE,
BLECharacteristic::PROPERTY_WRITE);
pCharacteristicM->setCallbacks(new MODECallbacks());

pCharacteristicM->addDescriptor(new BLE2902());

pCharacteristicT = pService->createCharacteristic(
CHARACTERISTIC_UUID_TIMER,
BLECharacteristic::PROPERTY_WRITE);
pCharacteristicT->setCallbacks(new TIMERCallbacks());
pCharacteristicT->addDescriptor(new BLE2902());

pCharacteristicD = pService->createCharacteristic(
CHARACTERISTIC_UUID_DEFAULT,
BLECharacteristic::PROPERTY_WRITE);
pCharacteristicD->setCallbacks(new DEFAULTCallbacks());
pCharacteristicD->addDescriptor(new BLE2902());

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Hello again Rushi, I’ve created an example for you that shows how to create 3 BLE characteristics: https://gist.github.com/RuiSantosdotme/d98d1867c5f53e57144877526665a199

Can you try that example and try to read the characteristics in your phone with the nRF connect app? Does it work for you?

Then, you need to modify that example and use if for your own needs.

Unfortunately due to the high volume of requests that I receive every day, it’s a bit difficult to debug custom projects, but I can help if you have a specific error message.

I hope that helps!

Thanks for your patience. Regards,
Rui

0 Vote Up Vote Down
Rushi Patel answered 6 years ago

Yeah. Thanks. I try your code its showing all 3 characteristics. Now,I will try in my code.
Thanks for your support. 

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

You’re welcome! I hope that sample code helps.

0 Vote Up Vote Down
Rushi Patel answered 6 years ago

Yeah.
Thanks.
Somewhat now  I seen 4 characteristic in nRF Connect app still 4 is remaining so I tried for that.

0 Vote Up Vote Down
Rushi Patel answered 6 years ago

I have one question.
My app will be connected with ESP32 BLE and i am coming out from the app, device is disconnected and again i am connected with ESP32 BLE, it is not show the value.
If i reset the ESP32 then it will be shown.
 
What i do so if again i am connect with ESP32 it is not required to reset?

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

You would need to store the values in your app (in permanent variables), or you need to establish a new connection with your BLE device and request the characteristics values again…

0 Vote Up Vote Down
Rushi Patel answered 6 years ago

If i am connected bulb with power supply and tested that time bluetooth shows connecting and disconnecting every  time but if i have just use only esp32 module and tested without no load that time its always connected.
Its power issues or any other?

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

I’m not sure… It might be a bad power supply that doesn’t supply enough current and crashes your board. I recommend measuring the current to see how much is using.

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

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

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

Copyright © 2013-2025 · 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.