![]() |
Morse Micro IoT SDK
2.12.3
|
DPP example application.
This example demonstrates DPP provisioning in both Push Button and QR Code Enrollee modes.
The mode is selected via the dpp.mode config key:
"pb" (default) - Push Button mode"qr" - QR Code Enrollee modeFor QR mode, a DER-encoded P-256 bootstrap private key may be provisioned at dpp.bootstrap_key. If not set, a fresh key pair is generated automatically and the DPP URI is printed on startup so it can be provided to a configurator.
Definition in file dpp.c.
#include <stdio.h>#include <string.h>#include "mmutils.h"#include "mmosal.h"#include "mmwlan.h"#include "mmconfig.h"#include "mm_app_common.h"
Go to the source code of this file.
Macros | |
| #define | DPP_TIMEOUT_MS (200 * 1000) |
| Timeout in milliseconds to wait for DPP provisioning to complete. More... | |
| #define | DPP_URI_MAX_LEN 256 |
| Maximum length of the DPP URI string. More... | |
Functions | |
| static const char * | mmwlan_dpp_pb_result_to_string (enum mmwlan_dpp_pb_result result) |
| Convert a DPP push button result code to its string representation. More... | |
| static const char * | mmwlan_dpp_auth_failure_reason_to_string (enum mmwlan_dpp_auth_failure_reason reason) |
| Convert a DPP authentication failure reason to its string representation. More... | |
| static const char * | mmwlan_dpp_conf_failure_reason_to_string (enum mmwlan_dpp_conf_failure_reason reason) |
| Convert a DPP configuration failure reason to its string representation. More... | |
| static void | dpp_store_credentials (const struct mmwlan_dpp_cb_args *dpp_event, struct mmosal_semb *semb) |
| Store received DPP credentials to mmconfig and signal completion. More... | |
| static void | dpp_event_handler (const struct mmwlan_dpp_cb_args *dpp_event, void *arg) |
| DPP event handler. More... | |
| void | app_init (void) |
| Main entry point to the application. More... | |
| #define DPP_TIMEOUT_MS (200 * 1000) |
| #define DPP_URI_MAX_LEN 256 |
| void app_init | ( | void | ) |
|
static |
|
static |
|
static |
Convert a DPP authentication failure reason to its string representation.
| reason | The enumeration value of type mmwlan_dpp_auth_failure_reason to be converted. |
|
static |
Convert a DPP configuration failure reason to its string representation.
| reason | The enumeration value of type mmwlan_dpp_conf_failure_reason to be converted. |
|
static |
Convert a DPP push button result code to its string representation.
| result | The enumeration value of type mmwlan_dpp_pb_result to be converted. |