IanHarvey / bluepy

Python interface to Bluetooth LE on Linux
Other
1.6k stars 491 forks source link

BTLEInternalError: Address type changed during scan #425

Open OlegHahm opened 3 years ago

OlegHahm commented 3 years ago

We frequently observe this exception during a BLE scan. The exception is thrown in https://github.com/IanHarvey/bluepy/blob/master/bluepy/btle.py#L720. I fail to see why this happens, i.e., why a device would change its GAP address type from public to private or via versa. It seems to happen to a bunch of different devices, not just one type. However, I wonder if it is really necessary to raise an exception here and hence stop scanning instead of just log the error, update (or remove) the scan entry, and continue scanning. Any thoughts welcome.

Matsoosterlaken commented 1 year ago

We are also seeing this every once in a while and had to restart the scan after the exception. Would be nice if it would keep scanning and log the error, I agree.