nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
azure_iot_hub_dps.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
11#ifndef AZURE_IOT_HUB_DPS__
12#define AZURE_IOT_HUB_DPS__
13
14#include <stdint.h>
15#include <net/azure_iot_hub.h>
16
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31
35};
36
41
46
52
58};
59
72
73/* @brief Start Device Provisioning Service (DPS) to obtain device ID and assigmnent
74 * to an IoT hub. The information can later be used to connect to the assigned IoT hub.
75 *
76 * @retval 0 if successful.
77 * @retval -EACCESS if the library is in the wrong state to start DPS.
78 * @retval -EALREADY if DPS has already started and is ongoing.
79 */
81
94
101
114
121
131
132#ifdef __cplusplus
133}
134#endif
135
140#endif /* AZURE_IOT_HUB_DPS__ */
Azure IoT Hub library.
static const struct event_proxy_config cfg
Definition: event_proxy_def.h:28
void(* azure_iot_hub_dps_handler_t)(enum azure_iot_hub_dps_reg_status status)
The handler will be called when registration is done, be it successfully or if it fails.
Definition: azure_iot_hub_dps.h:40
int azure_iot_hub_dps_device_id_delete(void)
Delete the assigned device ID.
int azure_iot_hub_dps_init(struct azure_iot_hub_dps_config *cfg)
Initialize Azure IoT hub Device Provisioning Service (DPS).
azure_iot_hub_dps_reg_status
Device Provisioning Service registration status.
Definition: azure_iot_hub_dps.h:28
@ AZURE_IOT_HUB_DPS_REG_STATUS_FAILED
Definition: azure_iot_hub_dps.h:34
@ AZURE_IOT_HUB_DPS_REG_STATUS_ASSIGNED
Definition: azure_iot_hub_dps.h:33
@ AZURE_IOT_HUB_DPS_REG_STATUS_NOT_STARTED
Definition: azure_iot_hub_dps.h:30
@ AZURE_IOT_HUB_DPS_REG_STATUS_ASSIGNING
Definition: azure_iot_hub_dps.h:32
int azure_iot_hub_dps_device_id_get(struct azure_iot_hub_buf *buf)
Get the currently assigned device ID.
int azure_iot_hub_dps_hostname_get(struct azure_iot_hub_buf *buf)
Get the hostname of the currently assigned Azure IoT Hub as a terminated string.
int azure_iot_hub_dps_reset(void)
Reset DPS library. All stored information about assigned IoT Hub is deleted. After this call,...
int azure_iot_hub_dps_hostname_delete(void)
Delete the hostname of the currently assigned Azure IoT Hub.
int azure_iot_hub_dps_start(void)
Definition: azure_iot_hub.h:180
struct azure_iot_hub_buf id_scope
Definition: azure_iot_hub_dps.h:51
struct azure_iot_hub_buf reg_id
Definition: azure_iot_hub_dps.h:57
azure_iot_hub_dps_handler_t handler
Definition: azure_iot_hub_dps.h:45
Device Provisioning Service configuration structure.
Definition: azure_iot_hub_dps.h:43