Wrap LIBS2 inclusion functionality.
More...
Wrap LIBS2 inclusion functionality.
The main purpose of this module is to wrap the LIBS2 inclusion functions. Here, the S2 inclusion is split into a set of callbacks, which are used by the zwave_network_managemnt component. All S2 functionality, which is related to properties of the Z-Wave network is handled here.
◆ zwave_s2_network_callbacks_t
◆ zwave_s2_abort_join()
| void zwave_s2_abort_join |
( |
| ) |
|
Abort the current secure add /learn, the on_inclusion_complete callback will be called when the inclusion has stopped.
◆ zwave_s2_dsk_accept()
| void zwave_s2_dsk_accept |
( |
bool |
accept, |
|
|
uint8_t * |
dsk, |
|
|
uint8_t |
len |
|
) |
| |
Must be called as a response to the on_dsk_challenge callbacks.
- Parameters
-
| accept | True if we should accept keys request |
| dsk | Missing part of the dsk which the user has provided. |
| len | The number of bytes the user has provided. |
◆ zwave_s2_key_grant()
| void zwave_s2_key_grant |
( |
bool |
accept, |
|
|
uint8_t |
keys, |
|
|
bool |
csa |
|
) |
| |
Must be called as a response to the on_keys_request callback.
- Parameters
-
| accept | True if we should accept keys request |
| keys | Set of keys to grant. |
| csa | True if we allow for client side inclusion |
◆ zwave_s2_neighbor_discovery_complete()
| void zwave_s2_neighbor_discovery_complete |
( |
| ) |
|
Tell LIBS2 that the gateway has been included (i.e., to start the TB1 timer). This must be called on the "protocol done" inclusion event. See zwapi_add_node_to_network.
◆ zwave_s2_network_init()
| void zwave_s2_network_init |
( |
| ) |
|
Initialize the S2 network layer.
This function must be called when ever the home ID or node ID of the controller changes.
◆ zwave_s2_refresh_home_id()
Update the homeID for the S2 engine.
During learn mode we can get into the situation where the home id changes durring the first part of the S2 bootstrapping This function allows for setting the home id while the inclusion FSM is running.
- Parameters
-
| current_home_id | Our current HomeID |
◆ zwave_s2_set_network_callbacks()
Set callback function for the S2 inclusion. This structure is copied internally.
- Parameters
-
◆ zwave_s2_start_add_node()
Start the S2 add node process.
Calling this function will make the S2 FSM start the inclusion process of a newly added node. This must be called right after ADD_NODE_DONE event for nodes supporting COMMAND_CLASS_SECURITY2
- Parameters
-
| node_id | The node we wish to include |
◆ zwave_s2_start_learn_mode()
Start the S2 learn mode.
This function will open up the S2 FSM for being included into a new network.
- Parameters
-
| node_id | The node ID of the controller which is allowed to grant keys. |