nRF5 IoT SDK  v0.9.0
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
BLE Commissioning Profile

The Commissioning Profile is an example of a proprietary profile that can be used to add nodes to a network using Bluetooth low energy (BLE). This profile is not a standard profile. It is defined by Nordic Semiconductor to demonstrate how commissioning can be achieved.

The Commissioning Profile is used to transfer settings from a BLE central (for example, a smartphone) to a BLE peripheral (a leaf node) that is to be added to a network. The BLE central is used as a trusted third party (TTP) between the BLE peripheral and the router.

Profile dependencies: This profile requires the Generic Attribute Profile (GATT).

Configuration

Roles

The profile defines the following two roles:

  • The node, which implements a GATT server. This is the device that is configured by the TTP.
  • The TTP, which implements a GATT client. This is the device that transfers configuration data to the node.

Role/service relationships

The following diagram shows the relationships between services and the two profile roles.

commissioning_ble_roles_overview.png
Figure 1. Relationship between profile roles and services

A node instantiates one instance of the Node Configuration Service.

TTP role requirements

The TTP shall support the BLE Node Configuration Service.

Service Trusted Third Party
Node Configuration Service M

General error handling

The TTP shall be tolerant when receiving the following ATT Error Codes defined by the application:

Name Error Code
Node Configuration Incomplete 0x81
Unknown Opcode 0x82

Configuration procedure

The TTP configures the node by writing the characteristics of the GATT database. Based on the desired mode, the TTP may need to write the Commissioning SSID and the Commissioning Keys Store characteristics first, using the GATT Write procedure. The TTP requests one of the modes that are defined for the node using the Commissioning Control Point. Each mode requested by the TTP is characterized by an Opcode that is written to the Commissioning Control Point, using the GATT Write procedure. Writing the Commissioning Control Point ends the procedure.

All modes defined for the node are listed below.

Node modes Description
Joining mode The node enters connectable mode to accept a connection request from the router to join the network. Must be preceeded by writing the Commissioning SSID and the Commissioning Keys Store characteristics.
Configuration mode The node enters connectable mode to accept a connection request from a TTP.
Identity mode If the hardware allows it, the node changes its appearence to make itself known by the user.

See Commissioning Control Point for more information about the modes.

When the DFU target is in DFU mode, it is in GAP General Discoverable mode and is connectable. The 16-bit alias of the Node Configuration Service UUID is advertised in the advertisement data, along with the full name (NodeCFG).

The following message sequence chart shows a typical commissioning procedure between a TTP and a node.

msc_commissioning_profile_typical
Figure 2. Commissioning procedure

Security considerations

All supported characteristics specified by the Node Configuration Service on the target are set to Security Mode 1 and Security Level 1.