Wirepas SDK
local_provisioning.h
Go to the documentation of this file.
1 /* Copyright 2021 Wirepas Ltd. All Rights Reserved.
2  *
3  * See file LICENSE.txt for full license details.
4  *
5  */
6 
13 #ifndef _LOCAL_PROVISIONING_H_
14 #define _LOCAL_PROVISIONING_H_
15 
16 #include <stdint.h>
17 #include <api.h>
18 
19 typedef enum {
27 
31 typedef struct{
32  uint32_t id; //< Id of the key used in joining beacons to ease the matching
33  uint8_t psk[32]; //< 128 bit pre shared key
35 
46 typedef const app_lib_joining_received_beacon_t *
47  (*local_provisioning_joining_beacon_selection_f)
48  (const app_lib_joining_received_beacon_t * beacons);
49 
56 typedef void (*local_provisioning_proxy_enabled_cb)(bool enabled);
57 
70 typedef bool (*local_provisioning_joining_done_cb)(bool success);
71 
84  local_provisioning_proxy_enabled_cb on_proxy_enabled_cb);
85 
95 
109 
115 
116 #endif //_LOCAL_PROVISIONING_H_
Local_provisioning_is_provisioned
bool Local_provisioning_is_provisioned()
Is the node provisioned A node is considered provisioned if it has a valid config with network securi...
Local_provisioning_reset_node
void Local_provisioning_reset_node()
Reset all node settings.
Local_provisioning_res_e
Local_provisioning_res_e
Definition: local_provisioning.h:19
LOCAL_PROVISIONING_RES_WRONG_STATE
@ LOCAL_PROVISIONING_RES_WRONG_STATE
Definition: local_provisioning.h:22
local_provisioning_psk_t
Pre shared key structure.
Definition: local_provisioning.h:31
local_provisioning_joining_done_cb
bool(* local_provisioning_joining_done_cb)(bool success)
Callback to be notified when local provisioning joining is finished It is an information for app.
Definition: local_provisioning.h:70
local_provisioning_joining_beacon_selection_f
const typedef app_lib_joining_received_beacon_t *(* local_provisioning_joining_beacon_selection_f)(const app_lib_joining_received_beacon_t *beacons)
Selects which joining beacon to connect to at the end of a scan.
Definition: local_provisioning.h:48
Local_provisioning_init
Local_provisioning_res_e Local_provisioning_init(local_provisioning_psk_t *psk, local_provisioning_proxy_enabled_cb on_proxy_enabled_cb)
Initialize the Local provisioning library.
Local_provisioning_start_joining
Local_provisioning_res_e Local_provisioning_start_joining(local_provisioning_joining_beacon_selection_f cb_beacons, local_provisioning_joining_done_cb cb_end)
Start a joining session Node will start a joining request.
local_provisioning_proxy_enabled_cb
void(* local_provisioning_proxy_enabled_cb)(bool enabled)
Callback to be notified when proxy is enabled It is an information for app. It can be used to blink a...
Definition: local_provisioning.h:56
LOCAL_PROVISIONING_RES_INTERNAL_ERROR
@ LOCAL_PROVISIONING_RES_INTERNAL_ERROR
Definition: local_provisioning.h:23
local_provisioning_psk_t::id
uint32_t id
Definition: local_provisioning.h:32
LOCAL_PROVISIONING_RES_UNPROVISIONED
@ LOCAL_PROVISIONING_RES_UNPROVISIONED
Definition: local_provisioning.h:24
LOCAL_PROVISIONING_RES_UNINTIALLIZED
@ LOCAL_PROVISIONING_RES_UNINTIALLIZED
Definition: local_provisioning.h:21
LOCAL_PROVISIONING_RES_SUCCESS
@ LOCAL_PROVISIONING_RES_SUCCESS
Definition: local_provisioning.h:20
api.h
LOCAL_PROVISIONING_RES_ALREADY_PROVISIONED
@ LOCAL_PROVISIONING_RES_ALREADY_PROVISIONED
Definition: local_provisioning.h:25