Closed reaper7 closed 6 years ago
it's an IDF bug that was solved today: https://github.com/espressif/esp-idf/issues/1537 so it will work here in the next IDF compilation or using arduino as IDF component
BTW...is there any possibility to detect if remote device is connected? and write/print to this device only when connected?
I will implement it soon =)
BTW...is there any possibility to detect if remote device is connected? and write/print to this device only when connected?
Here it is: https://github.com/espressif/arduino-esp32/pull/1183
now you can use SerialBT.hasClient()
to check it
hasClient() works 👍
I hoped that it will solve my problem but no :(
if (SerialBT.hasClient() == true) {
Serial.println("Client connected");
//SerialBT.println("some text");
} else {
Serial.println("Client disconnected");
}
delay(1000)
detection itself works very nice, client reconnecting do not cause resets but only when print/write to bt serial is commented.
so...we are waiting for a final solution in IDF...
I leave this issue open
fix finally merged: https://github.com/espressif/esp-idf/issues/1537#issuecomment-376374138
now it depends of @me-no-dev to recompile the IDF for arduino
Done! Update your ESP32 core to the last version and check it now
👍 done :)
is the password function merged? If yes, how to use to BluetoothSerial?
Hardware:
Board: ESP32 Dev Module Core Installation/update date: Latest GIT version 05/03/2018 IDE name: Arduino IDE Flash Frequency: 80Mhz Upload Speed: 921600
Description:
Sketch starts normally, when I connect android client (Serial Bluetooth), I got printed text, everything works right. Next I disconect android client, still sketch works ok but when I reconnect android client one more time I got this message:
and esp32 restart
BTW...is there any possibility to detect if remote device is connected? and write/print to this device only when connected?
Sketch:
Debug Messages:
ESP Exception Decoder:
UART Debug