Hi
I use nrf-ble-driver ver.4.1.1 with PCA10031 dongle (nRF51844 chip on board) and "connectivity_4.1.1_1m_with_s130_2.0.1.hex" firmware for that dongle. in this case ATT_MTU = 23.
In description of function sd_ble_gattc_read() says:
"If the Characteristic or Descriptor to be read is longer than ATT_MTU-1, this function must be called multiple times with appropriate offset to read the complete value."
Its all ok and work fine, but I have a stupid question: why ATT_MTU-1 but not ATT_MTU-3 ?
In peripheral I have characteristic 23 bytes len and really after call 2 times an sd_ble_gattc_read(), I receive first 22 bytes and second 1 bytes in 2 packets. in other words I receive all data, but I assumed that first packet should be 20 bytes len (ATT_MTU-3) and second packet = 3 bytes len.
Continuing this one more question: when I enable notification for this characteristic, on BLE_GATTC_EVT_HVX event I receive only 20 bytes and can't get more, but if to follow the logic of ATT_MTU description, I have to receive 22 bytes.
Tell me please, where could I get confused?
Thanks.