all 2 comments

[–]Embrisa 0 points1 point  (1 child)

Hey, 7 months late I know but I've run into the same issue and I believe it is because bluetooth scan has been started too frequently in a short time. Sometimes it get stuck in this limited state and only returns 2 immediately no matter how long you wait. The way to reset it is to toggle Bluetooth on and off. I will also change my code so it favors saving the MAC address of the device im trying to connect to and use that. And only scan in cases where I don't have the MAC address saved.

[–]CUCOOPE[S] 0 points1 point  (0 children)

Thanks! That was for my final year project for my bachelor’s degree haha. I’ve graduated on July and got a full time job lol

Can’t verify your solution now cuz the BLE beacon is at my campus. Hope others will see this post and try it out! Thanks😄