How to force client to disconnect
Posted: Wed Dec 13, 2017 10:54 am
Hi,
I'm actually using "ESP32_BLE_Arduino" library of nkolban, which is working fine. I have my esp32 with my custom service and characteristic. in the other hand, an ios or android app who can connect to the esp32 via BLE and update the caracteristic.
The issue I have now is that if someone use an app like "lightBlue" or "nRF Connect" and stay connected to my esp32 BLE, I'm stuck, no one else can connect to the device. Which is some way what I want, but I would like to force a client to disconnect inside my esp32 if the client has been connected let's say more than 5 seconds.
For now, I'm trying to launch a timer when client is connected, and if the time limit is reached, I launch an ESP.restart();
So far now, my code does not work, and my esp32 just restart every seconds.
Any suggestions?
Thanks
I'm actually using "ESP32_BLE_Arduino" library of nkolban, which is working fine. I have my esp32 with my custom service and characteristic. in the other hand, an ios or android app who can connect to the esp32 via BLE and update the caracteristic.
The issue I have now is that if someone use an app like "lightBlue" or "nRF Connect" and stay connected to my esp32 BLE, I'm stuck, no one else can connect to the device. Which is some way what I want, but I would like to force a client to disconnect inside my esp32 if the client has been connected let's say more than 5 seconds.
For now, I'm trying to launch a timer when client is connected, and if the time limit is reached, I launch an ESP.restart();
So far now, my code does not work, and my esp32 just restart every seconds.
Any suggestions?
Thanks