You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/10/04 05:52:08 UTC
[GitHub] [mynewt-nimble] ccollins476ad commented on issue #552: ble_gattc_notify_custom cuts off message
ccollins476ad commented on issue #552:
URL: https://github.com/apache/mynewt-nimble/issues/552#issuecomment-703207043
> This would indicate a heap exhaustion situation. I don't understand how this could be possible. Aren't the buffers returned to the heap after each call to ble_gattc_notify_custom?
The buffers are not immediately freed after the call. Assuming you are using a combined host-controller, there are roughly two steps each time your application sends a notification:
1. Application passes data to the host.
2. Controller sends data to the destination device.
`ble_gattc_notify_custom()` implements the first step. This step is very fast. Essentially, the host just hands the controller task a pointer to the buffer to send. The second task is much slower because the controller must schedule its transmits according to how BLE is specified and how the connection is configured.
It sounds like the packets are sitting in the controller's transmit queue. Unfortunately, I'm not sure there's a perfect solution to this problem. Some possibly-good-enough solutions are: 1) increase the buffer count, or 2) set a timer that continues the transmission on expiry.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org