This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Android - Error 133 (0x85): GATT ERROR - only after returning from Flight mode

Hi,

I can not connect to nRF52833 and nRF51 after I return from Flight mode on Android devices. I am keep getting Error 133 (0x85): GATT ERROR.

I am using the nRF Connect app (from Google Play - https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp&hl=en) to connect to nRF52833 (https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52833-DK) running the Blinky firmware (https://github.com/NordicSemiconductor/Android-nRF-Blinky/tree/master/Firmwares/nRF52_SDK14.2). 

The connection works fine, until I turn off Bluetooth and Location, then turn on Flight mode. I wait around 5 minute, then turn off Flight mode, turn on Bluetooth and Location. The App will see the board in the device list, but when I click to connect, it will return return Error 133. Turning on/off Bluetooth does not throw any error and the App establishes connection as intended.

I have tested on devices running Android 10 (Samsung S10, Huawei P30) and Android 9 (Huawei P10).

I have also tested the connection with the Blinky sample app (https://github.com/NordicSemiconductor/Android-nRF-Blinky ). I tested the sample app using it using v2.1.1 of Android-BLE-Library (https://github.com/NordicSemiconductor/Android-BLE-Library ) and v2.2.0.

I have also tested on the nRF51 development board (https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF51-DK ) running the Blinky firmware (https://github.com/NordicSemiconductor/Android-nRF-Blinky/tree/master/Firmwares/nRF51_SDK11.0.0 )

Parents
  • Hi,

    Not sure if the example you shared uses bonding or not as I can't find the source code, but if it does you might need to delete the bonding on both sides. Are you experiencing the same issue if you use the blinky example from the SDK?

    regards

    Jared

  • No, it does not uses bonding, and yes, as I mentioned above, I am experiencing the same issue if I use the Blinky example (https://github.com/NordicSemiconductor/Android-nRF-Blinky). I have tried with the original source code, and I have also updated the BLE Library to v.2.2.0 and tried as well. Same result always. 

  • Hi,

    GATT ERROR 133 is a generic error that can happen due to different reasons such as packet collision, timeout or if a packet that was expected isn't received. Could you provide a sniffer log of the error?

    I have tested on devices running Android 10 (Samsung S10, Huawei P30) and Android 9 (Huawei P10).

     And you were able to reproduce this on those phones?


  • Yes, I can reproduce the behaviour on the devices I have mentioned previously, as well as on others, such as Nokia, Google Pixel. It is not device specific error. 

    Below I attached the log file provided by nRF Connect App and a screenshot of the Logcat of the nRF Blinky App. I was trying to connect to nRF52833 running the Blinky firmware. 


    nRF Connect, 2020-04-18
    Nordic_Blinky (C7:E4:A6:B5:9A:61)
    V	16:14:38.743	Connecting to C7:E4:A6:B5:9A:61...
    D	16:14:38.745	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D	16:14:39.049	[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    D	16:14:39.080	[Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I	16:14:39.080	Connected to C7:E4:A6:B5:9A:61
    V	16:14:39.105	Discovering services...
    D	16:14:39.105	gatt.discoverServices()
    I	16:14:39.482	Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    D	16:14:39.612	[Callback] Services discovered with status: 0
    I	16:14:39.612	Services discovered
    V	16:14:39.636	Generic Access (0x1800)
    - Device Name [R W] (0x2A00)
    - Appearance [R] (0x2A01)
    - Peripheral Preferred Connection Parameters [R] (0x2A04)
    - Central Address Resolution [R] (0x2AA6)
    Generic Attribute (0x1801)
    Nordic LED Button Service (00001523-1212-efde-1523-785feabcd123)
    - Button [N R] (00001524-1212-efde-1523-785feabcd123)
       Client Characteristic Configuration (0x2902)
    - LED [R W] (00001525-1212-efde-1523-785feabcd123)
    D	16:14:39.636	gatt.setCharacteristicNotification(00001524-1212-efde-1523-785feabcd123, true)
    I	16:14:39.692	Connection parameters updated (interval: 48.75ms, latency: 0, timeout: 5000ms)
    I	16:14:59.192	Connection parameters updated (interval: 198.75ms, latency: 0, timeout: 4000ms)
    D	16:15:33.408	[Broadcast] Action received: android.bluetooth.adapter.action.STATE_CHANGED, state changed to TURNING OFF
    I	16:15:33.408	Disconnected
    D	16:15:33.440	gatt.close()
    D	16:15:33.482	wait(200)
    D	16:15:33.873	[Broadcast] Action received: android.bluetooth.adapter.action.STATE_CHANGED, state changed to OFF
    D	16:20:12.429	[Broadcast] Action received: android.bluetooth.adapter.action.STATE_CHANGED, state changed to TURNING ON
    D	16:20:13.265	[Broadcast] Action received: android.bluetooth.adapter.action.STATE_CHANGED, state changed to ON
    V	16:20:20.323	Connecting to C7:E4:A6:B5:9A:61...
    D	16:20:20.323	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D	16:20:25.342	[Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0)
    E	16:20:25.342	Error 133 (0x85): GATT ERROR
    I	16:20:25.342	Disconnected
    D	16:20:34.329	gatt.close()
    D	16:20:34.338	wait(200)
    V	16:20:34.541	Connecting to C7:E4:A6:B5:9A:61...
    D	16:20:34.541	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D	16:20:39.562	[Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0)
    E	16:20:39.562	Error 133 (0x85): GATT ERROR
    I	16:20:39.562	Disconnected
    


Reply

  • Yes, I can reproduce the behaviour on the devices I have mentioned previously, as well as on others, such as Nokia, Google Pixel. It is not device specific error. 

    Below I attached the log file provided by nRF Connect App and a screenshot of the Logcat of the nRF Blinky App. I was trying to connect to nRF52833 running the Blinky firmware. 


    nRF Connect, 2020-04-18
    Nordic_Blinky (C7:E4:A6:B5:9A:61)
    V	16:14:38.743	Connecting to C7:E4:A6:B5:9A:61...
    D	16:14:38.745	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D	16:14:39.049	[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    D	16:14:39.080	[Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I	16:14:39.080	Connected to C7:E4:A6:B5:9A:61
    V	16:14:39.105	Discovering services...
    D	16:14:39.105	gatt.discoverServices()
    I	16:14:39.482	Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    D	16:14:39.612	[Callback] Services discovered with status: 0
    I	16:14:39.612	Services discovered
    V	16:14:39.636	Generic Access (0x1800)
    - Device Name [R W] (0x2A00)
    - Appearance [R] (0x2A01)
    - Peripheral Preferred Connection Parameters [R] (0x2A04)
    - Central Address Resolution [R] (0x2AA6)
    Generic Attribute (0x1801)
    Nordic LED Button Service (00001523-1212-efde-1523-785feabcd123)
    - Button [N R] (00001524-1212-efde-1523-785feabcd123)
       Client Characteristic Configuration (0x2902)
    - LED [R W] (00001525-1212-efde-1523-785feabcd123)
    D	16:14:39.636	gatt.setCharacteristicNotification(00001524-1212-efde-1523-785feabcd123, true)
    I	16:14:39.692	Connection parameters updated (interval: 48.75ms, latency: 0, timeout: 5000ms)
    I	16:14:59.192	Connection parameters updated (interval: 198.75ms, latency: 0, timeout: 4000ms)
    D	16:15:33.408	[Broadcast] Action received: android.bluetooth.adapter.action.STATE_CHANGED, state changed to TURNING OFF
    I	16:15:33.408	Disconnected
    D	16:15:33.440	gatt.close()
    D	16:15:33.482	wait(200)
    D	16:15:33.873	[Broadcast] Action received: android.bluetooth.adapter.action.STATE_CHANGED, state changed to OFF
    D	16:20:12.429	[Broadcast] Action received: android.bluetooth.adapter.action.STATE_CHANGED, state changed to TURNING ON
    D	16:20:13.265	[Broadcast] Action received: android.bluetooth.adapter.action.STATE_CHANGED, state changed to ON
    V	16:20:20.323	Connecting to C7:E4:A6:B5:9A:61...
    D	16:20:20.323	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D	16:20:25.342	[Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0)
    E	16:20:25.342	Error 133 (0x85): GATT ERROR
    I	16:20:25.342	Disconnected
    D	16:20:34.329	gatt.close()
    D	16:20:34.338	wait(200)
    V	16:20:34.541	Connecting to C7:E4:A6:B5:9A:61...
    D	16:20:34.541	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D	16:20:39.562	[Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0)
    E	16:20:39.562	Error 133 (0x85): GATT ERROR
    I	16:20:39.562	Disconnected
    


Children
Related