I'm using ESP32 (DEVKIT 1 board) with the Arduino IDE.
My device will use an Android app to calibrate the sensors, using BT Classic.
I'm not using BT BLE because BLE libraries are not freely available for the MIT Appinventor platform and BLE is not available on older Android phones.
BT classic works fine (have it all working so far using one of the many Bluetooth Serial monitor apps) on Android and on my Windows PC, but there is a big security concern.
Using a PIN for BT Classic pairing doesn't work between ESP and Android. Oddly enough it does work when pairing with a Windows machine, but that doesn't help, since the target is to use a phone as BT client.
I can work around it by adding a PIN authentication in my ESP code, but I will have to track the BT ID of the client (the phone) after successful authentication to make sure I'm only talking to an authorized phone.
Is there a way to identify the sender of data using the BTserial library?
While we're at it: suppose 2 clients are connected to the same ESP32 device and they are both transmitting data using the BT SPP profile, how does the receiving ESP32 know who is sending what? What if both clients are transmitting simultaneously? Do the transmitted data interfere with each other (what I mean is: do both messages end up as 'spaghetti' on the receiving end)?