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

BLE_STACK_BUSY error more frequent over time

I have a BLE application running Mbed 9.7.2 on an nRF52832 (softdevice 132). I have a connection interval (to the central) of 11.25 ms and specify a slave latency of 3. I have a custom service that houses 3 custom characteristics (notify). Each characteristic is 20 bytes in size and consists of 8 2-byte values and a single 4-byte value. The application will fill a single characteristic with new data every 10 ms; when all 3 characteristics are updated I call BLE::Instance().gattServer().write() to write the new data over BLE during the next connection interval.

My issue is as follows. When I attempt BLE::Instance().gattServer().write() I log the result. When the application first starts the result of this operation is BLE_ERROR_NONE - signifying that all is well. As time progresses the result of BLE::Instance().gattServer().write() more often becomes BLE_STACK_BUSY.

Any insights as to this are very welcome.

Parents
  • Hi,

    It sounds like you are filling the buffers faster than the stack is able to transfer the data. If you send 20 bytes every 10 ms, and your connection interval is 11.25 ms, you will eventually fill the buffers if no data length extension (DLE) is enabled. Have you tried updating the characteristics at a slower interval, or reduce the connection interval further?

    This is a question you should direct to the mbed forums, as this is not code being developed/maintained by Nordic.

    Best regards,
    Jørgen

Reply
  • Hi,

    It sounds like you are filling the buffers faster than the stack is able to transfer the data. If you send 20 bytes every 10 ms, and your connection interval is 11.25 ms, you will eventually fill the buffers if no data length extension (DLE) is enabled. Have you tried updating the characteristics at a slower interval, or reduce the connection interval further?

    This is a question you should direct to the mbed forums, as this is not code being developed/maintained by Nordic.

    Best regards,
    Jørgen

Children
Related