This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2652R: data transfer rate restriction in notify property

Part Number: CC2652R

Hi all,

         I am working simple peripheral project. I want to send 128 bytes of data from CC2652 to smartphone. For this purpose, I am integrated data service of project zero into simple peripheral project. I am using notify property to send data and I am increased the data length to 128 bytes. But I am able to send only 20bytes at a time. For the testing purpose, I am sending data for every one second.

I am tested the same in my custom service(which is created through TI simple link academy) and I am getting same performance(only twenty bytes only transferring). Is this app side issue or cc2652 issue

Regards,

Aslam

  • Hi Aslam,

    Thank you for opening this thread.

    I have assigned an engineer to help you.

    Best regards,

  • Hi Aslam,

    please check on BLE5-Stack User's Guide (ti.com) on GATT chapter. As a start, you can check and config ATT_MTU for testing

  • Hi simon,

               I can't able to find how to configure ATT_MTU. Please help me on this

    Regards,

    Aslam

  • Hi Aslam,

    Here's some lines in the link I mentioned before, please see GATT_ExchangeMTU()

    A client device can request a larger ATT_MTU during a connection by using the GATT_ExchangeMTU() command. During this procedure, the client informs the server of its maximum supported receive MTU size and the server responds with its maximum supported receive MTU size. Only the client can initiate this procedure. When the messages are exchanged, the ATT_MTU for the duration of the connection is the minimum of the client MTU and server MTU values. If the client indicates it can support an MTU of 200 bytes and the server responds with a maximum size of 150 bytes, the ATT_MTU size is 150 for that connection.

    For more information, see the MTU Exchange section of the Bluetooth Core Specifications Version 5.2.

    Take the following steps to configure the stack to support larger MTU values.

    1. Set the MAX_PDU_SIZE preprocessor symbol in the application project to the desired value to the maximum desired size of the L2CAP PDU size. The maximum is set by the following equation ATT_MTU=MAX_PDU_SIZE-L2CAP_HDR_SIZE
    2. Call GATT_ExchangeMTU() after a connection is formed (GATT client only). The MTU parameter passed into this function must be less than or equal to the definition from step 1.
    3. Receive the ATT_MTU_UPDATED_EVENT in the calling task to verify that the MTU was successfully updated. This update requires the calling task to have registered for GATT messages. See Registering to Receive Additional GATT Events in the Application for more information.

    Though the stack can be configured to support a MAX_PDU_SIZE up to 255 bytes, each Bluetooth Low Energy connection initially uses the default 27 bytes (ATT_MTU = 23 bytes) value until the exchange MTU procedure results in a larger MTU size. The exchange MTU procedure must be performed on each Bluetooth Low Energy connection and must be initiated by the client.

    Note

    If the Secure Connections BLE 4.2 Feature is enabled, the local device will support an MTU of 65 by default. This is required by LE Secure Connections. Remember that that the actual resulting MTU must still be negotiated via MTU exchange procedure using GATT_ExchangeMTU. All connections will begin with a default MTU of 23 bytes.

    See ble_user_config.h for details.

    Increasing the size of the ATT_MTU increases the amount of data that can be sent in a single ATT packet. The longest attribute that can be sent in a single packet is (ATT_MTU-1) bytes. Procedures, such as notifications, have additional length restrictions. If an attribute value has a length of 100 bytes, a read of this entire attribute requires a read request to obtain the first (ATT_MTU-1) bytes, followed by multiple read blob request to obtain the subsequent (ATT_MTU-1) bytes. To transfer the entire 100 bytes of payload data with the default ATT_MTU = 23 bytes, five request or response procedures are required, each returning 22 bytes. If the exchange MTU procedure was performed and an ATT_MTU was configured to 101 bytes (or greater), the entire 100 bytes could be read in a single read request or response procedure.

  • Hi Simon.

          Thanks for the suggestion, Problem resolved