My workaround
I scan BLE for a short period of time 3-4 seconds then I turn scan OFF for 3-4 seconds. Then ON again.
- Obviously I always turn BLE scan OFF when I'm connecting to a BLE device.
- When I disconnect from a device I restart BLE (turn adapter OFF and then ON) to reset the stack before starting scan again.
- I also reset BLE when discovering
services
orcharacteristics
fails. - When I get advertisement data from a device that the app should connect to (lets say 500 times without being able to connect - thats about 5-10 seconds of advertising) I reset BLE again.