Hi
how to configure rtc for nrf51dk and i want to update time from my phone then how to read the current time in device ?
Hi
how to configure rtc for nrf51dk and i want to update time from my phone then how to read the current time in device ?
Hi Gokul,
You can have a look at the ble_app_cts_c Curent Time Service example. The documentation is here.
Note that in the example, testing is done with the MCP on PC. If you want to use it with the phone, you would need to implement the GATT server on the phone with the CTS service.
After you can send the current time from the phone to the nRF51 you can use RTC to continue counting.
Hi Gokul,
You can have a look at the ble_app_cts_c Curent Time Service example. The documentation is here.
Note that in the example, testing is done with the MCP on PC. If you want to use it with the phone, you would need to implement the GATT server on the phone with the CTS service.
After you can send the current time from the phone to the nRF51 you can use RTC to continue counting.
Hi hung, i got struck up in update_current_time_value_in_sd()
static uint32_t update_current_time_value_in_sd(ble_cts_t * p_cts){ uint16_t len; uint8_t encodedDateTime[ENC_DATE_TIME_LENGTH];
// TODO: implement a function to get the time
cts_getTime(&dateTime);
len = (uint16_t) ble_date_time_encode(&dateTime, encodedDateTime);
// write the new value into the softdevice
return sd_ble_gatts_value_set(p_cts->current_time_handles.value_handle, 0, &len, encodedDateTime);
}
will u send some explanation for that
Hi
am waiting for past two weeks for ur reply ,
i created gatt service and it shows in mobile phone but am not getting the time related things