Клиент ESP32 BLE больше не подключается

#arduino #bluetooth-lowenergy #esp32

#arduino #bluetooth-низкое энергопотребление #esp32

Вопрос:

Я подготовил приложение для подключения к клиенту esp32 с помощью sketch BLE_client, все работает нормально, но когда я закрываю приложение и снова открываю его, оно снова не подключается. Клиент, кажется, остановился. Только если я отключу Bluetooth мобильного телефона, клиент запустится снова. Вы столкнулись с той же проблемой? Какой-нибудь совет?

 bool connectToServer() {  Serial.print("Forming a connection to ");  Serial.println(myDevice-gt;getAddress().toString().c_str());    pClient = BLEDevice::createClient();  Serial.println(" - Created client"); lt;---STUCK HERE IF CLOSE THE APP WHEN FOUND THE SERVICE   pClient-gt;setClientCallbacks(new MyClientCallback());   // Connect to the remove BLE Server.  pClient-gt;connect(myDevice); // if you pass BLEAdvertisedDevice instead of address, it will be recognized type of peer device address (public or private)  Serial.println(" - Connected to server");   // Obtain a reference to the service we are after in the remote BLE server.  BLERemoteService* pRemoteService = pClient-gt;getService(serviceUUID);  if (pRemoteService == nullptr) {  Serial.print("Failed to find our service UUID: ");  Serial.println(serviceUUID.toString().c_str());  pClient-gt;disconnect();   }