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

how to access iOS7's ANCS on nRF51822?

hi, i want to get the Email,MissedCall,Other(SMS) from Apple(ios7) to my device.

i survey that , ANCS(Apple Notification Center Service ) at the the Latest iOS7 and access to Notification Center, allowing Bluetooth devices to automatically receive any notification event from your iOS device.

So, I don't know how to build the ANCS on my client(device) and server(iphone). can you give me a suggestion?

device: create the ANCS client(by the custom UUID,128bit) from ANS client sample. iphone: how to bond the ANCS with my app? how to access the ANCS?

nRF8001 devzone.nordicsemi.com/.../how-to-setup-a-pipe-to-access-ios7-s-ancs

The Apple Notification Center Service developer.apple.com/.../Specification.html

  • hi, 1.The device that is accessing ANCS needs to run a GATT Client. Are you running it ?

    A: No, i not run ANCS on device(i will program that reference ble_app_alert_notification sample). the device(nRF51) work ble_app_alert_notification now,i create a central app(for alert_notification ) at first in iOS . But it not work correctly.(i think it is the iOS don't alert_notification service, and i can't create it)

    1. now ,i write ANCS on device. The The Apple Notification Center Service,the service UUID and characteristics UUID(on difference base UUID)

    Q.How to use four vendor specific UUID? (use macro BLE_UUID_BLE_ASSIGN is Bluetooth SIG UUID)

    i try the follow code:

    
        ble_uuid_t ble_uuid;
        ble_uuid128_t ans_base_uuid = {0xD0, 0x00, 0x2D, 0x12, 0x1E, 0x4B,0x0F, 0xA4, 0x99, 0x4E, 0xCE, 0xB5,0, 0, 0x05,0x79};
        // Add custom base UUID
        err_code = sd_ble_uuid_vs_add(&ans_base_uuid, &p_ans->uuid_type);
        if (err_code != NRF_SUCCESS)
        {
            return err_code;
        }		
    //------
    /** @brief Set .type and .uuid fields of ble_uuid_struct to specified uuid value. */
    #define BLE_UUID_CUS_ASSIGN(instance, value) do {\
                instance.type = BLE_UUID_TYPE_VENDOR_BEGIN; \
                instance.uuid = value;} while(0)
    
    BLE_UUID_CUS_ASSIGN(ans_uuid,  BLE_UUID_ALERT_NOTIFICATION_SERVICE);
    
    
    

    ref: ANCS service UUID :7905F431-B5CE-4E99-A40F-4B1E122D00D0 Notification Source: UUID 9FBF120D-6301-42D9-8C58-25E699A21DBD Control Point: UUID 69D1D8F3-45E1-49A8-9821-9BBDFDAAD9D9 Data Source: UUID 22EAC6E9-24D6-4BB5-BE44-B36ACE7C7BFB

    The Apple Notification Center Service: or WTF is Central, Peripheral, Client, Server ref,blog.punchthrough.com/.../the-apple-notification-center-service-or-wtf-is

    Should I see iPhone 4S in Master Control Panel? devzone.nordicsemi.com/.../should-i-see-iphone-4s-in-master-control-panel

    How can I use a vendor specific UUID? devzone.nordicsemi.com/.../how-can-i-use-a-vendor-specific-uuid

  • hi,

    Q. how your ble_app_alert_notification should be able to connect to ANCS?

    A. i think the ble_app_alert_notification sample as same as the NP/NC stack. so ,i build the ANCS(apple notification center servicer) profile by this example.

    Now,i connect the iOS ,and discover the ANCS Characteristic and Descriptor . But the iOS, have not notification any message to my device(nRF51). Do you have any idea about it ? (how to debug it or any Explanation for ANCS)

    P.s: 1.attatch: use apple BTLE_Transfer to dump the iphone services

    the difference Base UUID , call the sd_ble_uuid_vs_add by difference base uuid err_code = sd_ble_uuid_vs_add(&ans_base_uuid, &p_ans->uuid_type);

    ble_app_alert_notification.zip

    apple_ancs.png

  • Hi, do you connect peripheral device using a BLE test app like lightblue/BLExplr or have you wrote an iOS app ?

    Can you send a screen capture of what is shown by the iOS app (lightblue/BLExplr etc...) you are using to try connection ?

    Unfortunately I not work with Keil and windows, so I can't check your code immediately.

    If you have a mac you can simulate a Bluetooth peripheral in Xcode (as is your nRF51 device) test and debug it in realtime using native BT framework.

  • hi, thank you for your reply. A. the BLE test app ,i use attatch file(*1) to simulator peripheral device. but this app is not for ANCS ,but it will see the ANCS services(*2) (so i can't use xcode to debug any message,it is System level. i don't need write any code for ANCS(*3)) B. An ANCS session begins when an NC subscribes to the Notification Source(NS) characteristic on an NP. But when i subscribes NS it get the length is zero. (*the ble_handle.png is iOS and dongle setup message)

    Thank you for considering my request.

    1.attatch file: use app "BTLE_Transfer-3.zip " to dump the iphone services(ANCS)

    Should I see iPhone 4S in Master Control Panel? The iPhone will not do this by default, but it has APIs that allows an app to start such advertisement. devzone.nordicsemi.com/.../should-i-see-iphone-4s-in-master-control-panel

    3.The Apple Notification Center Service: or WTF is Central, Peripheral, Client, Server blog.punchthrough.com/.../the-apple-notification-center-service-or-wtf-is

    IMG_0036[1].PNG

    ancs.png

    BTLE_Transfer-3.zip

    ble_app_alert_notification.zip

    ble_handle.png

  • Hi, quick look to xcode project, maybe I'm wrong, but opening it appears to be an old version, Xcode 4 with iOS Deployment 6.0 and target 6.0

    If so upgrade it to 5 and iOS7.

    ANCS is iOS7.

    Let me know.

Related