Bluetooth does not identify when device is disconnected

In the previous version of app inventor, (in which the options to display the screen on a mobile, tablet or monitor did not appear), I connected my app using BluetoothClient to an esp32, made the connection between both devices and sent information as normally, at the time of removing power to esp32, with the ScreenX.ErrorOcurred function, the app identified the error number 517 which means that the connection with bluetooth had been lost and then updated the bluetooth status, in this version more recently, this no longer happens, I suppose it is due to the updates that have been made to the platform, this method in the previous apps that I had made workes fine and in the new apps that I have made it no longer works, I hope they correct this bug or implement a way to know when the bluetooth connection is lost since the Bluetoothclient.isConnected function does not identify.

I leave the following image of function blocks in my case Screen1.ErrorOcurred, this is the way in which I identified that the connection with the bluetooth device had been lost in the previous version, in this new version of app inventor it no longer works

Hello everyone, after reviewing and performing several tests, I realized that the error was mine, for it to work when receiving bluetooth data, the condition must be greater-equals to zero for it to work, otherwise it will not work, this method It can be applied to know if the bluettoh has been disconnected, attached photo

Without sending data you will not be able to find out, if there still is a connection...
See also