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.

Sending Data via GATT_WriteLongCharValue

Hello,

I'm sending 45 bytes from central to peripheral via GATT_WriteLongCharValue (Display Data)

With Slave Latency = 0x00 and Connection Intervall = 37.5ms, I log following data (writing header + 22 unicode chars)

So the command GATT_WriteLongCharValue with 45 Bytes length takes ~263ms. Could I speed up this communication (without increasing connectino intervall)?

I'm just wondering why 8 data packets are needed to send a 44 byte message.

greetings,

Elias

  • It is difficult to tell what is happening in the sniffer capture since you are using an encrypted link; however the protocol for the GATT_WriteLongCharacteristic sub-procedure would require 8 packets for 44 bytes of data, as shown below. Yes, it is cumbersome but this is how GATT defines long characteristic writes. Alternatively, you might want to parse your data into 20-byte chunks at the application and just send three WriteNoResponse packets to send the data more efficiently.

    Client -> server - Prepare Write request with first 18 bytes of data.

    server -> client - Prepare write response

    client -> server - Prepare Write request with next 18 bytes of data.

    server -> client - Prepare write response

    client -> server - Prepare Write request with final 8 bytes of data.

    server -> client - Prepare write response

    client -> server - Execute write request

    server -> client - execute write response