Disconnection right after connection established on nRF52805 using nRF Connect (BlueN

I am using Fanstel evaluation board with BT805 attached.

I got an example project  - ble to uart.

I was able to build the project with Segger V5.42 (any later verisons could not succeed).

I am able to run the code on the device.

But, when i am trying to connect to the device using the nRF Connect application it disconnects immediatly after connection established.

I cannot see any logs on the nRF output.

I can see that the reason is 0x3E.

Logs from nRF connect:

nRF Connect, 2025-01-24
BlueNor 52805 (FC:1C:FC:7C:42:C6)
D 15:47:31.186 gatt.close()
D 15:47:31.190 wait(200)
V 15:47:31.392 Connecting to FC:1C:FC:7C:42:C6...
D 15:47:31.392 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 15:47:31.645 [Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0)
E 15:47:31.645 Error 133 (0x85): GATT ERROR
I 15:47:31.645 Disconnected

Any ideas?

Thanks!

Parents
  • Hi

    This error message is a pretty generic timeout error, but I've seen it before, and more often than not when this occurs on custom boards, it is because the custom board does not have an external 32.768kHz crystal mounted.

    If that's the case, you will need to make the following changes in your sdk_config.h file to use the internal RC oscillator instead. Make sure the following defines are set and try flashing the project again and see if you're able to connect then:

    // <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

    If that doesn't do it, please share some more details on what this custom board is exactly, and what SDK version you're using for development.

    Please note that for new designs, we strongly recommend checking out the nRF Connect SDK, as the nRF5 SDK is now only in maintenance mode.

    Best regards,

    Simon

Reply
  • Hi

    This error message is a pretty generic timeout error, but I've seen it before, and more often than not when this occurs on custom boards, it is because the custom board does not have an external 32.768kHz crystal mounted.

    If that's the case, you will need to make the following changes in your sdk_config.h file to use the internal RC oscillator instead. Make sure the following defines are set and try flashing the project again and see if you're able to connect then:

    // <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

    If that doesn't do it, please share some more details on what this custom board is exactly, and what SDK version you're using for development.

    Please note that for new designs, we strongly recommend checking out the nRF Connect SDK, as the nRF5 SDK is now only in maintenance mode.

    Best regards,

    Simon

Children
No Data
Related