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.