nRF52811: settings_save_one() returns -2 / -116 while storing device name and BLE passkey issue (Settings + NVS backend)

Hi Team,

I am working on an nRF52811-based BLE application using nRF Connect SDK (Zephyr) and facing an issue while trying to store the device name in flash using the Settings subsystem with NVS backend.

The API call:

settings_save_one("device/name",device_name,strlen(device_name) + 1);

is failing and returning the following error codes:

-2 (ENOENT)
-116 (ENOTSUP)
As a result, the device name is not being saved to flash memory.

Observed Behavior
settings_subsys_init() → returns 0
settings_load() → returns 0
settings_save_one() → returns -2 / -116
Flash write operation does not occur
In proj.conf

CONFIG_SETTINGS=y
CONFIG_SETTINGS_NVS=y
CONFIG_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_FLASH_PAGE_LAYOUT=y
(Additional settings were tested such as CONFIG_SETTINGS_RUNTIME=y and CONFIG_SETTINGS_NVS_SECTOR_COUNT=2, but enabling them causes build errors.)

I have attached:

nrf52811_custom.dts
prj.conf
for review.

Kindly help clarify the following:

Is any additional configuration required for Settings + NVS backend initialization on nRF52811?
Are there any known limitations of the Settings subsystem or NVS on nRF52811 (flash size / partition constraints)?
Could this issue be related to incorrect flash partitioning or missing backend registration?
Why does settings_save_one() return -116 (ENOTSUP) in this configuration?


Issue 2: BLE Passkey / pairing issue:

please give the procedure for passkey.

passkey related questions:

What is the correct configuration for passkey authentication (Just Works vs Passkey Entry) in nRF52811 using NCS?
Are there any required settings for enabling:
CONFIG_BT_SMP
CONFIG_BT_BONDING
CONFIG_BT_FIXED_PASSKEY / I/O capabilities?
Could this issue be related to missing security level configuration or SMP setup?
Is there any limitation of passkey authentication on nRF52811 in Zephyr/NCS?
nrf52811_custom.dts570246.prj.conf

Related