Overview

This article explains what a GATT error is when attempting to use Bluetooth (BLE) with the micro:bit app on an iOS or Android device, and provides guidance on how to troubleshoot a GATT error. 


How a GATT error is generated

When using the micro:bit with the mobile apps, it is unusual, but not impossible to see a GATT error when attempting to pair or flash a program to the device.


The Generic Attribute Profile (GATT) defines the way two Bluetooth devices (a central and peripheral) exchange data, for example, a micro:bit and a mobile phone.


The mobile device or tablet (known as the central device), will search to see if the micro:bit (known as a peripheral device) is advertising a service that allows the mobile device or tablet to connect to it. The connection between the central device and the peripheral is exclusive. If the connection cannot be established or if the service is not found, it will result in a GATT error.



Troubleshooting a GATT error

A peripheral can only be connected to one (central) device at a time.


The following screenshot shows an example of a generic 'GATT ERROR'. If selecting OK does not resolve the situation then please refer to the following troubleshooting steps. 



  • Check power for the micro:bit and the mobile or tablet device; is the battery low?
  • Close the app, disconnect and reconnect the battery pack from the micro:bit. Restart the app and follow the prompts to enter Bluetooth mode. The micro:bit should always be in Bluetooth mode before attempting to connect (pair) your device (iPhone, iPad, or Android device), either using the 'pressing the reset button 3 times' method or 'while holding the A + B buttons, press the reset button, then releasing the A + B buttons' method. Either method should result in the Bluetooth symbol appearing on the micro:bit display.
  • You may need to 'forget' the micro:bit in the Bluetooth settings on your mobile or tablet device before attempting to enter Bluetooth mode.
  • You may need repeat the above step and then switch off the Bluetooth service on your device, restart your device and then switch the Bluetooth service back on.
  • You may need to use a computer to send a hex file to the micro:bit via a USB cable connection using the micro:bit hex download tool. The recommended hex file to use is the 'meet the micro:bit' program, as it resets the micro:bit.


If you see a GATT error and none of the above steps helps to rectify the issue, please submit a support ticket.

If you are comfortable using GitHub, you can check all the current issues reported for the micro:bit Android app at https://github.com/microbit-foundation/microbit-android/issues.


Further information


There is an excellent introduction to GATT on the Adafruit website.

A list of possible GATT errors can be found in the Android App repository on GitHub.

More information about Apple's Core Bluetooth errors returned while using Attribute Protocol (ATT).