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

blinki example hangs on connect or disconnect

Application blinky example hangs when connecting with android app. I get 0x4001 error in app_error_fault_handler(). 

It is strange that when i use blinky app on android it is ok (leds and button works), but when I connect by any other android bluetooth scanner (also NRF Connect) the device stops wokring after one on two connection tries.Only reset helps after that.

The problem is on nRF52-DK and also on my own custom board. I dont use 32khz crystal and I change custom board setting to manage this.

#define NRFX_CLOCK_CONFIG_LF_SRC 0

#define NRF_SDH_CLOCK_LF_SRC 0
#define NRF_SDH_CLOCK_LF_RC_CTIV 16
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 16
#define NRF_SDH_CLOCK_LF_ACCURACY 1

SoftDevice s132, NRF52832. SDK 17.02

Any suggections ?

Parents Reply
  • Error 0x4001 PC =  2fdb5, info = 2000fed0.

    I am now running with LS crystal.

    Problem each time  occurs when in NrfConnect app I notifications are disabled, and I am pushing the buton with notification.

    In app Blink application everything is ok (notifications are allwed). Also in NrfConnect with notifications allowed also is ok. But when notifications are not allowed in applications pulling button generates this fatal error (second notification generates error).

    I really dont know where is the problem.

    Error is caused by function: 

    uint32_t ble_lbs_on_button_change(uint16_t conn_handle, ble_lbs_t * p_lbs, uint8_t button_state)
    {
    ble_gatts_hvx_params_t params;
    uint16_t len = sizeof(button_state);

    memset(&params, 0, sizeof(params));
    params.type = BLE_GATT_HVX_NOTIFICATION;
    params.handle = p_lbs->button_char_handles.value_handle;
    params.p_data = &button_state;
    params.p_len = &len;

    return sd_ble_gatts_hvx(conn_handle, &params);
    }

    Can it be a problem when I delayed sending button notification and I trigg it from timer delay handler ?

Children
Related