cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6

TaTa_2447651
New Contributor II

I am implementing BLE Notification on a PSoC63 device.

API of "Cy_BLE_GATTS_SendNotification" is used, but API returns "CY_BLE_ERROR_INVALID_PARAMETER" error when data is 20 bytes or more.

If the data is less than 20 bytes, it will be notified correctly.

Where should I modify to send 20 bytes or more data?

I am using the following development environment.

・PSoC Creator : 4.2

・PDL : 3.0.4

・Device : CY8CPROTO-063-BLE

Best regards.

0 Likes
1 Solution
Yugandhar
Moderator
Moderator

Hello TaTa_2447651 ,

The error "CY_BLE_ERROR_INVALID_PARAMETER" will occurs if 'param' is NULL, 'connHandle' is invalid or if 'param->handleValPair.value.len' value is greater than (Effective GATT MTU-3).

The amount of data that can be send/receive by the connected BLE devices depends on the negotiated MTU size. When you connect BLE device with the central device, negotiated GATT MTU = Min of (MTU of client device, MTU of server device).

Could you please check the negotiated MTU value during Exchange MTU procedure and update to the Length of the Value(i.e., param->handleValPair.value.len) to be packed for sending the data.

Thanks,

P Yugandhar.

View solution in original post

0 Likes
2 Replies
Yugandhar
Moderator
Moderator

Hello TaTa_2447651 ,

The error "CY_BLE_ERROR_INVALID_PARAMETER" will occurs if 'param' is NULL, 'connHandle' is invalid or if 'param->handleValPair.value.len' value is greater than (Effective GATT MTU-3).

The amount of data that can be send/receive by the connected BLE devices depends on the negotiated MTU size. When you connect BLE device with the central device, negotiated GATT MTU = Min of (MTU of client device, MTU of server device).

Could you please check the negotiated MTU value during Exchange MTU procedure and update to the Length of the Value(i.e., param->handleValPair.value.len) to be packed for sending the data.

Thanks,

P Yugandhar.

View solution in original post

0 Likes
TaTa_2447651
New Contributor II

Hi P Yugandhar,

Thank you for your advice.

I noticed that there is a parameter in the "GATT Settings" tab of the BLE component configuration that changes the maximum MTU size.

I took some time to understand because for PSoC4 there was a parameter in the "L2CAP Settings" tab.

When the parameter was enlarged, data of 20 bytes or more can be sent by Notification.

0 Likes
Top labels