NRF_ERROR_NO_MEM error

Hey Nordic,

I use,

  • pca10056
  • s140
  • SDK 17.1.0

The following are the logs taken from PuTTY:

<info> app: nrf_ble_qwr_init() returned: NRF_SUCCESS

<info> app: sd_ble_uuid_vs_add() returned: NRF_SUCCESS

<info> app: sd_ble_gatts_service_add() returned: NRF_SUCCESS

<info> app: char_uuid.uuid: 0xBEEF

<info> app: sd_ble_uuid_vs_add() returned: NRF_SUCCESS

<info> app: sd_ble_gatts_characteristic_add() returned: NRF_SUCCESS

<info> app: char_add_with_uuid() returned: NRF_SUCCESS

<info> app: char_uuid.uuid: 0xBEF0

<info> app: sd_ble_uuid_vs_add() returned: NRF_SUCCESS

<info> app: sd_ble_gatts_characteristic_add() returned: NRF_SUCCESS

<info> app: char_add_with_uuid() returned: NRF_SUCCESS

<info> app: char_uuid.uuid: 0xBEF1

<info> app: sd_ble_uuid_vs_add() returned: NRF_SUCCESS

<info> app: sd_ble_gatts_characteristic_add() returned: NRF_SUCCESS

<info> app: char_add_with_uuid() returned: NRF_SUCCESS

<info> app: our_char_add() returned: NRF_SUCCESS

<info> app: ble_nus_init() returned: 0x4

<info> app: ble_nus_init() returned: NRF_ERROR_NO_MEM

<error> app: Fatal error
<warning> app: System reset

You can download my project from here. It is based on "ble_app_uart" example.

I want to add 3 custom services and 1 NUS service at the same time.

Why do I get the "NRF_ERROR_NO_MEM" error?

Edit1: Actually I somehow solved the problem by changing "NRF_SDH_BLE_VS_UUID_COUNT" in "sdk_config.h" from 1 to 2 as stated in the verified answer here. Now PuTTY window seems like this:

<info> app: nrf_ble_qwr_init() returned: NRF_SUCCESS

<info> app: sd_ble_uuid_vs_add() returned: NRF_SUCCESS

<info> app: sd_ble_gatts_service_add() returned: NRF_SUCCESS

<info> app: char_uuid.uuid: 0xBEEF

<info> app: sd_ble_uuid_vs_add() returned: NRF_SUCCESS

<info> app: sd_ble_gatts_characteristic_add() returned: NRF_SUCCESS

<info> app: char_add_with_uuid() returned: NRF_SUCCESS

<info> app: char_uuid.uuid: 0xBEF0

<info> app: sd_ble_uuid_vs_add() returned: NRF_SUCCESS

<info> app: sd_ble_gatts_characteristic_add() returned: NRF_SUCCESS

<info> app: char_add_with_uuid() returned: NRF_SUCCESS

<info> app: char_uuid.uuid: 0xBEF1

<info> app: sd_ble_uuid_vs_add() returned: NRF_SUCCESS

<info> app: sd_ble_gatts_characteristic_add() returned: NRF_SUCCESS

<info> app: char_add_with_uuid() returned: NRF_SUCCESS

<info> app: our_char_add() returned: NRF_SUCCESS

<info> app: ble_nus_init() returned: 0x0

<info> app: ble_nus_init() returned: NRF_SUCCESS

<info> app: Debug logging for UART over RTT started.
<info> app: Fast advertising.
<info> app: BLE_GAP_EVT_CONNECTED

I can see the device that advertising in "SCANNER" tab in nRF Connect. When I click connect, a new tab is opened and after several seconds, you can see "BLE_GAP_EVT_CONNECTED" log. But in nRF Connect, I can't see anything under "CLIENT" tab and it shows "DISCONNECTED" and "NOT BONDED".

Edit2: Actually, I solved the issue while writing the previous edit. I deleted the "NRF_LOG_FLUSH()" lines in the "ble_evt_handler()" function and abracadabra. Problem is solved, I can see all my custom services in the "CLIENT" tab. Do you know what kind of an effect this function could have on an event handler function?

Thanks in advance,

Omer

Parents Reply Children
No Data
Related