nRF5 SDK for Mesh v4.0.0
GATT provisioning and Proxy (experimental)

Provisioning over GATT and the related Proxy protocol are optional features that allow an unprovisioned device to be provisioned and controlled by a device that cannot support the advertising bearer.

Table of contents

Provisioning over GATT and the Proxy protocol are mainly used by devices such as mobile phones or tablets to:

They can also be used to realize low power devices by excluding the PB-ADV support, as shown in Low Power node example (experimental).

The GATT provisioning bearer (PB-GATT) provisions a device using Proxy PDUs, which are exchanged between the two roles of the Proxy protocol:

The PDU size is determined based on the ATT_MTU. A single Proxy PDU can contain a full message or segments of the message.

For more information about provisioning over GATT, see Mesh Profile Specification, Section 5.2.2, page 229. For more information about the Proxy protocol and the PDUs, see Mesh Profile Specification, Chapter 6, page 260.


PB-GATT provisioning sequence

The following diagram shows how a device is provisioned over GATT and how it then transitions to being a GATT Proxy server.

GATT provisioning and Proxy server behavior

Advertising and provisioning

The device first advertises both non-connectable and connectable Unprovisioned Device beacons:

PB-GATT uses the interface provided in mesh_adv.h for advertising. Immediately after the provisioner has connected to the device, it stops advertising both beacons. The provisioning process starts.

Resetting GATT database

When the provisioning process is complete, the device must reset its GATT database to comply with the Mesh specification requirement of exposing only the Mesh Proxy service.

The reset is done by the helper module mesh_provisionee.c. To reset the database, the SoftDevice is disabled and re-enabled. This means that any application service or setting needs to be re-initialized after provisioning. This is done in the prov_complete_cb() callback from mesh_provisionee.h.

For example, in the Light switch server example:

static void provisioning_complete_cb(void)
__LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Successfully provisioned\n");
/* Restores the application parameters after switching from the Provisioning
* service to the Proxy */
// ...

PB-GATT provisioning support in the nRF5 SDK for Mesh

You can use the following settings to control the support for PB-GATT and GATT-PROXY functionalities in nRF5 SDK for Mesh:

Only the Proxy Server feature is available. The Proxy Client feature is not implemented.

Documentation feedback | Developer Zone | Subscribe | Updated