sd_ble_gap_adv_set_configure No Memory for operation

Hi all,

Im working with CODED PHY (Long Range). There was no settings for primary and secondary channel so I added it like below. The previous solution worked with BLE_GAP_PHY_AUTO it means BLE_GAP_PHY_1MBPS as default.

I added the piece of configuration. Before there was only timing related configuration, nothing more and it works fine

nrfAdvertisementParameters.secondary_phy = BLE_GAP_PHY_CODED;
nrfAdvertisementParameters.primary_phy = BLE_GAP_PHY_CODED;
nrfAdvertisementParameters.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED;
nrfAdvertisementParameters.filter_policy = BLE_GAP_ADV_FP_ANY;

Now Im getting the error: "No Memory for operation". 

#define NRF_ERROR_NO_MEM                      (NRF_ERROR_BASE_NUM + 4)  ///< No Memory for operation

Below there is printscreen for debug session. Adv_data and scan_respo_data has a length of 31.

Should I increase the RAM amount for SoftDevice or it is other issue?

I Changed only advertising parameter with no changes for data packets.

  • Hi,

    Do you allready have an existing advertising set? While the API gives the impression multiple sets are supported, that is not the case. So if you try to configure a new set, you will get NRF_ERROR_NO_MEM returned from sd_ble_gap_adv_set_configure. This is a limitation in the SoftDevice, and allocating more memory to the SoftDevice will not help.

  • I added messages via the serial port. This way I don't have to run the code in debug mode. I got my answer. Working with the debugger causes an out of memory error. I do not know why. SofdDevice functions run only once. Currently I have a problem with error code 0x07 NRF_ERROR_INVALID_PARAM but despite this error the BLE device works according to the parameters.

  • I added messages via the serial port. This way I don't have to run the code in debug mode. I got my answer. Working with the debugger causes an out of memory error. I do not know why. SofdDevice functions run only once. Currently I have a problem with error code 0x07 NRF_ERROR_INVALID_PARAM but despite this error the BLE device works according to the parameters.

  • Hi,

    BartoszT said:
    Working with the debugger causes an out of memory error. I do not know why. SofdDevice functions run only once.

    The SoftDevice is timing critical, and it will assert if you step in the code or continue from a break-point. So if debugging with a SoftDevice, you need to reset instead of continuing after a breakpoint.

    BartoszT said:
    Currently I have a problem with error code 0x07 NRF_ERROR_INVALID_PARAM but despite this error the BLE device works according to the parameters.

    Which function returns NRF_ERROR_INVALID_PARAM and which parameters do you provide to it (including the content of any structs passed)?

Related