This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

sd_ble_gattc_write on central sdk11

Hi, I have problem with long write by sd_ble_gattc_write. I send first 18 bytes by button on pca10028, then I waiting for BLE_GATTC_EVT_WRITE_RSP and sending rest of bytes. Totaly 80 bytes by 18 bytes chunk, last chunk is 8 bytes. Problem is that I received only 54 bytes on my peripheral device with sd110 sdk7.1. It looks like that event BLE_GATTC_EVT_WRITE_RSP is called only 3 times instead 5 times, but why? I waiting for event BLE_GATTS_EVT_WRITE with op_code BLE_GATTS_OP_EXEC_WRITE_REQ_NOW on my peripheral.

Parents
  • FormerMember
    0 FormerMember

    For implementing long write, did you follow this message sequence chart?

    Do you need the simultaneous writing feature that the "long write" functionality gives you? Or do you only need to write 80 bytes of data? If you only need to write 80 bytes of data, I would recommend you to use regular "write" instead of "long write".

    Queued write (or long write) is normally not a function that you want to use, especially if high bandwidth is crucial in your application. Here's the explanation of this feature from the Bluetooth Core Specification v.4.2, vol 3, part F, chapter 3.4.6:

    The purpose of queued writes is to queue up writes of values of multiple attributes in a first-in first-out queue and then execute the write on all of them in a single atomic operation.

  • I have followed message sequence chart. I need write encrypted string with lenght 80 bytes from central to peripheral. What is regular WRITE for you ? Normal Write can send only 20 bytes...I found out that my problem is small TX_BUFFER. TX_BUFFER is 3 and I have suspected that TX_BUFFER is 6 on SD130 2.0.0. Is it possible to change it or It is more than 3 on sd130 2.0.1 ?

Reply Children
No Data
Related