• 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

Ble Client multi server conect

Q&A Forum › Category: ESP32 › Ble Client multi server conect
0 Vote Up Vote Down
Dmytro Zhuravko asked 4 years ago

Good day. My task is to interrogate several BLE devices. Do you have a working solution? My sketch, which I am using, drives the board into a stupor at different times. esp hangs after the end. Sometimes a sketch works properly for 10 minutes, and sometimes 3-4 iterations. Can you help me figure it out? Or maybe you have a ready-made solution with some kind of sensors, thanks for earlier.
 
bool connectToDevice(BLEAdvertisedDevice* device) {
Busy=true;
Serial.println(“Stablishing communications with device:”);
pClient = BLEDevice::createClient();
Serial.println(” BLE client created”);
// Connect to the remove BLE Server.
pClient->connect(device);
pClient->setClientCallbacks(new ClientCB());
Serial.println(” Connected to device”);
// Obtain a reference to the service we are after in the remote BLE server.
pRemoteService = pClient->getService(srvUUID);
if (pRemoteService == nullptr) {
Serial.println(” Error: Failed to find service”);
pClient->disconnect();
return false;
}
Serial.println(” Service found”);
remoteChr = pRemoteService->getCharacteristic(chrUUID);
if (remoteChr == nullptr) {
Serial.print(” Failed to find characteristic”);
pClient->disconnect();
return false;
}
Serial.println(” Characteristic found”);
Serial.println(” Setting callback for notify / indicate”);
remoteChr->registerForNotify(chrCB);
return true;
}

Question Tags: BlE Client multi server conect
1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
 
Unfortunately, we don’t have any working solution for what you want to do.
 
I recommend that you post your question in our Facebook group, maybe it will reach more people and someone has some recommendations. Here’s the link to the group: https://www.facebook.com/groups/RandomNerdTutorials
 
I’m sorry that I can’t help much with this subject.
Regards,
Sara

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] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition 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.