PSOC4 BLE Central Client multiple notification

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Sanyika
Level 2
Level 2
10 sign-ins 5 replies posted 5 questions asked

Hello,

I configured the BLE component as a Central with just client elements.
I want to subscribe to multiple notification.

When I subscribe just one notification, my code works,
but when I send all notification one by one, it's not working

What is the good way to subscribe to different notification element.

Thank you
Alexandre

            apiResult = CyBle_GattcWriteCharacteristicDescriptors(cyBle_connHandle, &writeRequestData1);
            CyBle_ProcessEvents();
            if(apiResult != CYBLE_ERROR_OK)
            {
                DBG_PRINTF("WriteReq1 API Error: %d \r\n", apiResult);
                ShowError();
            }
            apiResult = CyBle_GattcWriteCharacteristicDescriptors(cyBle_connHandle, &writeRequestData2);
            CyBle_ProcessEvents();
            if(apiResult != CYBLE_ERROR_OK)
            {
                DBG_PRINTF("WriteReq2 API Error: %d \r\n", apiResult);
                ShowError();
            }
            apiResult = CyBle_GattcWriteCharacteristicDescriptors(cyBle_connHandle, &writeRequestData3);
            CyBle_ProcessEvents();
            if(apiResult != CYBLE_ERROR_OK)
            {
                DBG_PRINTF("WriteReq3 API Error: %d \r\n", apiResult);
                ShowError();
            }

 

0 Likes
1 Solution
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

CYBLE_EVT_GATTC_WRITE_RSP event will be received if the write operation is succeeded. An Error Response event (CYBLE_EVT_GATTC_ERROR_RSP) will be sent by the server if a write operation is not success.
Please check these events before calling the CyBle_GattcWriteCharacteristicDescriptors() functions in the code.

Thanks,
P Yugandhar.

View solution in original post

1 Reply
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

CYBLE_EVT_GATTC_WRITE_RSP event will be received if the write operation is succeeded. An Error Response event (CYBLE_EVT_GATTC_ERROR_RSP) will be sent by the server if a write operation is not success.
Please check these events before calling the CyBle_GattcWriteCharacteristicDescriptors() functions in the code.

Thanks,
P Yugandhar.