NimBLE msys runs out of free blocks on ESP32C6
Posted: Tue Feb 27, 2024 7:38 pm
Hello, I can't seem to figure out how to send packets over BLE with ble_gatts_notify_custom at full speed. When I try and use
this function fails if the msys is full. But when it fails it seems like the whole NimBLE fails and I can't send any more packets over BLE no matter what. I've looked at the example here: https://github.com/espressif/esp-idf/tr ... throughput and they use this function there:
To detect whether there's enough free blocks in the msys for another packet to be fed into msys. But this function doesn't seem to do much on my EPS32C6. It just reports total number of blocks MSYS1 + MSYS2 specified by me in the sdkconfig . The value it returns does in fact decrease after I fill the msys with data but at that point it's already too late and everything fails.
Can anyone suggest a fix for this?
Thanks in advance!
Code: Select all
int ble_hs_mbuf_to_flat(const struct os_mbuf *om, void *flat, uint16_t max_len, uint16_t *out_copy_len);
Code: Select all
if (os_msys_num_free() >= MIN_REQUIRED_MBUF) {
Can anyone suggest a fix for this?
Thanks in advance!