Hello
I'm using nRF51822 with S10 softdevice. SD S110 8 QQ图片20160830150431.png
Hello
I'm using nRF51822 with S10 softdevice. SD S110 8 QQ图片20160830150431.png
Hi Qinhao,
Which SDK are you using ? We suggest to use SDK v10 if you are using S110 v8.0. There are some bugfixes for ANCS in that SDK.
Regarding your issue, as you can find here, : Only one instance of the ANCS may be present on an NP. Due to the nature of iOS, the ANCS is not guaranteed to always be present. As a result, the NC should look for and subscribe to the Service Changed characteristic of the GATT service in order to monitor for the potential publishing and unpublishing of the ANCS at any time.
You should either subscribe to service changed indication and wait for that or can also simply retrying after a delay of a few second until the service becomes available.
Hi Qinhao:
Can u put the ancs service init at the first line on function gap_init or whatever.
I'm not sure u facing the same issue as I dealing with, maybe sniffer it will help u to show more detail to me.
U can try my post :
And as Hung Bai's post, maybe u have to use newest SDK and try again.
I disable the funcition ble_nus_init(&m_nus, &nus_init) on void services_init(void); ANCS has been discovered.
I disable the funcition ble_nus_init(&m_nus, &nus_init) on void services_init(void); ANCS has been discovered.
ble_nus_init and ble_ancs_c_init , nus is works. ancs isn't found.
I am using SDK v10 + s110 v8.0,following is my services_init():
static void services_init(void) { //@add
uint32_t err_code;
ble_nus_init_t nus_init;
dis_init();
bas_init();
hids_init();
memset(&nus_init, 0, sizeof(nus_init));
nus_init.data_handler = nus_data_handler;
err_code = ble_nus_init(&m_nus, &nus_init);
APP_ERROR_CHECK(err_code);
app_acns_service_init();
}
Ok, u can try my post. I think it's the same issue. Can u put ance service init before nus_init and give it a try?