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

Increase max packets

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

Parents
  • What BLE profile are you using - eg, NUS?

    You should get an error status telling you when the SD can't accept more packets - are you paying attention to that?

  • NUS profile (uart).

    To clarify, the crash happens when I send data from microcontroller STM32 to the nordic nrf52 that's connected to it via uart, and then send the data to a smartphone by BLE.

    What error should I get? I looked through the error codes (0 to 19) and I can't find anything related to accepting packets.

    Also, if I get this error, what can I do?

    Here's some of the code inside uart_event_handle() under the case APP_UART_DATA_READY:

    do
    {
        uint16_t length = (uint16_t)index;
        err_code = ble_nus_string_send(&m_nus, data_array, &length);
        if ( (err_code != NRF_ERROR_INVALID_STATE) && (err_code != NRF_ERROR_RESOURCES) )
        {
            APP_ERROR_CHECK(err_code);
        }
    } while (err_code == NRF_ERROR_RESOURCES);

    Or should I be looking somewhere else?

    Thanks

Reply
  • NUS profile (uart).

    To clarify, the crash happens when I send data from microcontroller STM32 to the nordic nrf52 that's connected to it via uart, and then send the data to a smartphone by BLE.

    What error should I get? I looked through the error codes (0 to 19) and I can't find anything related to accepting packets.

    Also, if I get this error, what can I do?

    Here's some of the code inside uart_event_handle() under the case APP_UART_DATA_READY:

    do
    {
        uint16_t length = (uint16_t)index;
        err_code = ble_nus_string_send(&m_nus, data_array, &length);
        if ( (err_code != NRF_ERROR_INVALID_STATE) && (err_code != NRF_ERROR_RESOURCES) )
        {
            APP_ERROR_CHECK(err_code);
        }
    } while (err_code == NRF_ERROR_RESOURCES);

    Or should I be looking somewhere else?

    Thanks

Children
Related