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

Error 133 (0x85): GATT ERROR on nRF52840

Hi,

I am running ble_app_blinky example on nRF5280 custom board, it is giving me Error 133 (0x85): GATT ERROR. Since I have nrf52DK, I tried same example with SD 132 on nrf52832 it works as expected.

I went through devzone and there are many questions with similar issues but  couldn't find a solution.

Could you please let me know what could be reason for the same?

https://devzone.nordicsemi.com/f/nordic-q-a/32590/error-133-0x85-gatt-error-with-htc-u11-life

https://devzone.nordicsemi.com/f/nordic-q-a/33313/android-gatt-133-error

SDK 15.2.0

SD 140

nRF52840

Keil

Tried on Honor 7X (Android 8.0.0), Redmi Note 4 (Android 7.0),

nRF Connect, 2019-04-24
Nordic_Blinky (XX:XX:XX:XX:XX:XX)
V 16:07:10.488 Connecting to XX:XX:XX:XX:XX:XX...
D 16:07:10.488 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 16:07:19.253 [Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0)
E 16:07:19.253 Error 133 (0x85): GATT ERROR
I 16:07:19.253 Disconnected
D 16:07:21.850 gatt.close()
D 16:07:21.854 wait(200)
V 16:07:22.056 Connecting to XX:XX:XX:XX:XX:XX...
D 16:07:22.057 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 16:07:52.111 [Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0)
E 16:07:52.111 Error 133 (0x85): GATT ERROR
I 16:07:52.111 Disconnected
D 16:07:54.117 gatt.close()
D 16:07:54.120 wait(200)
V 16:07:54.321 Connecting to XX:XX:XX:XX:XX:XX...
D 16:07:54.322 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 16:08:09.849 [Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0)
E 16:08:09.850 Error 133 (0x85): GATT ERROR
I 16:08:09.850 Disconnected
D 16:08:14.775 gatt.close()
D 16:08:14.779 wait(200)
V 16:08:14.982 Connecting to XX:XX:XX:XX:XX:XX...
D 16:08:14.982 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 16:08:15.541 [Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0)
E 16:08:15.541 Error 133 (0x85): GATT ERROR
I 16:08:15.541 Disconnected

00> <info> app: Template example started.
00> <info> app: Fast advertising.
00> <info> app: Connected.
00> <info> app: Fast advertising.
00> <info> app: Disconnected.

Parents
  • Hi Ali

    I see that the BL654 uses the nRF52840 chip, and not the nRF52832 which the example you referred to and the nRF52DK uses. Please make sure that you use PCA10056 and s140 when developing. The BL654 does not ship with the external RC oscillator, so you have to configure the chip to use the internal RC instead. You can configure it to use the internal RC by setting this define = 0:

    // <e> NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver
    //==========================================================
    #ifndef NRFX_CLOCK_ENABLED
    #define NRFX_CLOCK_ENABLED 0
    #endif
    // <o> NRFX_CLOCK_CONFIG_LF_SRC  - LF Clock Source
     
    // <0=> RC 
    // <1=> XTAL 
    // <2=> Synth 
    // <131073=> External Low Swing 
    // <196609=> External Full Swing 
    

    Best regards,

    Simon

  • Hi,

    BL654 does not ship with the external RC oscillator

    Thank you for pointing it out. I don't know how much time I would have taken to figure it out.

    For those who are using Laird’s BL654 module or some custom module please look for clock source and modify SoftDevice clock configuration accordingly for applications using SoftDevce.

    Below is the image grab from Laird document related to clock configuration with nrf5 SDK.

    I would recommend applying the changes in sdk_config.h rather than modifying nrf_sdh.c file.

    Snippet from sdk_config.h:

    // <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 0
    #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 16
    #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 2
    #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
    
    // </h> 

    Thank you   & 

    Regards

  • It does seem to be a very common thing with many modules - not just Laird - leading to many threads here.

    Perhaps Nordic could do better to highlight the issue ?

  • Hi,

    Perhaps Nordic could do better to highlight the issue ?

    I think if someone mentions custom board or module it is better to ask about clock settings first, it would help a lot.

    Regards

  • Indeed.

    But it seems that many of these people have trouble locating the information on how to adapt their code for use without the crystals.

    Perhaps Nordic could do a blog post on that?

Reply Children
Related