#include <src/adaptations/device-layer/include/Weave/DeviceLayer/internal/FactoryProvisioning.h>

Supports device factory provisioning at boot time.


The factory provisioning feature allows factory or developer-supplied provisioning information to be injected into a device at boot time and automatically stored in persistent storage. Provisioning information is written into device memory (typically RAM) by an external tool, where it is picked by the OpenWeave initialization code and stored into persistent storage early in the boot process.

The factory provisioning feature allows the following values to be set:

  • Device Serial number
  • Manufacturer-assigned Device Id
  • Manufacturer-assigned Device Certificate
  • Manufacturer-assigned Device Key
  • Pairing Code
  • Product Revision
  • Manufacturing Date

This template class provides a default base implementation of the device provisioning feature that can be specialized as needed by compile-time derivation.

Public functions

ProvisionDeviceFromRAM(uint8_t *memRangeStart, uint8_t *memRangeEnd)

Protected functions

LocateProvisioningData(uint8_t *memRangeStart, uint8_t *memRangeEnd, uint8_t *& dataStart, size_t & dataLen)
StoreProvisioningData(TLV::TLVReader & reader)
StoreProvisioningValue(uint8_t tagNum, TLV::TLVReader & reader)

Public functions


WEAVE_ERROR ProvisionDeviceFromRAM(
  uint8_t *memRangeStart,
  uint8_t *memRangeEnd

Protected functions


bool LocateProvisioningData(
  uint8_t *memRangeStart,
  uint8_t *memRangeEnd,
  uint8_t *& dataStart,
  size_t & dataLen


WEAVE_ERROR StoreProvisioningData(
  TLV::TLVReader & reader


WEAVE_ERROR StoreProvisioningValue(
  uint8_t tagNum,
  TLV::TLVReader & reader