Hi there
I need to read data from Esp32's serial pins and send data to two android phone with bluetooth serial. But in the code below I can connect 1 phone and read data but 2. phone cant connect or Connect and immediately disconnect.
I tried somethings in "BluetoothSerial.cpp" I able to connect 2 phones but esp32 can only send data to last connected phone. I guess it saves last connected adress in memory I dont know.
Is there any solution or different library for that?
Thank you
#include "BluetoothSerial.h"
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif
BluetoothSerial SerialBT;
void setup() {
Serial.begin(115200);
SerialBT.begin("ESP32test"); //Bluetooth device name
Serial.println("The device started, now you can pair it with bluetooth!");
}
void loop() {
if (Serial.available()) {
SerialBT.write(Serial.read());
}
if (SerialBT.available()) {
Serial.write(SerialBT.read());
}
delay(20);
}