nrf calender get issue when we set current time and date at multiple times

Hello sir,

            I am using nrf52832 Dev board in that set  the time and date by using  nrf calendar github library.For setting the time and date i have used  functions as nrf_cal_set_time(uint32_t year, uint32_t month, uint32_t day, uint32_t hour, uint32_t minute, uint32_t second)  and for getting the  time  i have used function as nrf_cal_get_time_string(true)  which it  gives the time and date properly .I have use write_handler function as   write_handler(uint16_t conn_handle, ble_newcts_t * p_lbs, ble_gatts_evt_write_t * p_evt_write) for inserting the value through nrf connect app.When i set the value  through nrfconnect app then it get constant time stamp ,the current time is not increasing .

When i set the value through write_handler(uint16_t conn_handle, ble_newcts_t * p_lbs, ble_gatts_evt_write_t * p_evt_write)  function for the first time then the current time gives proper reading .

Parents
  • Hi again

    I'm sorry, but what is the reason you set the time multiple times? If it is set correctly and gives correct updated values once, what's the reason to try setting it multiple times? I'm guessing the updates stop for some reason when you set the time again. 

    Does the nrf_calendar.c service take use of these new values you set at all? It's important that after you set the values from the nRFConnect app, that these values are used by the nrf_cal_get_time and get_time_calibrated functions to update the time. I think what's happening is that you replace the values with static ones that are not updated, which is why you can't see any updates.

    We will be short on staff during the Holiday period, and delayed replies must be expected. We will be back to full staff on January 3rd. Happy holidays and happy new year!

    Best regards,

    Simon

  • I have to set multiple value  when i put the wrong value in  write_handler(uint16_t conn_handle, ble_newcts_t * p_lbs, ble_gatts_evt_write_t * p_evt_write)  function and  again i set the correct value then nrf_cal_get_time  gives constant value.So how to fix the problem when i used nrf_cal_get_time  function.

Reply Children
No Data
Related