Android permissions - BLE - Android 12

Hi Phil,

It was quite a while ago but I believe it would have been Android 11 and subsequently Android 12. I don't think I had to allow for location before running the app though.

Cheers, Peter

On Android 12+.

1 Like

Yes, but you only need to reload the screen.

Hello Anke,
I am trying to connect microbit to mobile phone (Android ver 12).
I have created microbit app and mit app inventor mobile app.
But unable to establish BT connectivity.
My microbit device is listed in the mobile app but while trying to connect Error 507: Unable to connect id displayed.
I can share my both applications if you wish to see them.

Please help me. My son have to submit his application for a competition.

If you really want help, post an .aia which shows the error.
I have enough micro:bits but only Android 11, so I am not sure I can recreate the problem.
Can you also post the .hex file you have on your micro:bit? You need to have the permissions there set right too.

Hi Ghica,
PFA hex and aia files for your reference.

aia (MIT App Inventor is courtesy from Anke) but I've modified it a little to display message received from microbit in a label.

I am not getting any connectivity error displayed but the message from microbit is not displayed in the label.

BLE_permissions_allAndroidVersions (2).aia (192.2 KB)
microbit-BTConn.hex (1.3 MB)

I tried using your app using ai2 too and mine with some tweaking to make it similar to yours and yet it isn't working. All permissions were also granted using my phone as well.

Please help

@Sudarshan_Gupta ever heard of debugging? Did you get a message that the micro:bit is connected? (Put in a notifier for example). Did the block that gets activated when text is received really get activated? On the micro:bit side, did it get a connection message? If yes, did it get a uart message?
I may not have time to look at your apps today, but there is so much that you can do yourself, like pinpointing where things go wrong.

What are the symptoms of “it is not working”?

I am very confused. You still never actually connect to your micro:bit AND you are trying to get text from the micro:bit using classic BT???
At least you also need a micro:bit extension to use UART, take the one I posted in the tutorial.
Then, in the micro:bit display a happy face upon connect, so that you know the connection succeeded.
Once you have achieved that, you can consider sending messages with UART.

The topic is about "Android permissions - BLE - Android 12", isn't it?

Maybe, but @Sudarshan_Gupta is still complaining about his label not being displayed. So, does he still have a problem with permissions? The communication with the micro:bit will not work even if the permissions are ok.

I can't check it because I have none of them.

@Ghica as in my microbit, I try to show Smiley led pattern if BT is connected, which is successful. The microbit and mobile gets paired and connected successfully.
I've done a lot of debugging as a software developer, but I am totally new to using microbit and mit app, so not sure how to debug the blocks and check whether they are getting activated or not.

If you can tell me how to debug microbit and mit app block, surely I will check that and post all the updates ASAP.

Which is not in the drop-down 'all categories' list........

Download the latest MIT BLE Extension: Version: 20230223-BETA Released: 23-02-2023 Package Name: edu.mit.appinventor.ble-20230223-beta.aix

Anyone having a problem with the latest BLE extension (edu.mit.appinventor.ble-20230223-beta) should post a screenshot of this APK:

Try this one and post a screenshot after the first run & after pressing "Start Scanning":

https://drive.google.com/file/d/1uGg-t4S1Nq7QzzA7iVDnOu39EFkK6als/view?usp=sharing

And again: The Location sensor must be enabled in the device settings!


We'd like to know which Android version and device you might be having an issue with.

1 Like