BluetoothLE Extension ScanForService is not setting the Scanning flag to true

Hi all, it's been a good while since I last popped onto the community channel.

I just an anomaly with the BLE extension that I wanted to check.

I am using BLE Extension Version: 20200828 / Date Built: 2020-08-28

If I use the BluetoothLE. StartScanning method the BluetoothLE.Scanning flag will be correctly set to true.

However, I found that if I use the BluetoothLE. ScanForService method this flag is (incorrectly) not set to true.

Thanks.

I see a more recent version of the BLE extension at

Actually the bug is more subtle than that. I reviewed the code and it looks like isScanning is set to true on the first scan result. So the only reason it "works" in StartScanning is because it finds a device before you check a flag whereas in the ScanForService method it doesn't. If you put your phone inside of a faraday cage and tried again you'd get the same result where isScanning is false. I'll need to think about how we can improve the logic there.

1 Like

@ABG thanks for the link to the updated version. Problem still exists.

@ewpatton thanks for the response. Aha, so it's also deviceList related. In that case I can try and do my own workaround by checking to see if deviceList is empty or if not and scanning is true etc.

1 Like