Commissioning module.
More...
|
enum | joining_mode_timer_ctrl_cmd_t {
JOINING_MODE_TIMER_START = 0x01,
JOINING_MODE_TIMER_STOP_RESET = 0x02
} |
| Joining mode timer control commands.
|
|
Commissioning module.
Enables commissioning of the node by managing transitions between the Config, Joining, and Identity modes. In Config mode the node can be configured with the settings required to join the network in Joining mode. The Identity mode can be requested to make the node easily recognizeable for the user. The settings managed by the module are stored in persistent storage.
#define COMMISSIONING_EVT_CONFIG_MODE_ENTER 0x01 |
Indicates that the medium entered mode for commissioning configuration.
#define COMMISSIONING_EVT_IDENTITY_MODE_ENTER 0x03 |
Indicates that identity mode was requested.
#define COMMISSIONING_EVT_IDENTITY_MODE_EXIT 0x04 |
Indicates that the node should stop using any features associated with the Identity mode.
#define COMMISSIONING_EVT_JOINING_MODE_ENTER 0x02 |
Indicates that the medium exited mode for commissioning configuration.
#define COMMISSIONING_TICK_INTERVAL_SEC 1 |
Interval between periodic callbacks to the Commissioning module.
#define COMPANY_IDENTIFIER 0x0059 |
Company identifier for Nordic Semiconductor ASA as per www.bluetooth.org.
#define NODE_MODE_CONFIG 0x02 |
Node mode: configuration.
#define NODE_MODE_IDENTITY 0x03 |
Node mode: conspicuous for the user.
#define NODE_MODE_JOINING 0x01 |
Node mode: joining the network.
#define NODE_MODE_NONE 0x00 |
Node mode: before initialization.
Function for getting the address of advertising parameters for the active mode.
- Parameters
-
[out] | pp_node_adv_params | Address of advertising parameters for the active mode. |
void commissioning_ble_evt_handler |
( |
const ble_evt_t * |
p_ble_evt | ) |
|
Function for handling BLE events.
This function must be called from the BLE stack event dispatcher to handle BLE events that are relevant for the Commissioning module.
- Parameters
-
[in] | p_ble_evt | BLE stack event. |
Function for getting the address of GAP parameters for the active mode.
- Parameters
-
[out] | pp_node_gap_params | Address of GAP parameters for the active mode. |
Function for initializing the Commissioning module.
Initializes the Node Configuration Service module to create the GATT database. Loads previously stored node settings from the persistent storage and if the settings are valid, sets up the node to start in the right mode.
- Parameters
-
[in] | p_init_param | Pointer to the initialization parameters. |
[out] | p_poweron_state | Pointer to the value of the mode that should be started. |
- Return values
-
NRF_SUCCESS | If initialization was successful. Otherwise, a propagated error code is returned. |
Function for controlling the joining mode timer from the parent layer(s).
If the Joining mode timer reaches zero, the node must enter the state-on-failure, as set by the user. This funtion allows the application designer to control the Joining mode timer from the application layer.
void commissioning_node_mode_change |
( |
uint8_t |
new_mode | ) |
|
Function for advancing the node to a new mode.
Stops and starts app timers appropriate for the mode requested. Propagates the mode change event to the parent layer.
- Parameters
-
[in] | new_mode | New mode to start. |
void commissioning_settings_clear |
( |
void |
| ) |
|
Function for clearing all node settings from the persistent storage.
Calls the appropriate persistent storage interface function to clear all commissioning-related settings from the persistent storage.
Commissioning time tick used for measuring delays and time between events.
- Parameters
-
[in] | wall_clock_value | Wall clock value from the IoT Timer module. |