CYBLE_ERROR_INVALID_OPERATION with CyBle_GattcDiscoverAllCharacteristics

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

cross mob
Anonymous
Not applicable

I'm making a project similar to the BLE_UART project from cypress using the CY8CKIT-042-BLE Pioneer Kit with a CYBLE-EVAL-014008 module and the provided dongle. During the initial connection, I'm getting the error CYBLE_ERROR_INVALID_OPERATION whenever I call the function CyBle_GattcDiscoverAllCharacteristics(cyBle_connHandle, attrHandleRange);

   

Why would that function throw that error? My attrHandleRange object uses the same BLE UART Service Handle start and end as the BLE_UART project on the central side, so I imagine this is an issue in the peripheral code.

   

Thanks for any help.

0 Likes
1 Solution
Anonymous
Not applicable

Thanks for the information. It looks like the issue was that the server was caught in a blocking call partway through the connection procedure, so it wasn't responding to any of the client's requests. Resolved now.

View solution in original post

0 Likes
2 Replies
Anonymous
Not applicable

The handle range is different for each server you connect to; The reason the BLE UART uses constant values is that they are creating both sides of the BLE connection, and thus they know what the handle values will be.

   

More information on the function _discoverallcharacteristics() is documented in the IDE if you open the API/help datasheet for the BLE component, or view the comments in the source code directly (BLE_1_StackGattClient.h, line 510~)

0 Likes
Anonymous
Not applicable

Thanks for the information. It looks like the issue was that the server was caught in a blocking call partway through the connection procedure, so it wasn't responding to any of the client's requests. Resolved now.

0 Likes