cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

JaPo_3883311
New Contributor II

Background: Using a PSoC 6 MCU as a BLE GATT server and trying to use Data Length Extension (DLE).

The Bluetooth Low Energy PDL docs define the following event:

CY_BLE_EVT_SET_DATA_LENGTH_COMPLETE: This event indicates completion of the Set data length command.

But I don't see any set data length command in the API. It only has a function for getting the data length (Cy_BLE_GetDataLength) which triggers an analogous event (CY_BLE_EVT_GET_DATA_LENGTH_COMPLETE). This asymmetry strikes me as a a sign of incompleteness. Is the nonexistent set data length function in development or something?

I also don't see a command corresponding to CY_BLE_EVT_SET_SUGGESTED_DATA_LENGTH_COMPLETE, but maybe I'm missing it because the PDL docs' search function only returns items that match from the start of the string, making it basically unusable.

Hopefully this has a simple answer I'm just being an idiot here.

0 Likes
1 Solution
ShipingW_81
Moderator
Moderator

yes, PDL3.1.0 has CM4 debugging problem for some P6 parts. This might be fixed in next release.

I checked the PDL3.1.0 middleware BLE files and Cy_BLE_SetDataLength / Cy_BLE_SetSuggestedDataLength existing in cy_ble_stack_host_main.h

View solution in original post

0 Likes
5 Replies
ShipingW_81
Moderator
Moderator

The DLE function is enabled by the BLE Component during BLE initialization if either of CY_BLE_CONFIG_LL_MAX_TX_PAYLOAD_SIZE or CY_BLE_CONFIG_LL_MAX_RX_PAYLOAD_SIZE macro (in BLE_config.h) is configured by the user to a value greater than 27 octets. 

Regarding to set data length command, there is two APIs - 

Cy_BLE_SetDataLength / Cy_BLE_SetSuggestedDataLength.

Successful completion of controller operation issued by the two APIs would be informed through 'CY_BLE_EVT_SET_DATA_LENGTH_COMPLETE' event and 'CY_BLE_EVT_SET_SUGGESTED_DATA_LENGTH_COMPLETE' respectively.

JaPo_3883311
New Contributor II

That's strange -- neither of the API functions you mentioned are in the PDL docs, but I tried them out in my PSoC Creator project and they do work. My documentation must be out of date or just incomplete. Anyway, thanks!

0 Likes
ShipingW_81
Moderator
Moderator

It's possible the PDL you involved in your project is old version. Please select PDL3.1.0 as the target library by setting under Tools -> Options -> PDL v3 location in PSoC Creator.

0 Likes
JaPo_3883311
New Contributor II

I'm still using PDL 3.0.1 because 3.1 breaks debugging (Debug the CM4 core -- falsely marked as solved) but for the record, even the latest PDL 3.1 documentation (v 2.30.0.7473) is missing the Cy_BLE_SetDataLength / Cy_BLE_SetSuggestedDataLength functions.

0 Likes
ShipingW_81
Moderator
Moderator

yes, PDL3.1.0 has CM4 debugging problem for some P6 parts. This might be fixed in next release.

I checked the PDL3.1.0 middleware BLE files and Cy_BLE_SetDataLength / Cy_BLE_SetSuggestedDataLength existing in cy_ble_stack_host_main.h

View solution in original post

0 Likes
Top labels