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

UART Multilink Issue: NRF_ERROR_SVC_HANDLER_MISSING or NRF_ERROR_NO_MEM?

Hello!

Like several others on here, I’m trying to make a multilink nus central firmware. My Peripheral devices run the ble_app_uart example, and the central device runs a modified multilink example that includes the ble UART service. My code is based on Adam’s form here

Hardware: x3 NRF52832 boards. (1 Central, 2 identical Peripherals) 

SKD: nRF5_SDK_14.2.0

Here is my code

To view my code, download and copy to the original SDK location (nRF5_SDK_14.2.0_17b948a/examples/ble_central/).

The only modified library was the nus header which can be found here

In summary, everything compiles, and I can get multiple UART peripherals to correctly connect to a single Central device.

When I send UART data from any peripheral, the central correctly receives the data. However, when the Central tries to echo the message back to the peripheral (or send any UART message to the peripherals), the Central sends a single byte, then crashes with this error:

 <error> app: ERROR 4 [NRF_ERROR_NO_MEM].

See below for a complete terminal

After debugging the NRF_ERROR_NO_MEM in the central code, it stems from a NRF_ERROR_SVC_HANDLER_MISSING whenever the Central tries to transmit.

I’m at a loss here. There have been several forms with people trying to make a multilink NUS, and I’ll happily share my final code for others reference if we figure this out.

Please help!

Scott

  • Hi Scott,

         I have tried you code but when I call   ble_nus_c_string_send ,the error is “Connection handle invalid.”。My two  Peripheral devices is 51DK.But  Peripheral  send data to  central is OK!

    another question is  how my  current Peripheral device know  his address is 0x0  or 0x1?

    How about this way call?

    case BLE_GAP_EVT_CONNECTED:
    {
    NRF_LOG_INFO("Connection 0x%x established, starting DB discovery.",
    p_gap_evt->conn_handle);


    // send ble string to target peripheral
    BleData[1]=p_gap_evt->conn_handle;
    err_code = ble_nus_c_string_send(&m_ble_nus_c[p_gap_evt->conn_handle], BleData, BLE_NUS_MAX_DATA_LEN);

    Please help!

    Kind Regards,

  • Hi Scott,

    can you tell me what you do for resolve problem? I have checked that headers files are correct for s132 5.0.0 softdevice, but  <error> app: ERROR 4 [NRF_ERROR_NO_MEM]. still occures.

    Maybe you can share with code or entire SDK.

    regards Marcin

Related