Bluetooth connection status polling/update

Hi there

I am testing MIT APP Inventor with my ESP32 connected via Bluetooth (see my code below). While my ESP32 detects (and reports on terminal) a Bluetooth connection loss immediately (via an event function) I was so far not able to achieve this within MIT APP Inventor. This feature is crucial for me as I would like to be notified immediately as I am controlling the ESP32 with this planned MIT App.

How can I achieve a Bluetooth connection status update e.g. once a second or so. I read about the Clock1 feature but the code below does not do the job.

Thanks for your help and suggestions.

Regards,

Remo

just for my testing I use two different Status Labels:
Bluetooth connection detection1
Bluetooth connection detection2

Try with Screen1.ErrorOccurred

1 Like

Thank you, works well now. The only thing is that I now get the connection msg "connected to true" instead of the Bluetooth device name like "connected to ESP32". How can I display the Device name (or alternatively the MAC address) I am connected with (instead of true)?

BT Device Name