Closed itslenny closed 2 days ago
Here is the docs about scan failed with status 2.
You can try to reopen the BLE or restart the phone to see if this can be resolved.
And here is some discussions about this on StackOverflow.
Another discussion that maybe help.
Thanks for the info @yanshouwang
Since I had a consistent repro I tried everything I could to fix it programmatically to see if maybe I could provide a fix for this state, but nothing worked.
In the end the only way to fix this issue (for me) was to restart the phone, and then everything worked fine. Seems to be a bug with Android, and as far as I can tell the only real option is to tell the user to restart their phone if they get in this state.
Hi, I'm just getting started with this library. To try it out I cloned this repository and launched the example app.
On Android the "Central" mode throws an IllegalStateException when I click "begin"
Clicking begin on "Peripheral" mode seems to work as expected (or at least doesn't throw an error)
I also ran it on on MacOS everything seems to run as expected there.
I'm going to try digging into this more on my end, but hoped maybe you'd have some more insight.
The following is the stack dump. Above is some logs I added in just to see the state through authorization and start discovery.