network-provisioning-zephyr
Zephyr port of Espressif's network provisioning protocol (Wi-Fi over BLE / SoftAP / console)
Loading...
Searching...
No Matches
scheme_ble.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "network_provisioning/network_prov_mgr.h"
Include dependency graph for scheme_ble.h:

Go to the source code of this file.

Functions

int network_prov_scheme_ble_set_service_uuid (const uint8_t uuid128[16])
 Override the 128-bit GATT service UUID the device advertises and serves.
 
int network_prov_scheme_ble_set_mfg_data (const uint8_t *data, size_t len)
 Set manufacturer-specific data added to the BLE scan response, so a client can match the device on it.
 

Variables

const struct network_prov_scheme network_prov_scheme_ble
 BLE (GATT) transport scheme object.
 

Function Documentation

◆ network_prov_scheme_ble_set_mfg_data()

int network_prov_scheme_ble_set_mfg_data ( const uint8_t *  data,
size_t  len 
)

Set manufacturer-specific data added to the BLE scan response, so a client can match the device on it.

Mirrors network_prov_scheme_ble_set_mfg_data().

Parameters
dataManufacturer data bytes (typically a 2-byte company ID followed by a payload); copied internally. Pass len 0 to clear.
lenLength in bytes; must fit one advertising AD structure.
Returns
0 on success, -EINVAL on bad args, -ENOMEM if len is too large.

◆ network_prov_scheme_ble_set_service_uuid()

int network_prov_scheme_ble_set_service_uuid ( const uint8_t  uuid128[16])

Override the 128-bit GATT service UUID the device advertises and serves.

Per-endpoint characteristic UUIDs are still derived from this base, and the apps map endpoints via the characteristic user-description descriptors, so any unique base works. Mirrors network_prov_scheme_ble_set_service_uuid().

Parameters
uuid12816-byte UUID, little-endian (as produced by BT_UUID_128_ENCODE).
Returns
0 on success, -EINVAL if uuid128 is NULL.
static const uint8_t uuid[16] = { BT_UUID_128_ENCODE(
0x12345678, 0x1234, 0x5678, 0x1234, 0x56789abcdef0) };
"PROV_1234", NULL);
@ NETWORK_PROV_SECURITY_1
Curve25519 key exchange + AES-256-CTR + optional proof-of-possession.
int network_prov_mgr_start_provisioning(enum network_prov_security security, const char *pop, const char *service_name, const char *service_key)
Start the provisioning service on the configured transport: BLE (register the GATT service and advert...
int network_prov_mgr_init(struct network_prov_mgr_config config)
Initialise the provisioning manager.
int network_prov_scheme_ble_set_service_uuid(const uint8_t uuid128[16])
Override the 128-bit GATT service UUID the device advertises and serves.

Variable Documentation

◆ network_prov_scheme_ble

const struct network_prov_scheme network_prov_scheme_ble
extern

BLE (GATT) transport scheme object.

Pass &network_prov_scheme_ble as the scheme of network_prov_mgr_config. Requires CONFIG_NETWORK_PROV_BLE (otherwise referencing it is a link error).