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

Read the write data in nrf connect app after immediate power ON

Hello 

I'm using NRF connect the app to perform read and write on nrf52840 board SDK ver of 15.0.0.

 I can perform the write and read operations using nrf connect app, and that write data is stored in flash.

 My problem is,  I will write the data first and stop debug session and again makes connection with device nrf52840, Now I will directly perform read operation by pressing read in the nrf connect app. It showing nothing while reading.

Please give your inputs to fix these issues.

Thank you.

Parents
  • When you init the gatt services and characteristics, you can typically use .p_init_value to set the start value.

    For instance you can find in ble_srv_common.c that the characteristic_add()-api check .p_init_value before calling sd_ble_gatts_characteristic_add().

        if (p_char_props->p_init_value != NULL)
        {
            attr_char_value.init_len  = p_char_props->init_len;
            attr_char_value.p_value   = p_char_props->p_init_value;
        }

Reply
  • When you init the gatt services and characteristics, you can typically use .p_init_value to set the start value.

    For instance you can find in ble_srv_common.c that the characteristic_add()-api check .p_init_value before calling sd_ble_gatts_characteristic_add().

        if (p_char_props->p_init_value != NULL)
        {
            attr_char_value.init_len  = p_char_props->init_len;
            attr_char_value.p_value   = p_char_props->p_init_value;
        }

Children
Related