This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

nRF52_SDK_0.9.2_dbc28c9 alert notification example

Hi.

I'm little baffled by the example. Out of box it doens't add the alert notification service to gatt service list in advertising init. Nor I cannot see it with nordic smartphone app (nRF Master Control Panel), so it's not added elsewhere either.

I added to advertisement_init:

ble_uuid_t adv_uuids[] =
{
    {BLE_UUID_ALERT_NOTIFICATION_SERVICE,       BLE_UUID_TYPE_BLE}
};

advdata.uuids_complete.uuid_cnt = sizeof(adv_uuids) / sizeof(adv_uuids[0]);
advdata.uuids_complete.p_uuids  = adv_uuids;

and also moved in the alert_notification_init the ble_ans_c_service_delete before ble_ans_c_init like suggested in the ble_ans_c.h.

After this I still cannot see the alert service in the service list with the nordic app.

What else is missing? The whole advertisement handling is quite different to fe proximity example (that's working properly).

Parents
  • FormerMember
    0 FormerMember

    The reason that the service discovery "doesn't work" is due to how ANCS works. A ANCS device is a peripheral device that is set up as a client device. A client device receives data from the server.

    In most cases, the peripheral device is the server. The server device is the device that has data to transmit to the client. The most typical example is the heart rate belt, updating heart rate values to watch or a phone.

    In ANCS it is the other way around; it is the phone that has the data that it wants to transmit to the ANCS device, and therefore, the peripheral is a client device.

    Service discovery is a procedure that the client can do towards the server, and not the other way around. That is why the nRF Master Control Panel does only discover the generic GATT and GAP services.

    If you want to test the ANCS example, you will have to use an iOS device.

    If you want a similar functionality on Android, you can use the ble_app_alert_notification example in the SDK. To test that example, you can either set up Master Control Panel (PC) as a server, or create your own Android app.

Reply
  • FormerMember
    0 FormerMember

    The reason that the service discovery "doesn't work" is due to how ANCS works. A ANCS device is a peripheral device that is set up as a client device. A client device receives data from the server.

    In most cases, the peripheral device is the server. The server device is the device that has data to transmit to the client. The most typical example is the heart rate belt, updating heart rate values to watch or a phone.

    In ANCS it is the other way around; it is the phone that has the data that it wants to transmit to the ANCS device, and therefore, the peripheral is a client device.

    Service discovery is a procedure that the client can do towards the server, and not the other way around. That is why the nRF Master Control Panel does only discover the generic GATT and GAP services.

    If you want to test the ANCS example, you will have to use an iOS device.

    If you want a similar functionality on Android, you can use the ble_app_alert_notification example in the SDK. To test that example, you can either set up Master Control Panel (PC) as a server, or create your own Android app.

Children
Related