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

Any more information on the ble_app_ancs project?

I've downloaded the latest SDK and soft device. I've been able to compile the ble_app_ancs project, run it on my dev board and even connect to my iPhone. Although I'm getting assertions when I try to connect after restarting.

There seems to be a Master Control Panel server setup file, ANCS_central.bin, but I couldn't find any information about how to drive that like there if for the Alert Notification Application.

  • Hi Eric

    We have not made official documentation for it yet, it is experimental, but I will try to get you started. You should find some useful information in the Apple Notification Center Service (ANCS) Specification as well.

    1. Compile and program the application. Observe that the Advertising LED is lit.
    2. In the Master Control Panel create the ANCS server by doing the following steps: -Click File -> Server Setup. In the window that opened up, click File -> Load setup. -In the resulting window, navigate to ble_app_ancs folder and load the file named ANCS_central.bin. -Press 'Stop server' and then 'Start server'. -It is important to keep the server window opened.
    3. Select to the device from Master Control Panel (the device will be advertising as 'ANCC'), then connect and perform service discovery. Observe that the Connected LED is lit, and the Advertising LED is off.
    4. The first characteristic in our ANCS server is the 'Notification Source'(see the ANCS spec). This has 8 bytes, with the format in Figure 2.1. So, updating the value of this characteristic to 01-00-04-00-99-99-99-91 the lcd screen should show:

    Social Modified 9999999(not space for the last digit)

    You can find the different category ID's and event ID's in main.c

    Hope this can get you started, if anything is unclear, please don't hesitate to reply.

    Please remember that this is experimental, and there can, and most likely will, be changes.

  • Thanks for the information.

    When I try to connect to the Master Control Panel, I end up with a hard fault.

    Here's the MCP log: [23:50:35.9] BondToDevice() [23:50:36.5] Encryption change: Link encryption is ON [23:50:36.5] SERVER: Received packet <HciEvent: eventCode=0x0B> - <HciEvent: eventCode=0x0B> [23:50:36.5] SERVER: Received Encryption Change Event [23:50:38.2] GetDeviceInfo() [23:50:38.2] Starting a Read Information Request on the whole remote DB [23:50:39.6] Lost connection to device. Reason: BTLE_CONNECTION_TIMEOUT [23:50:39.6] SERVER: Received packet <HciEvent: eventCode=0x0A> - <HciEvent: eventCode=0x0A> [23:50:39.6] SERVER: Received Link Loss [23:50:43.8] Discovering all attribute UUIDs [23:50:43.8] Lost connection before service discovery was complete

    I'm not sure if this issue is coincident with my troubles with bond persistence. If I don't ensure bond_delete is true I get an assertion error.

    It seems to occur during the memcpy in pstorage_load, called from bonding_info_load_from_flash.

  • Strange, bonding works fine here. What versions are you using? I use:

    MCP 3.5.0 SD 6.0.0-5.beta SDK 5.0.0

    Are you using the development kit or the evaluation kit?

  • Hi,

    I'm using: MCP 3.5.0.8226 SDK 5.0.0 (nrf51_sdk_v5_0_0_34603.msi) Soft Device: 6.0.0-5 The Master Emulator firmware is mefw_nrf51822_0.9.0.10022

    I did just download the latest version of nRFgo Studio and have reflashed and verified the soft device to be sure, but I still get the same failure as described above.

    When I first power up the device, and set bond_delete to true it will initialise, but when I get to enabling the services, I get an error during the apple_notification_setup(), ccd_configure() fails because m_client != STATE_RUNNING. That seems to me to be related to the connection not being correctly established, but I'm not sure.

    Unfortunately I only have a dev kit at the moment, connected to power and some LEDs and buttons.

    Thanks, Eric

  • I'm also using the dev kit. Do you do a service discovery before you press bond?

Related