Working around BLE.connect(deviceAddress) is a blocking call

I would say anything that starts with BLE.

In one project I got in trouble, I have a worker thread that does all BLE scan, connection, etc. When I simply call from loop():

BLE.peerCentral().connected();

it may cause havoc, and this on DeviceOS 5.9.
So beware, for now things are sensitive around BLE.
PS: Particle is working on a solution to this, coming up in next DeviceOS potentially.

Easier and safer!

2 Likes