This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ANCS not found

Hello

I'm using nRF51822 with S10 softdevice. SD S110 8 QQ图片20160830150431.png

Parents
  • 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.

Reply
  • 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.

Children
  • 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();
    

    }

Related