Morse Micro IoT SDK  2.12.3
WLAN Control API for Device Provisioning Protocol (DPP)

Detailed Description

API for executing Device Provisioning Protocol (DPP), also known as Wi-Fi Easy Connect.

Warning
BETA NOTICE: This is a beta API that is under development; breaking changes may be introduced in future releases.

Data Structures

struct  mmwlan_dpp_cb_args
 Structure passed back when a DPP event occurs. More...
 
struct  mmwlan_dpp_qr_args
 Structure to hold the QR enrollee specific arguments for the DPP process. More...
 
struct  mmwlan_dpp_args
 Structure to hold the arguments used for the DPP process. More...
 

Macros

#define MMWLAN_DPP_BOOTSTRAP_KEY_MAX_LEN   128
 Maximum length (in bytes) of a DER-encoded bootstrap private key. More...
 
#define MMWLAN_DPP_ARGS_INIT
 Initializer for mmwlan_dpp_args. More...
 

Enumerations

enum  mmwlan_dpp_mode { MMWLAN_DPP_MODE_PUSH_BUTTON , MMWLAN_DPP_MODE_QR_ENROLLEE }
 Enumeration of DPP modes. More...
 
enum  mmwlan_dpp_event {
  MMWLAN_DPP_EVT_CHIRP_STARTED , MMWLAN_DPP_EVT_CHIRP_STOPPED , MMWLAN_DPP_EVT_PB_STARTED , MMWLAN_DPP_EVT_PB_DISCOVERY ,
  MMWLAN_DPP_EVT_PB_RESULT , MMWLAN_DPP_EVT_AUTH_REQ_RX , MMWLAN_DPP_EVT_AUTH_RESP_TX , MMWLAN_DPP_EVT_AUTH_SUCCESS ,
  MMWLAN_DPP_EVT_AUTH_FAILURE , MMWLAN_DPP_EVT_CONF_REQ_TX , MMWLAN_DPP_EVT_CONF_RECEIVED , MMWLAN_DPP_EVT_CONF_RESULT_TX ,
  MMWLAN_DPP_EVT_CONF_FAILED
}
 Enumeration of DPP events. More...
 
enum  mmwlan_dpp_pb_result { MMWLAN_DPP_PB_RESULT_SUCCESS , MMWLAN_DPP_PB_RESULT_ERROR , MMWLAN_DPP_PB_RESULT_SESSION_OVERLAP }
 Enumeration of results for MMWLAN_DPP_EVT_PB_RESULT. More...
 
enum  mmwlan_dpp_auth_failure_reason { MMWLAN_DPP_AUTH_FAILURE_NO_RESPONSE , MMWLAN_DPP_AUTH_FAILURE_NO_CONFIRM , MMWLAN_DPP_AUTH_FAILURE_INIT_FAILED }
 Reason codes for MMWLAN_DPP_EVT_AUTH_FAILURE. More...
 
enum  mmwlan_dpp_conf_failure_reason { MMWLAN_DPP_CONF_FAILURE_RESPONSE_ERROR , MMWLAN_DPP_CONF_FAILURE_TIMEOUT , MMWLAN_DPP_CONF_FAILURE_RESULT_TIMEOUT }
 Reason codes for MMWLAN_DPP_EVT_CONF_FAILED. More...
 

Functions

enum mmwlan_status mmwlan_dpp_start (const struct mmwlan_dpp_args *args)
 Function to start the Device Provisioning Protocol (DPP) process. More...
 
enum mmwlan_status mmwlan_dpp_stop (void)
 Function to stop the DPP process. More...
 
enum mmwlan_status mmwlan_dpp_get_uri (char *uri_buf, size_t buf_len)
 Retrieve the DPP bootstrap URI for the current QR enrollee session. More...
 

Macro Definition Documentation

◆ MMWLAN_DPP_ARGS_INIT

#define MMWLAN_DPP_ARGS_INIT
Value:
{ \
.dpp_event_cb = NULL, \
.dpp_event_cb_arg = NULL, \
.qr = { 0 }, \
}
@ MMWLAN_DPP_MODE_PUSH_BUTTON
DPP Push Button mode.
Definition: mmwlan.h:1584

Initializer for mmwlan_dpp_args.

See also
mmwlan_dpp_args

Definition at line 1824 of file mmwlan.h.

◆ MMWLAN_DPP_BOOTSTRAP_KEY_MAX_LEN

#define MMWLAN_DPP_BOOTSTRAP_KEY_MAX_LEN   128

Maximum length (in bytes) of a DER-encoded bootstrap private key.

Definition at line 1752 of file mmwlan.h.

Enumeration Type Documentation

◆ mmwlan_dpp_auth_failure_reason

Reason codes for MMWLAN_DPP_EVT_AUTH_FAILURE.

Warning
BETA NOTICE: This is a beta API that is under development; breaking changes may be introduced in future releases.
Enumerator
MMWLAN_DPP_AUTH_FAILURE_NO_RESPONSE 

Responder never replied to the Authentication Request.

MMWLAN_DPP_AUTH_FAILURE_NO_CONFIRM 

