Z-Wave Protocol Controller Reference

Wrap LIBS2 inclusion functionality. More...

Collaboration diagram for Security 2 Network:

Classes

struct  zwave_s2_network_callbacks
 

Typedefs

typedef struct zwave_s2_network_callbacks zwave_s2_network_callbacks_t
 

Functions

void zwave_s2_network_init ()
 Initialize the S2 network layer. More...
 
void zwave_s2_set_network_callbacks (const zwave_s2_network_callbacks_t *cb)
 Set callback function for the S2 inclusion. This structure is copied internally. More...
 
void zwave_s2_start_learn_mode (zwave_node_id_t node_id)
 Start the S2 learn mode. More...
 
void zwave_s2_neighbor_discovery_complete ()
 
void zwave_s2_start_add_node (zwave_node_id_t node_id)
 Start the S2 add node process. More...
 
void zwave_s2_key_grant (bool accept, uint8_t keys, bool csa)
 Must be called as a response to the on_keys_request callback. More...
 
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. More...
 
void zwave_s2_abort_join ()
 
void zwave_s2_refresh_home_id (zwave_home_id_t current_home_id)
 Update the homeID for the S2 engine. More...
 

Detailed Description

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.

Typedef Documentation

◆ zwave_s2_network_callbacks_t

Function Documentation

◆ 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.

Here is the caller graph for this function:

◆ 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
acceptTrue if we should accept keys request
dskMissing part of the dsk which the user has provided.
lenThe number of bytes the user has provided.
Here is the caller graph for this function:

◆ 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
acceptTrue if we should accept keys request
keysSet of keys to grant.
csaTrue if we allow for client side inclusion
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ 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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_s2_refresh_home_id()

void zwave_s2_refresh_home_id ( zwave_home_id_t  current_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_idOur current HomeID
Here is the caller graph for this function:

◆ zwave_s2_set_network_callbacks()

void zwave_s2_set_network_callbacks ( const zwave_s2_network_callbacks_t cb)

Set callback function for the S2 inclusion. This structure is copied internally.

Parameters
cb
Here is the caller graph for this function:

◆ zwave_s2_start_add_node()

void zwave_s2_start_add_node ( zwave_node_id_t  node_id)

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_idThe node we wish to include
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_s2_start_learn_mode()

void zwave_s2_start_learn_mode ( zwave_node_id_t  node_id)

Start the S2 learn mode.

This function will open up the S2 FSM for being included into a new network.

Parameters
node_idThe node ID of the controller which is allowed to grant keys.
Here is the call graph for this function:
Here is the caller graph for this function: