nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches

◆ nrf_provisioning_set_interval()

int nrf_provisioning_set_interval ( int interval)

#include <include/net/nrf_provisioning.h>

Set provisioning interval for scheduled provisioning.

Configures the interval between automatic provisioning attempts when CONFIG_NRF_PROVISIONING_SCHEDULED is enabled. If scheduled provisioning is active, this will reschedule the next attempt based on the new interval.

The interval is persistent and stored in settings. It will be restored across device reboots. The actual provisioning time may include a random spread to distribute server load (controlled by CONFIG_NRF_PROVISIONING_SPREAD_S).

Note
This function requires CONFIG_NRF_PROVISIONING_SCHEDULED to be enabled. The interval is capped at CONFIG_NRF_PROVISIONING_INTERVAL_S.
Parameters
intervalProvisioning interval in seconds. Must be greater than or equal to 0. Values less than the minimum interval may be adjusted internally. A value of 0 disables scheduled provisioning.
Return values
0on success.
-EFAULTif the library is not initialized or unable to convert interval to string format.
-EINVALif interval is negative.
-ENOTSUPif CONFIG_NRF_PROVISIONING_SCHEDULED is not enabled.
-ENOSTRif unable to store interval in settings.