micro:bit UART bluetooth extension

941 views
Skip to first unread message
Assigned to nis...@cavedu.com by farzeen....@gmail.com

Laurent T

unread,
Nov 3, 2017, 8:17:12 AM11/3/17
to MIT App Inventor Forum

i all,

I have trouble trying to use the app inventor microbit extension.
In fact I can send data through UART on BLE but I have never managed to receive data on the smartphone. 
Here are the codes


And the microbit program:

On that example, I choose to trigger the UART data sending "on shake" but I got the same result with other wayas of triggering (on button pressed, ....)


Thanks a lot for your help


Evan Patton

unread,
Nov 3, 2017, 12:32:23 PM11/3/17
to MIT App Inventor Forum
Hi Laurent,

It looks like you are not calling the Microbit_Uart1.RequestTXCharacteristic. You will want to call it in your BluetoothLE1.Connected event handler, otherwise the device won't know to listen for messages sent from the micro:bit.

Cheers,
Evan

Laurent T

unread,
Nov 3, 2017, 12:50:00 PM11/3/17
to MIT App Inventor Forum
Right you are.

Thanks for your input !

I updated my program (see below ) with the call you suggested. 
But it still does not work.
Here is the new code.
Have a nice week end



Evan Patton

unread,
Nov 3, 2017, 2:07:03 PM11/3/17
to MIT App Inventor Forum
Interesting. Everything looks like it should be working based on the blocks. I will test this out and get back to you.

Evan

Laurent T

unread,
Nov 9, 2017, 8:20:42 AM11/9/17
to MIT App Inventor Forum
Hi Evan,

I am going to turn into a pessimistic guy.
The micro:bit gets all information from the smartphone (app inventor) but the smartphone gets nothing from the device. 
Whether I  try to send strings, values, or bytes, nothing is received by the smartphone
Are you sure that the (app inventor)  functions related to the micro:bit extension work fine ? 
I am stuck . I have just bought a new microbits in case but I cannot believe that it will make some difference
Please find attached the last "blocks"



Laurent

Evan Patton

unread,
Nov 9, 2017, 8:44:47 AM11/9/17
to MIT App Inventor Forum
Hi Laurent,

We'll have a look at this and try to understand what is going on. We are in the process of writing some new tutorials for BBC micro:bit, including the UART, and I hope that we can get this figured out for you soon.

Regards,
Evan

Farzeen Harunani

unread,
Nov 9, 2017, 10:07:46 AM11/9/17
to MIT App Inventor Forum
Hey Laurent, 
We're doing some testing right now, so any information you can pass along about what does/doesn't work in your experience is appreciated. Also, you're definitely using the latest versions of the extensions? Do other micro:bit functions work? 
Thanks,
Farzeen

Laurent T

unread,
Nov 10, 2017, 7:16:15 AM11/10/17
to MIT App Inventor Forum
Hi Farzeen and Mark,

In reply to your messages, it still does not work  properly. The micro:bit gets all information from the smartphone (app inventor) but the smartphone gets nothing from the device. 
Whether I  try to send strings, values, bytes, nothing is received by the smartphone
Are you sure that the (app inventor) reception related  functions work properly ? Please find attached the last "blocks" I built (use of microbits UART service) 

I have also tested the temperature service that works wonders. These are only services I have implemented


fyi, I have just bought a new microbits in case but I cannot believe that it will make some difference


Thanks again for your effort. I really do appreciate


Laurent
blocks (2).png

Evan Patton

unread,
Nov 13, 2017, 6:59:40 PM11/13/17
to MIT App Inventor Forum
Hi Laurent,

We think we have a working demo that we will need to test further tomorrow. If that works as expected, we will share that with you. Longer term we are going to work on a redesign of the I/O pin component so that it is an abstraction beyond exposing the raw BLE characteristics.

Regards,
Evan
Reply all
Reply to author
Forward
0 new messages