- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I'm trying to use the two services CTS and ANCS, to update the clock and to receive notifications from iOS.
On event CY_BLE_EVT_GATTC_DISCOVERY_COMPLETE:
If I only call the function Cy_BLE_CTSC_SetCharacteristicDescriptor, it works
If I only call the function Cy_BLE_ANCSC_SetCharacteristicDescriptor, it works
if I call them both, the second returns the error 0x160002
what could be the mistake I make?
Thank you
Oscar
Solved! Go to Solution.
- Labels:
-
PSoC 6 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
In case of successful execution of Cy_BLE_ANSC_SetCharacteristicDescriptor api (return value = CY_BLE_SUCCESS) the following events can appear:
If the ANS service-specific callback is registered with Cy_BLE_ANS_RegisterAttrCallback():
CY_BLE_EVT_ANSC_WRITE_DESCR_RESPONSE - In case if the requested attribute is successfully written on the peer device, the details (char index, descr index etc.) are provided with event parameter structure of type cy_stc_ble_ans_descr_value_t.
Otherwise (if an ANC service-specific callback is not registered):
CY_BLE_EVT_GATTC_WRITE_RSP - If the requested attribute is successfully written on the peer device.
CY_BLE_EVT_GATTC_ERROR_RSP - If an error occurred with the requested attribute on the peer device, the details are provided with an event parameter structure ( cy_stc_ble_gatt_err_param_t).
In case of successful execution of Cy_BLE_CTSC_SetCharacteristicDescriptor api (return value = CY_BLE_SUCCESS) the following events can appear:
If the CTS service-specific callback is registered with Cy_BLE_CTS_RegisterAttrCallback():
CY_BLE_EVT_CTSC_WRITE_DESCR_RESPONSE - In case if the requested attribute is successfully written on the peer device, the details (char index, descr index etc.) are provided with event parameter structure of type cy_stc_ble_cts_descr_value_t.
Otherwise (if an CTS service-specific callback is not registered):
CY_BLE_EVT_GATTC_WRITE_RSP - If the requested attribute is successfully written on the peer device.
CY_BLE_EVT_GATTC_ERROR_RSP - If an error occurred with the requested attribute on the peer device, the details are provided with an event parameter structure ( cy_stc_ble_gatt_err_param_t).
Please check these events before calling other function.
Thanks,
P Yugandhar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
In case of successful execution of Cy_BLE_ANSC_SetCharacteristicDescriptor api (return value = CY_BLE_SUCCESS) the following events can appear:
If the ANS service-specific callback is registered with Cy_BLE_ANS_RegisterAttrCallback():
CY_BLE_EVT_ANSC_WRITE_DESCR_RESPONSE - In case if the requested attribute is successfully written on the peer device, the details (char index, descr index etc.) are provided with event parameter structure of type cy_stc_ble_ans_descr_value_t.
Otherwise (if an ANC service-specific callback is not registered):
CY_BLE_EVT_GATTC_WRITE_RSP - If the requested attribute is successfully written on the peer device.
CY_BLE_EVT_GATTC_ERROR_RSP - If an error occurred with the requested attribute on the peer device, the details are provided with an event parameter structure ( cy_stc_ble_gatt_err_param_t).
In case of successful execution of Cy_BLE_CTSC_SetCharacteristicDescriptor api (return value = CY_BLE_SUCCESS) the following events can appear:
If the CTS service-specific callback is registered with Cy_BLE_CTS_RegisterAttrCallback():
CY_BLE_EVT_CTSC_WRITE_DESCR_RESPONSE - In case if the requested attribute is successfully written on the peer device, the details (char index, descr index etc.) are provided with event parameter structure of type cy_stc_ble_cts_descr_value_t.
Otherwise (if an CTS service-specific callback is not registered):
CY_BLE_EVT_GATTC_WRITE_RSP - If the requested attribute is successfully written on the peer device.
CY_BLE_EVT_GATTC_ERROR_RSP - If an error occurred with the requested attribute on the peer device, the details are provided with an event parameter structure ( cy_stc_ble_gatt_err_param_t).
Please check these events before calling other function.
Thanks,
P Yugandhar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello and thank you for your reply,
I will try the approach you have suggested to me.
Regards