I've written an app that scans for bluetooth smart devices, you can pick one from a list, connect to it and exchange some data. All went fine until Android 6.0.
First, i fixed the new permission system so the app requests the location permission at runtime to be able to scan for devices. With that the app worked like it used to, but after turning bluetooth off and back on again the app won't connect anymore but always returns disconnected state with status code 133 in the gatt callback.
I then tried several things:
- rebooted the device
- re-installed the app
- turn off wifi, enable / disable flight mode
- checked with NRF master control panel, same issue with same statuscode
This all didn't solve the problem. The only way i was able to get it working again was the option "Network Settings Reset" from the menu "Backup & reset". Both development phones available here (Moto G3 and Samsung S6) feature this option, haven't seen it before Android 6.0.
My question is: are there others experiencing this problem and is there a fix or workaround for this? This could cause a lot of troubles, it so common to turn off /on bluetooth and the problem also appears after been in flight-mode.