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

NO_MEM error with multi-peripheral BLE connection case questions

Hello,

I am tested multi-channel BLE peripheral connections.
(ble_app_uart example with saadc example.)

When I am testing 2-channel, it works well.

However, when I am trying to more than 3(final goal is 4),

NO_MEM error is occured in

ble_nus_chars_received_uart_print function.

I am try to size up the RAM(size, start address) but it doesn't work.

And I am finding the MTU size or other setting, I don't know which parameter or variable should be modified.

Thanks for reading my quesions.

Best Regards,

Yclee.

Parents
  • Can you confirm that you edit the TX and RX buffer sizes by changing the following defines?

    #define UART_TX_BUF_SIZE 512 /**< UART TX buffer size. */
    #define UART_RX_BUF_SIZE 512 /**< UART RX buffer size. */

    Also, what nRF52 series device are you using? The only thing that should limit the buffer sizes is the RAM itself, so it could be that the memory is full if you're using one of the lower-end modules (in terms of memory). You should also check the size of your attribute table (NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE). You can try increasing this to see if that helps as well.

    Best regards,

    Simon

  • I am using nRF52832 DK module with master module, 

    and the buffer size changing by the defines as you mentioned.

    So, I will check the attribute table, and reply the results.

    Thank you for your reply Simonr.

    Best Regards,

    Yclee.

Reply Children
  • The 

    NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE

    is 1408 and I changed 1600 but still no_mem error 

    when 3-peripheral module is connected..

    Should I change the tab size more bigger?

  • Yclee said:
    I am using nRF52832 DK module with master module

     What do you mean by this? Are you using an nRF52832 DK, and what is this "master module"? Can you use the Programmer app in nRFConnect (or the IDE of your choice) to see how much of the memory is used by the application in the first place.

    Can you also provide a code snippet of what lines in your main.c are returning this error (the function containing line 240 in main.c according to your error message).

    Best regards,

    Simon

  • Yes, I am using 52832 DK as master module(central), and breakout board 52832 uses as slave(peripheral). 

    I see the memory usage as below.

     

    And I am modify the code which is before

    NRF_ERROR_BUSY to MEM.

    if ((ret_val != NRF_SUCCESS) && (ret_val != NRF_ERROR_NO_MEM) && (ret_val != NRF_ERROR_INVALID_STATE))
    And the 3rd, 4th module connect well without any error message.

    I am really appreciate for your help and comment.

    Best Regards,

    Yclee.

Related