Dialog Semiconductor customer support - CTS RTS Current TIme Service 计画ps://support.dialog-semiconductor.com/resource-keywords/cts-rts-current-time-service en Current Time Service issues 计画ps://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/current-time-service-issues

Hi there,

I am trying to implement a CTS client but I can't seem to get it working. I added the cts.h library to the task where I am calling the cts_init(); along with the below code to set up the call backs.


static void getTimeCTS_cb(ble_service_t *svc, uint16_t conn_idx)
{
printf("getTimeCTS_cb");
}
static void setTimeCTS_cb(ble_service_t *svc, uint16_t conn_idx, const cts_current_time_t *time)
{
printf("setTimeCTS_cb");
}
static void setLocalTimeCTS_cb(ble_service_t *svc, uint16_t conn_idx,const cts_local_time_info_t *info)
{
printf("setLocalTimeCTS_cb");
}
static void getRefTimeCTS_cb(ble_service_t *svc, uint16_t conn_idx)
{
printf("getRefTimeCTS_cb");
}

static const cts_callbacks_t currentTimeService_cb =
{
.get_time = getTimeCTS_cb,
.set_time = setTimeCTS_cb,
.set_local_time_info = setLocalTimeCTS_cb,
.get_ref_time_info = getRefTimeCTS_cb,
};

But when I try to compile I get an error saying that there is an "undefined reference to `ble_gatts_add_characteristic'" in cts.c. However, cts.c has #include "ble_gatts.h" where that function call is defined.

Any ideas?

Thanks in advance.

Device: 
星期四,2019年1月31日02:40:10 + 0000 SamsonLeoMarch 281514 at https://support.dialog-semiconductor.com 计画ps://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/current-time-service-issues#comments