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.

  • OK. It can be solution for SD130 on both side(peripheral and central) within sdk11.I have central on SDK11 and peripheral SD110 on SDK7.1. But I can't set bandwidth on my peripheral side. I suspect that I need the same bandwidth on both side.

Reply Children
No Data
Related