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

Error (0x8): GATT INSUF AUTHORIZATION and Error 8 (0x8) GATT CONN TIMEOUT on some android phones

Hi Team,

In my application I m using NUS and and a custom service.

Everything works fine in redmi note 4(android version 7),Lenova K9(Android version 8) and Samsung Galaxy M30S(Android version 10)

But in Nokia 7.2 and pixel 2 I m getting the following error.

13:30:43.138   Connecting to FE:07:CC:51:09:3F...

13:30:43.138   gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)

13:30:43.350   [Server callback] Connection state changed with status: 0 and new state: CONNECTED (2)

13:30:43.350   [Server] Device with address FE:07:CC:51:09:3F connected

13:30:43.352   [Server] MTU changed to 247

13:30:43.415   [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)

13:30:43.415   Connected to FE:07:CC:51:09:3F

13:30:43.416   [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED

13:30:43.524   Discovering services...

13:30:43.525   gatt.discoverServices()

13:30:48.714   [Server callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)

13:30:48.715   [Server] Device disconnected

13:30:48.802   Connection parameters update failed with status 8 (interval: 45.0ms, latency: 0, timeout: 5000ms)

13:30:48.803   Error 8 (0x8): GATT INSUF AUTHORIZATION

13:30:48.803   [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED

13:30:48.803   [Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)

13:30:48.803   Error 8 (0x8): GATT CONN TIMEOUT

13:30:48.803   Disconnected

Softdevice verison : s140

nRF sdk version : 15.2.0

I tried changing min and max connection timeout

Please guide me on resolving thos

Parents Reply Children
  • Hi,

    You need one of the supported boards to use the nRF sniffer. The nRF52840 Dongle is the cheapest alternative in case you don't already have one of these boards laying around.

  • Hi berg,

    I don't have this board.

    Is there anything else that I could try to resolve this as it occurs only on few phones?

  • Hi,

    It's difficult to say what the problem might be without a sniffer trace, but as a test, you may try to change the LF clock source to see if that helps (in case there is too much clock drift on either side of the link).

    Config settings to test with 32.768 kHz synthesized from HFCLK (LFSYNT):

    // <h> Clock - SoftDevice clock configuration
    
    //==========================================================
    // <o> NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
     
    // <0=> NRF_CLOCK_LF_SRC_RC 
    // <1=> NRF_CLOCK_LF_SRC_XTAL 
    // <2=> NRF_CLOCK_LF_SRC_SYNTH 
    
    #ifndef NRF_SDH_CLOCK_LF_SRC
    #define NRF_SDH_CLOCK_LF_SRC 2
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
    #ifndef NRF_SDH_CLOCK_LF_RC_CTIV
    #define NRF_SDH_CLOCK_LF_RC_CTIV 0
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
    // <i> How often (in number of calibration intervals) the RC oscillator shall be calibrated
    // <i>  if the temperature has not changed.
    
    #ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 0
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
     
    // <0=> NRF_CLOCK_LF_ACCURACY_250_PPM 
    // <1=> NRF_CLOCK_LF_ACCURACY_500_PPM 
    // <2=> NRF_CLOCK_LF_ACCURACY_150_PPM 
    // <3=> NRF_CLOCK_LF_ACCURACY_100_PPM 
    // <4=> NRF_CLOCK_LF_ACCURACY_75_PPM 
    // <5=> NRF_CLOCK_LF_ACCURACY_50_PPM 
    // <6=> NRF_CLOCK_LF_ACCURACY_30_PPM 
    // <7=> NRF_CLOCK_LF_ACCURACY_20_PPM 
    // <8=> NRF_CLOCK_LF_ACCURACY_10_PPM 
    // <9=> NRF_CLOCK_LF_ACCURACY_5_PPM 
    // <10=> NRF_CLOCK_LF_ACCURACY_2_PPM 
    // <11=> NRF_CLOCK_LF_ACCURACY_1_PPM 
    
    #ifndef NRF_SDH_CLOCK_LF_ACCURACY
    #define NRF_SDH_CLOCK_LF_ACCURACY 1
    #endif

  • I tried the given configuration and the issue remains same.

    One point to be noted is that the issue came only after adding the custom service

  • john.ashok said:
    One point to be noted is that the issue came only after adding the custom service

    Interesting obseravation. It sounds like it may not be HW related then. Are you able to debug the FW and see if the program ends up in the app error handler (Error module)?

Related