cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

I made a simple project to show this (attached).

   

I have a couple of custom characteristics. They are of type uint8 array and of length 78 (except one which is of length 300).

   

In this project, I don't do anything but simply respond to the write. Using CySmart, I try to write to those characteristics. If I write data with length less than 70, I get a response. If I write anything of length >= 70, the write gets timed out, and from then on even reading doesn't work. The return value from the CyBle_GattsWriteRsp() function is 3 (CYBLE_ERROR_MEMORY_ALLOCATION_FAILED).

   

Why is that? Is there a hard limit on how large the uint8 array characteristic can get? If so, why doesn't the configuration dialog for the component not warn against this? Is this a stack limitation? A bug?

0 Likes
5 Replies
Anonymous
Not applicable

What is your MTU size set for transactions?

   

Did you resend a MTU exchange command or it is set to default?

0 Likes
Anonymous
Not applicable

The "Attribute MTU size" on the PRoC is 128. On the CySmart it's the default (512). The L2CAP MTU size is 23 on the PRoC, although I'm not sure what L2CAP is and whether it affects me.

   

I don't send an MTU exchange command. If the software does that automatically, I wouldn't know.

   

In the original post, I have attached the project archive in case you want to take a look at the settings yourself.

   

Thanks for the help.

0 Likes
Anonymous
Not applicable

Raising the Attribute MTU size to 256 and the L2CAP MTU size to 128 did not change anything.

0 Likes
Anonymous
Not applicable

Please raise a CyLink Technical case:

   

www.cypress.com

   

“Design Support”

   

“Create a Support Case”

   

You have to be registered on Cypress web site first.

0 Likes
Anonymous
Not applicable

I asked a similar question and never got an answer.

   

Changing the MTU in the component is not enough.

   

You have to request an increase in MTU size after a connection is made.

   

        case CYBLE_EVT_GAP_DEVICE_CONNECTED:

   

            /* Initiate an MTU exchange request */
            CyBle_GattcExchangeMtuReq(cyBle_connHandle, CYBLE_GATT_MTU);
            break;

   

Paul.

0 Likes