Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

About NRF_ERROR_BUSY in multi-roll configuration

Hello. I am developing with the following configuration.

In this configuration, since it is necessary to connect multiple peripherals with multiple roles, "scan_start ()" is written in "BLE_HRS_C_EVT_DISCOVERY_COMPLETE", which is the first connection end case.
By doing this, you can connect to the second and subsequent units, but if you continue to scan and try to connect with the terminal,
“NRF_ERROR_BUSY” appears and stops.
Pressing the reset button on the BLE module may succeed, but the technique is not good.

The place where it occurs is

Error check function in “nrf_log_backend_uart.c”.
static void serial_tx (void const * p_context, char const * p_buffer, size_t len)
{
    uint8_t len8 = (uint8_t) (len & 0x000000FF);
    m_xfer_done = false;
    ret_code_t err_code;
    err_code = nrf_drv_uart_tx (& m_uart, (uint8_t *) p_buffer, len8);
    APP_ERROR_CHECK (err_code);
    / * wait for completion since buffer is reused * /
    while (m_async_mode && (m_xfer_done == false))
    {
    }
}

It did not change even if it looped many times with a while loop in this part.

I have a question about this cause.
・ Is there a frequent case that stops when another process is performed while scanning?
・ Is there a problem with this configuration itself, not scanning?
・ How can I avoid "NRF_ERROR_BUSY"?
・ As a way to avoid it, I think you have to start over from the beginning when it comes to the BUSY state. Is there a method (program code)?
Thank you.

The environment is as follows.
SoftDevice: S132
IDE: SES
BLE Device: NRF52832
SDK version: 15.30
Peripheral project: ble_peripheral⇒ble_app_hrs
multirole project: experimental⇒ble_app_multirole_lesc

Parents Reply Children
No Data
Related