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

◆ nrf_cloud_coap_shadow_network_info_update()

int nrf_cloud_coap_shadow_network_info_update ( void )

#include <include/net/nrf_cloud_coap.h>

Update the device's shadow with current network information.

This function sends updated network information to nRF Cloud. It can be called at any time to refresh the shadow with current network conditions (for example, after a cell tower handoff, network mode change, or reconnection after network loss).

The network information includes: current band, area code, cell ID, IP address, network mode (LTE-M/NB-IoT), and operator.

Requires CONFIG_NRF_CLOUD_SEND_DEVICE_STATUS_NETWORK to be enabled.

Return values
-EACCESDevice does not have a valid nRF Cloud CoAP connection.
-ENODEVNetwork info sending is not enabled in Kconfig.
Returns
0 If successful, nonzero if failed. Negative values are device-side errors defined in errno.h. Positive values are cloud-side errors (CoAP result codes) defined in zephyr/net/coap.h.