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

[Bug Report] Characteristic encryption & write without response

Hey,

we encounter very strange behaviour when using encryption (without MITM) in conjunction with write without response. If characteristics are unencrypted (open), write without response behaves as expected and is significantly faster than write with response (as it should be). Yet, if we activate encryption, this behaviour inverts, meaning the data comes in significantly slower when using write without response. We have tried different values for the connection parameters (min connection interval, etc.) but behaviour stayed the same.

For now we have a workaround but you might want to have a look at it. We use a NRF51422 QFAA v2 with softdevice 310, NRF51 SDK 7.2.0, and the GCC toolchain.

Thanks in advance,

Jens

Parents
  • Hi there,

    I just ran a quick test locally (on the s130 SoftDevice, but they should be functionally equivalent) and I alternated between:

      BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm);
      BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm);
    

    and

      BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.read_perm);
      BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.write_perm);
    

    and then transferred a large amount of Write Command packets to this attribute (always with encryption enabled on the link, that is, always after a BLE_GAP_EVT_SEC_INFO_REQUEST/ BLE_GAP_EVT_CONN_SEC_UPDATE event pair) and got exactly the same throughput regardless.

    There must be something else that is changing in your case.

    Are you setting authorization at all? (rd_auth, wr_auth)

    When you say "activate encryption" in your message, do you mean encrypting the link or using BLE_GAP_CONN_SEC_MODE_SET_ENC_<> instead of _OPEN ?

    Thanks,

    Carles

  • Oh yeah, sorry, it's the other way around ;-)

    And yes, I have verified that without active HID service the throughput stays the same no matter which write mode or type of encryption we set.

    Would be good to know if there is any fix for this. For now, we have to reboot and deactivate HID over GATT if we need to send a larger amount of data via write without response.

    Thanks for your effort!

Reply
  • Oh yeah, sorry, it's the other way around ;-)

    And yes, I have verified that without active HID service the throughput stays the same no matter which write mode or type of encryption we set.

    Would be good to know if there is any fix for this. For now, we have to reboot and deactivate HID over GATT if we need to send a larger amount of data via write without response.

    Thanks for your effort!

Children
No Data
Related