Authentication confirmation was not received in time.

MMWLAN_DPP_AUTH_FAILURE_INIT_FAILED 

Exhausted all retry attempts without a response.

Definition at line 1654 of file mmwlan.h.

◆ mmwlan_dpp_conf_failure_reason

Reason codes for MMWLAN_DPP_EVT_CONF_FAILED.

Warning
BETA NOTICE: This is a beta API that is under development; breaking changes may be introduced in future releases.
Enumerator
MMWLAN_DPP_CONF_FAILURE_RESPONSE_ERROR 

Config response contained an error status.

MMWLAN_DPP_CONF_FAILURE_TIMEOUT 

Timed out waiting for the config response.

MMWLAN_DPP_CONF_FAILURE_RESULT_TIMEOUT 

Timed out waiting for the DPP2 Configuration Result.

Definition at line 1670 of file mmwlan.h.

◆ mmwlan_dpp_event

Enumeration of DPP events.

Warning
BETA NOTICE: This is a beta API that is under development; breaking changes may be introduced in future releases.
Enumerator
MMWLAN_DPP_EVT_CHIRP_STARTED 

QR enrollee began broadcasting presence announcements.

MMWLAN_DPP_EVT_CHIRP_STOPPED 

QR enrollee presence announcement process has stopped.

MMWLAN_DPP_EVT_PB_STARTED 

Push Button enrollment started (enrollee).

MMWLAN_DPP_EVT_PB_DISCOVERY 

Push Button configurator discovered.

MMWLAN_DPP_EVT_PB_RESULT 

DPP push button result.

This will only occur in MMWLAN_DPP_MODE_PUSH_BUTTON mode.

MMWLAN_DPP_EVT_AUTH_REQ_RX 

Enrollee received and validated a DPP Authentication Request.

MMWLAN_DPP_EVT_AUTH_RESP_TX 

Enrollee sent a DPP Authentication Response.

MMWLAN_DPP_EVT_AUTH_SUCCESS 

DPP authentication phase succeeded (both PB and QR flows).

MMWLAN_DPP_EVT_AUTH_FAILURE 

DPP authentication could not complete.

MMWLAN_DPP_EVT_CONF_REQ_TX 

Enrollee sent a DPP Configuration Request.

MMWLAN_DPP_EVT_CONF_RECEIVED 

DPP configuration received (any DPP mode).

MMWLAN_DPP_EVT_CONF_RESULT_TX 

Enrollee sent a DPP Configuration Result (DPP2+).

MMWLAN_DPP_EVT_CONF_FAILED 

Configuration exchange failed after authentication succeeded.

Definition at line 1595 of file mmwlan.h.

◆ mmwlan_dpp_mode

Enumeration of DPP modes.

Warning
BETA NOTICE: This is a beta API that is under development; breaking changes may be introduced in future releases.
Enumerator
MMWLAN_DPP_MODE_PUSH_BUTTON 

DPP Push Button mode.

MMWLAN_DPP_MODE_QR_ENROLLEE 

DPP QR Code Enrollee mode.

Definition at line 1581 of file mmwlan.h.

◆ mmwlan_dpp_pb_result

Enumeration of results for MMWLAN_DPP_EVT_PB_RESULT.

Warning
BETA NOTICE: This is a beta API that is under development; breaking changes may be introduced in future releases.
Enumerator
MMWLAN_DPP_PB_RESULT_SUCCESS 

DPP push button process was successful.

MMWLAN_DPP_PB_RESULT_ERROR 

An error occurred during the DPP push button process.

MMWLAN_DPP_PB_RESULT_SESSION_OVERLAP 

A session overlap occurred during the DPP push button process.

Definition at line 1638 of file mmwlan.h.

Function Documentation

◆ mmwlan_dpp_get_uri()

enum mmwlan_status mmwlan_dpp_get_uri ( char *  uri_buf,
size_t  buf_len 
)

Retrieve the DPP bootstrap URI for the current QR enrollee session.

Warning
BETA NOTICE: This is beta API that is under development; breaking changes may be introduced in future releases.

This can be called after DPP has successfully started in QR Enrollee mode (see mmwlan_dpp_start()). The URI is derived from the bootstrap private key and can be encoded as a QR code for scanning by a DPP configurator.

Parameters
[out]uri_bufBuffer to copy the null-terminated URI string into.
buf_lenSize of uri_buf in bytes.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_dpp_start()

enum mmwlan_status mmwlan_dpp_start ( const struct mmwlan_dpp_args args)

Function to start the Device Provisioning Protocol (DPP) process.

Warning
BETA NOTICE: This is a beta API that is under development; breaking changes may be introduced in future releases.

This function will return once DPP has successfully started. Feedback will be provided via the dpp_event_cb.

Warning
If this function has been called, mmwlan_dpp_stop() MUST be called before mmwlan_shutdown() is called.
Parameters
argsReference to the dpp arguments to use.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_dpp_stop()

enum mmwlan_status mmwlan_dpp_stop ( void  )

Function to stop the DPP process.

Warning
BETA NOTICE: This is a beta API that is under development; breaking changes may be introduced in future releases.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.