In general, there is not one standard UART profile for BLE in the same way as there was for Bluetooth Classic. However, the micro:bit does include a Bluetooth UART service that is compatible with the Nordic UART service.


There i also documentation on using this with JavaScript Blocks Editor, powered by Microsoft MakeCode.


Getting Started

  1. Visit https://makecode.microbit.org/ and create a new project.
  2. Add the Bluetooth package by expanding the Advanced header in the list of block categories and then choosing Add Package
  3. Select Bluetooth and accept that the Radio package will be removed

    4.You can now add the UART service from within the Bluetooth blocks


Example

Here is an example program that uses the uart.


On your phone, you must observe the following points

  1. Every time you update the micro:bit software over USB, you must re-pair your device
  2. The UART apps will typically only work once you have paired your micro:bit and also connected to it.


This example program can be used with any UART app that follows the Nordic UART protocol, but the example above was tested on Android with Serial Bluetooth Terminal (a video is attached to this article). If you have had success with a different app, please let us know using the 'Feedback on this article" feature so we can include it here.


Keywords for search: serial over Bluetooth, Nordic,UART over BLE