esp32-snippets icon indicating copy to clipboard operation
esp32-snippets copied to clipboard

ESP32 BLE Async

Open JLightMedia opened this issue 4 years ago • 4 comments

I have a not typical question. Is it possible to move all BLE tasks to a different thread to execute independently? I founded an example "FreeRTOS". Is it possible to apply the same program algorithm for BLE? The main goal is don't block the main loop during connecting, searching, and other BLE stuff.

JLightMedia avatar Feb 23 '21 14:02 JLightMedia

Yes, you can run BLE from separate task.

chegewara avatar Feb 23 '21 18:02 chegewara

Is there any code example for server and client?

JLightMedia avatar Feb 23 '21 18:02 JLightMedia

Just create new task and run ble as usual in that new task, unless we are speaking about 2 different things.

chegewara avatar Feb 23 '21 18:02 chegewara

Ok, thank you. I'll try that.

JLightMedia avatar Feb 23 '21 18:02 JLightMedia