This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Apple Notification Center Service (ANCS) in Zephyr OS

Hello everyone!

Has anyone ever implemented ANCS  (Apple Notification Center Service) in ZephyrOS?

We are using nRF51822 SoC with the goal to connect to the smartphone running iOS and exchange data. Do we need to implement ANCS in the code even though we don't want to receive BLE notifications from the smartphone?


I know that in nRF Connect SDK ANCS is part of the stack (link).

Thanks in advance for your time and efforts.

Sincerely,

Bojan.

Parents Reply Children
  • Hello, .

    Thanks for the useful info. I am using Zephyr v2.6.0 and the west tool for compilation (so it's not nRF Connect SDK-based environment).

    When I included the following ANCS-related things from the peripheral_ancs_client example into the prj.conf file:

    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="ANCS"
    CONFIG_BT_SMP=y
    CONFIG_BT_GATT_CLIENT=y
    CONFIG_BT_GATT_DM=y
    
    # Enable ANCS client
    CONFIG_BT_ANCS_CLIENT=y
    
    # Enable GATT Service client
    CONFIG_BT_GATTP=y
    
    # Enable bonding
    CONFIG_BT_SETTINGS=y
    CONFIG_FLASH=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    CONFIG_FLASH_MAP=y
    CONFIG_NVS=y
    CONFIG_SETTINGS=y

    and tried to compile, I got the following errors:

    prj.conf:39: warning: attempt to assign the value 'y' to the undefined symbol BT_GATT_DM
    prj.conf:42: warning: attempt to assign the value 'y' to the undefined symbol BT_ANCS_CLIENT
    prj.conf:45: warning: attempt to assign the value 'y' to the undefined symbol BT_GATTP
    
    error: Aborting due to Kconfig warnings
    

    Do you have any idea what I am missing here?

    Thanks in advance.

    Cheers Beers!

    Bojan.

  • Hello Bojan,

    The ANCS client service is a part of the nrf repo so you would have to copy it to your project as you are not using the nRF connect SDK. The implementation can be found here: https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/bluetooth/services/ancs_client.c

    Same goes for the GATT Discovery Manager and the Generic Attribute (GATT) Profile module if you want to include those.

    Cheers,

    Vidar

Related