Identify Bluetooth client

Hi,

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)?

gilbert54:
What if both clients are transmitting simultaneously? Do the transmitted data interfere with each other

Probably not, as the blueteeth can transmit as much as they like but only one is connected at a time. Since you actually have an ESP32 in your hand, you would surely be better off using WiFi if you want to connect to several devices at a time.

Nick_Pyner:
Probably not, as the blueteeth can transmit as much as they like but only one is connected at a time. Since you actually have an ESP32 in your hand, you would surely be better off using WiFi if you want to connect to several devices at a time.

Nick, you're right. Did some testing this morning. Connected one BT client (BT serial monitor on my PC). Then tried to connect another BT client (BT serial monitor on my phone) and that 2nd connection fails. When I disconnect BT on my PC, the phone BT can connect. So all is good.
FYI I don't want multiple clients to connect simultaneously, so BT is my friend ;-).

Regards,
Gilbert