BLE scan not stable?

Hello,

The scan method for ble is not stable. I use the last version 20200828.
The scan method does not always give the same list and in addition we sometimes have duplicates. There are obviously problems with the scan method and the connect method which does not work either. Thank you for your help.
Your sincerely.
Julien

You should consider pausing the scan before calling connect, especially if you are relying on using the index. We can look into improving how the results are reported but ultimately the frequency at which devices appear in the list will rely on the underlying hardware in the phone and how frequently your BLE devices is sending out advertising broadcasts.

Hello,

However, I put a scan button, then another to connect, which gives time between the list and the connection to a BLE target. Tried everything, connect with index, connect with MAC address, connect with name and UUID, but nothing to do, nothing works.
Could you give me an example with the last method to connect with name and device (connectToDeviceType)? I do not see at all what to put for device.

Again what I don't understand is that the same Android 10 phone, NRFconnect works without any issues with my target BLE. There are obviously big concerns with the BLE extension for Appinventor. Thanks for your help and for doing something.

I also always get an OS code 133 error when trying to connect to a BLE target that works fine with NRFconnect. Therefore cannot use BLE with Appinventor.

In short, there are obviously big concerns with the latest BLE extension which does not seem to work at all.
Thanks for your quick help. Good luck.

Hello,
There is another post here to say, that ble is doesn't run with micropython ESP32

Thanks to help

There are plenty of examples on this forum of using the BLE extension with the ESP32 and other ESP devices. You may want to look at those examples or at the BLE entry in the FAQ.

A post was split to a new topic: Ble connection status was set to os code 133

Hi
I have tried all of them I found. With Light blue it connects, so the hardware is ok.
So there is a problem with your driver. And I am not the only one that has problem I see

a teacher gave me this. and it works:
https://www.professorcad.co.uk/Bluetooth/BLE-device-sort.aix

try this:
https://www.professorcad.co.uk/Bluetooth/BLE-device-sort.aix
it has solved my problem. Just update the ble lib