GATT write callback error cases

Hello,

I am wondering about what happens with the write callback if a write fails to a GATT attribute. E.g. with the following definition:

    BT_GATT_CHARACTERISTIC(UUID_MY_RX,
                   BT_GATT_CHRC_WRITE |
                   BT_GATT_CHRC_WRITE_WITHOUT_RESP,
                   BT_GATT_PERM_READ | BT_GATT_PERM_WRITE,
                   NULL, on_receive, NULL),

Will on_receive be called if one of many PDUs of a write (when data length is smaller than MTU) fails to arrive?

Thanks in advance,

Miklos

Parents
  • Hi,

    The use case is a bit strange, because all communication in BLE is reliable and they are sent in the order it's written. So I don't really see how this should come about unless there is an error in the application, that somehow skip a write, for instance due to don't check the error code when trying to write and assume it's written correctly.

    But the short answer is really that on_receive is not called no.

    Kenneth

Reply
  • Hi,

    The use case is a bit strange, because all communication in BLE is reliable and they are sent in the order it's written. So I don't really see how this should come about unless there is an error in the application, that somehow skip a write, for instance due to don't check the error code when trying to write and assume it's written correctly.

    But the short answer is really that on_receive is not called no.

    Kenneth

Children
Related