Zephyr API Function bt_gatt_read Takes long time to return an error code

Hi,

I was doing BLE tests with our custom code using two nrf52dk DK boards. The client keeps reading data from the server every 250ms. If I power reset the server during the client's reading activity, I noticed it took a long time (about 20-30 seconds) for the function bt_gatt_read to return the error code (-12, ENOMEM). Is there any specific reason why it takes so much time?

The SDK I was using is v2.4.0 nRF Connect.

Thanks! 

Parents
  • Hi

    The allocation timeout was set to this because it is long enough indeed. As it's not directly related to the ATT timeout in any way that's not extremely complicated, but changing this would affect all users of this API (including stack users).

    We're currently in the process of testing if the blocked allocation can quickly complete once the host gets the disconnection event from the controller as we suspect there is something in your project that's holding up the cleanup somehow.

    Best regards,

    Simon

  • Hi Simonr,

    Please let me know your test results when you have them.

    Our application requires that after the peripheral / sever power resets it starts to send advertisement data within 100ms. And in the meantime the central / client device is trying to recover from the failure to read data. Do you think it could the reason to hold up the clean up and cause the long delay?

    Thanks! 

Reply
  • Hi Simonr,

    Please let me know your test results when you have them.

    Our application requires that after the peripheral / sever power resets it starts to send advertisement data within 100ms. And in the meantime the central / client device is trying to recover from the failure to read data. Do you think it could the reason to hold up the clean up and cause the long delay?

    Thanks! 

Children
No Data
Related