There is a microbit board written by the application in the Mit app! , when trying to connect, it gives an error, - Service (service number), the characteristic is not published by the connected device. Tell me what to do? I enclose the code in the attachment.
If you loaded an alternative sketch on your micro:bit, such as one developed using Microsoft MakeCode, then you will probably want to reset to the default sketch from the micro:bit website.
If you're installed a custom sketch with the intention of using our extensions, then you may need to turn your bluetooth off and on again so that it forgets any cached information about its connection to the micro:bit.
Make sure in your custom sketch that you enable the appropriate BLE service for the part of the extension you intend to use.
Could you please post your .aia here and if you have a .hex file made with MakeCode, that one also.
What did you specify for pairing? Could be: no pairing required, Just works, or Passkey pairing.
I can maybe try it out then.
Cheers, Ghica.
Many thanks for the help, I attach aia to the message.
The hex function does not require a connection, connect to any available device. And included bluetooth input pin io pinBLE_microbit.aia (759.6 KB)
Hi Klim,
Thanks. It is hard for me to try your app without a .hex file for the micro:bit.
Anyway, looking at your .aia I found that you are using outdated versions of the BLE and the micro:bit extensions. It may help to replace them with newer ones at http://iot.appinventor.mit.edu/
Cheers, Ghica.
It should work with the out-of-the-box Micro:bit code. Once you start changing the code by using MakeCode, then you'll need to potentially reset your Bluetooth connection for it to work. Service and characteristics are cached by Android so that it doesn't have to query them again on future connections, but if you've changed the code on the device naturally it might have different services/characteristics than before. Usually turning the Bluetooth off and back on again is sufficient to achieve this. I would recommend starting with the stock hex code for the micro:bit and our micro:bit tutorial to make sure that all works first and then you can start customizing the micro:bit code from there.
I gave it to you above. You need a hex file on your micro:bit that you can make using MakeCode as described above. Then, on your phone you can create the app as described above also.
Or, if your micro:bit is still unchanged, out of the box, you can use the same app. The tutorial is already given to you twice. see above.
What do you want to do with the micro:bit when you have connected it to the phone?
Hi I have just encountered the same problem as mentioned. Would it be alright for you guys to help me spot the errors in my code as I am quite new to this. Thank you.