Free tool
Android GATT status codes, and what to check first
Your app got a status in onConnectionStateChange or an operation callback. Type it in: the table shows what it means on Android and the first thing I'd check.
Short answer
What do Android BLE status codes 8, 19, 22 and 133 mean?
On Android, status 8 means the link timed out (the device went out of range or stopped answering), 19 means the device ended the connection, 22 means the phone's own Bluetooth stack ended it, and 133 is a generic GATT_ERROR for a connection that failed without a more specific reason.
- 8
- GATT_CONN_TIMEOUT
- 19
- Device disconnected
- 22
- Phone stack disconnected
- 133
- Generic GATT_ERROR
Tool
GATT status code lookup27 codes
| Dec | Hex | Name | Meaning | Check first |
|---|---|---|---|---|
| 0 | 0x00 | GATT_SUCCESSany | Success. With STATE_DISCONNECTED it usually means your app asked for the disconnect. | Nothing, unless you didn't call disconnect(): then look for code that does. |
| 1 | 0x01 | GATT_INVALID_HANDLEoperation | The attribute handle doesn't exist on the device. | Stale GATT cache after a firmware update: rediscover services, or have the device send Service Changed. |
| 2 | 0x02 | GATT_READ_NOT_PERMITTEDoperation | The characteristic can't be read. | Check its properties in the GATT table; you may need notifications instead. |
| 3 | 0x03 | GATT_WRITE_NOT_PERMITTEDoperation | The characteristic can't be written, or not with this write type. | Compare WRITE vs WRITE_NO_RESPONSE in the characteristic's properties. |
| 5 | 0x05 | GATT_INSUFFICIENT_AUTHENTICATIONoperation | The device wants an authenticated (paired) link for this attribute. | Bond first, or let Android start pairing; wait for BOND_BONDED before retrying. |
| 6 | 0x06 | GATT_REQUEST_NOT_SUPPORTEDoperation | The device doesn't support this request. | Check the firmware handles the operation (e.g. long writes, reliable writes). |
| 7 | 0x07 | GATT_INVALID_OFFSEToperation | A read or prepared write used an offset past the end of the value. | Long reads/writes and their offsets; usually a protocol or firmware bug. |
| 8 | 0x08 | GATT_CONN_TIMEOUTconnection | The link was lost: no packets within the supervision timeout. Out of range, device reset, interference. (In an operation callback, 8 is GATT_INSUFFICIENT_AUTHORIZATION.) | Range and RSSI before the drop, device resets, supervision timeout vs connection interval. Reconnect with autoConnect = true. |
| 13 | 0x0D | GATT_INVALID_ATTRIBUTE_LENGTHoperation | The value written is longer than the attribute allows. | Payload size vs MTU − 3, and the firmware's max length for that characteristic. |
| 15 | 0x0F | GATT_INSUFFICIENT_ENCRYPTIONoperation | The attribute needs an encrypted link. | Bonding and encryption; a stale bond often shows up here. |
| 19 | 0x13 | GATT_CONN_TERMINATE_PEER_USERconnection | The device ended the connection on purpose. | Firmware: idle timeouts, a reboot after OTA, a single-connection limit, or rejecting your app's behavior. |
| 22 | 0x16 | GATT_CONN_TERMINATE_LOCAL_HOSTconnection | The phone's Bluetooth stack ended the link. | Pairing or encryption failures, a stale bond, or the stack closing a link no client is using. |
| 34 | 0x22 | GATT_CONN_LMP_TIMEOUTconnection | The device stopped answering a link-layer procedure (LL response timeout). | Firmware handling of connection-parameter updates, PHY updates or encryption; check with an HCI log. |
| 59 | 0x3B | UNACCEPTABLE_CONN_PARAMSconnection | The connection parameters were rejected. | Connection interval, latency and supervision timeout requested by the device or the app. |
| 61 | 0x3D | CONN_TERMINATED_MIC_FAILUREconnection | Encrypted packets failed their integrity check, so the link was dropped. | Almost always a key mismatch: a stale bond after the device was reset. Remove the bond and pair again. |
| 62 | 0x3E | GATT_CONN_FAIL_ESTABLISHconnection | The connection failed to be established: the device never answered. | Is it advertising and connectable? Range, a busy device, or another phone already connected. |
| 128 | 0x80 | GATT_NO_RESOURCESany | The stack ran out of resources. | Leaked BluetoothGatt clients or too many connections; close what you don't use. |
| 129 | 0x81 | GATT_INTERNAL_ERRORany | An internal error in the Bluetooth stack. | Usually a timing or state problem; serialize operations and retry once. |
| 130 | 0x82 | GATT_WRONG_STATEany | The operation isn't valid in the current state. | An operation sent before discovery finished, or after a disconnect. |
| 132 | 0x84 | GATT_BUSYany | Another operation is still running. | You need a GATT operation queue: one operation at a time, wait for each callback. |
| 133 | 0x85 | GATT_ERRORconnection | Android's generic failure: the connection didn't happen and no more specific code applied. | Time it: under a second points at leaked clients or the stack; ~30 s points at the device. Close every failed BluetoothGatt. |
| 135 | 0x87 | GATT_ILLEGAL_PARAMETERoperation | A parameter in the request was invalid. | Values, lengths and write types passed to the API. |
| 137 | 0x89 | GATT_AUTH_FAILany | Authentication failed during pairing. | Wrong passkey, the user cancelled, or the device and phone disagree on security level. |
| 143 | 0x8F | GATT_CONNECTION_CONGESTEDoperation | The link is congested; slow down. | Wait for onCharacteristicWrite before the next write without response. |
| 147 | 0x93 | GATT_CONNECTION_TIMEOUTconnection | A connection attempt ran out of time (newer stacks). | Treat like 133 after ~30 s: is the device advertising and in range? |
| 201 | 201 | ERROR_GATT_WRITE_REQUEST_BUSYAPI 33+ | BluetoothStatusCodes: a write was rejected because another request is in flight. | Queue your operations; never write before the previous callback arrived. |
| 257 | 0x101 | GATT_FAILUREany | A generic failure. | Log the operation and state around it; often a firmware rejection or stack problem. |
How to read them
Reading Android BLE status codes
Same number, two meanings
Android reports two kinds of status. In onConnectionStateChange, a non-zero status is usually an HCI disconnect reason (8, 19, 22, 62). In operation callbacks such as onCharacteristicWrite it's an ATT or GATT error (5, 15, 132). So 8 means a lost link in one place and insufficient authorization in the other.
Log both the status and the callback it came from.
Codes are a symptom
A status tells you where to look, not what to fix. For connection failures, also log how long the attempt took, the phone model and Android version, and what the app did just before. That's usually enough to tell the causes apart.
Deeper dives: GATT 133 and status 8, 19 and 22.
FAQ
Questions teams ask
All questionsWhy does Android report status 133 instead of a real reason?
133 is GATT_ERROR, the Android stack's catch-all when a connection fails and no more specific code applies. The real cause shows up in the timing, the phone model and the HCI snoop log, not in the status.
What is the difference between status 19 and 22?
Status 19 means the device (the peer) ended the connection on purpose; status 22 means the phone's own Bluetooth stack ended it. 19 sends you to the firmware; 22 sends you to the phone side, often pairing or encryption.
What does status 0x3D mean?
0x3D (61) means the connection was terminated because of a MIC failure: encrypted packets failed their integrity check. It almost always means the phone and the device have different keys, typically a stale bond after the device was reset.
Keep reading
GATT 133 on Android: why BLE connections fail and how to fix them
Android BLE status 133 is a generic GATT_ERROR. The usual causes, how to tell them apart from timing and logs, and Kotlin connect code that fixes most of them.
ArticleAndroid BLE connection drops: what status 8, 19 and 22 mean and how to fix them
Why Android BLE connections drop: what disconnect statuses 8, 19, 22 and 0x3D mean, how to tell them apart, and a reconnect policy that works.
Phone under testBLE sensorRanked findingsBLE reliability audit
A fixed-price audit of your app's Bluetooth layer: failures reproduced on real phones, a report with ranked fixes and a walkthrough call, in a week.
Device works, app doesn't?
Tell me about your device and what's breaking. No pitch deck needed. I'll tell you what I'd look at first, even if it isn't hiring me.
Free · NDA on request · reply within 1–2 working days