Modbus Vault v1.0
Loading...
Searching...
No Matches
ble_provisioner.c File Reference

Implementation of the BLE provisioner. More...

#include "ble_provisioner.h"
#include "esp_event.h"
#include "esp_log.h"
#include "esp_netif.h"
#include "esp_system.h"
#include "esp_wifi.h"
#include "nvs_manager.h"
#include "sdkconfig.h"
#include <network_provisioning/manager.h>
#include <network_provisioning/scheme_ble.h>
#include <string.h>
Include dependency graph for ble_provisioner.c:

Functions

static void provisioning_event_handler (void *arg_ptr, esp_event_base_t event_base, int32_t event_id, void *event_data_ptr)
 Handle provisioning events.
 
esp_err_t ble_provisioner_start (void)
 Start BLE provisioner.
 

Variables

static const char * TAG = "BLE_PROV"
 

Detailed Description

Implementation of the BLE provisioner.

Author
Abanoub Salah
  • Bootstraps a WiFi station with event handler for receiving creds
  • Only handles provision events
  • Configure provisioner for BLE and sec1
  • Starts provisioner
  • Restarts after successful provisioning

Function Documentation

◆ ble_provisioner_start()

esp_err_t ble_provisioner_start ( void  )

Start BLE provisioner.

Returns
esp_err_t provisioning result
Return values
ESP_OKProvision success
ESP_FAILProvision fail
ESP_ERR_INVALID_ARGProvided invalid argument(s)
ESP_ERR_INVALID_STATEConfiguration in invalid state
ESP_ERR_NO_MEMNo available memory for resource allocation
Here is the call graph for this function:
Here is the caller graph for this function:

◆ provisioning_event_handler()

static void provisioning_event_handler ( void *  arg_ptr,
esp_event_base_t  event_base,
int32_t  event_id,
void *  event_data_ptr 
)
static

Handle provisioning events.

Parameters
arg_ptrPointer to args
event_baseEvent base
event_idEvent ID
event_data_ptrPointer to event data
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ TAG

const char* TAG = "BLE_PROV"
static

BLE Provisioner TAG name