Hi,
I'm using BLE on nrf52832 and softdevice s132. It seems that when I send too many packets (around 45), the ble crashes. Is there a way to increase that number or at least make it not crash?
Thanks
Hi,
I'm using BLE on nrf52832 and softdevice s132. It seems that when I send too many packets (around 45), the ble crashes. Is there a way to increase that number or at least make it not crash?
Thanks
Can you tell me what parameters to adjust?
I just tried adding a 500 ms delay after roughly 40 packets, and I'm not getting the error anymore.
Connection interval
MTU size
Use the 2Mbps PHY (BLE 5 High troughput mode)
https://www.nordicsemi.com/Products/Low-power-short-range-wireless/Bluetooth-5
But remember that your Central (especially if it's a phone or tablet) may impose limits ...
Since I'm using another microcontroller (STM32) that communicates with the Nordic MCU, I eventually solved this by disabling the while loop of send-retry in nordic, and moving the retry process to the STM MCU.
So I disabled the following loop condition:
while (err_code == NRF_ERROR_RESOURCES);
that tries to resend a failed message.
Turns out when the error code is Not Enough Resources (19), the UART is busy, and so I get a HAL_BUSY from HAL_UART_Transmit_IT(). And then I just retry sending the message until it succeeds.