App Inventor, Micro:bit and UART

image

¿Qué significan estos dos bloques?

Is Bluetooth on your phone turned on??

Those two blocks have the UUID's for UART. Everything using BLE needs a UUID, or a Univerally Unique ID. Do not worry about it. They are used in the next part.

Hello, I have tried with BTReadWrite.aia and microbit-UART-RW.hex using a USB cable but the App cant see the micro:bit (Scan doesnt show anything).
The phone (the Android bluetooth manager) can see it and even pair but if I try to send text it tells me to connect, and connect gives an error.

What did you do or see next?

Yes.

Yes. I also use a v2.

I see the scan button; I press it and it says scanning but nothing more happens.

Also I can find the micro:bit with the "normal" bluethooth connection; I can connect to it and the smiley face apears. But not with the AppInventor.

Are you using the companion to run your app?
What should happen when you press Scan, is that you get a list with devices near your telephone, and one of those should be your micro:bit (it should have power, either via usb or via a battery pack.
If you do not see that, I can think of two reasons: either Bluetooth is not on on your phone, or you did not load the app into the companion but you are using an emulator on the PC, this does not work with bluetooth.

Yes.
I also tried installing the app and the result is the same.
The Bluetooth on my phone is on (It can see the micro:bit and connect just not with App Inventor).

The question was, if you press scan, do you see a black list with BT devices near your phone, which should also show your micro:bit on the list.?

No, It doesnt show anything on the list.
But I have tested with another phone and it works :smiley:
So the problem is with my samsung phone. with a cheapo alcatel I can connect and send messages.

1 Like

If you have a phone with a really recent Android system, that may be the problem. Somehow the app does not have the right permissions then. There are ways to solve it, but I have a rather old phone myself. Maybe someone else knows how to do that.

I think I got it. After I turn on location (GPS) everything works :smiley:
Thank you for the great tutorial!

Great! Thank you.

Hi Ghica,
I have followed the steps as you mentioned above but my app is crashing. My Microbit version is 1.5
and I'm using "BTReadWrite.aia" which you have given above. Is there any way to solve the problem can you help me with this?

Hi Augustin, what exactly are the symptoms of your crashing app?
And I am wondering about the version 1.5 of your micro:bit. I thought they were either v1 or v2, but maybe not.
If possible at all, try to buy or borrow a micro:bit v2.

I also have a app crashing problem after i pressed the connect button. The microbit does connect with the app yet it crashed right after connection made or right after the button pressed. Yet, no matter the app crashed or not the tick sign of microbit will come out after a while.

If you would like further help, you will need to give more information, like:
What is your app trying to do?
Which version of the micro:bit do you have?
Which versions of the BLE and micro:bit extensions are you using?
Maybe attach a .hex and a .aia file.

Oh, I'm a newbie of this sector. It worked. Just some program pre-installed inside my microbit overlapped the new one. haha thankssss.

..... that phone has the most recent Google security measures, so along with Bluetooth being switched on, Location should also be switched on.

3 posts were merged into an existing topic: Android permissions - BLE - Android 12