Z-Wave Protocol Controller Reference
Security 0 Transport

Transport for Security 0. More...

Collaboration diagram for Security 0 Transport:

Modules

 Security 0 Network
 Interface for requesting S0 bootstrapping of a node and resistering callbacks to get notified when the S0 bootstrapping has failed or succeeded.
 
 Security 0 Inclusion state machine
 Interface to Z-Wave S0 Inclusion State Machine.
 
 Security 0 Internal functions
 Internal S0 transport component functions.
 

Macros

#define COMMAND_CLASS_SECURITY   0x98
 
#define COMMAND_CLASS_SECURITY_VERSION   1
 

Functions

sl_status_t zwave_s0_send_data (const zwave_controller_connection_info_t *connection, uint16_t data_length, const uint8_t *cmd_data, const zwave_tx_options_t *tx_options, const on_zwave_tx_send_data_complete_t on_send_complete, void *user, zwave_tx_session_id_t parent_session_id)
 Sending an S0 encapsulated frame. More...
 
sl_status_t zwave_s0_on_frame_received (const zwave_controller_connection_info_t *connection_info, const zwave_rx_receive_options_t *rx_options, const uint8_t *frame_data, uint16_t frame_length)
 Entry point of S0 frames received from the PHY/radio stack. More...
 
sl_status_t zwave_s0_transport_init (void)
 Initialize the S0 Transport Also calls zwave_s0_network_init() which aborts all tx sessions and frees them and also frees rx sessions and reads S0 key from keystore and initializes the S0 key. More...
 
void s0_set_key (const uint8_t *network_key)
 Set the S0 network key. More...
 
sl_status_t zwave_s0_on_abort_send_data (zwave_tx_session_id_t session_id)
 Z-Wave controller transport callback function which will be triggered when S0 frame tranmission is aborted. More...
 

Detailed Description

Transport for Security 0.

Macro Definition Documentation

◆ COMMAND_CLASS_SECURITY

#define COMMAND_CLASS_SECURITY   0x98

◆ COMMAND_CLASS_SECURITY_VERSION

#define COMMAND_CLASS_SECURITY_VERSION   1

Function Documentation

◆ s0_set_key()

void s0_set_key ( const uint8_t *  network_key)

Set the S0 network key.

Parameters
network_keyS0 Key (Class 80) read from S2 keystore
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_s0_on_abort_send_data()

sl_status_t zwave_s0_on_abort_send_data ( zwave_tx_session_id_t  session_id)

Z-Wave controller transport callback function which will be triggered when S0 frame tranmission is aborted.

Parameters
session_idThe session id of the frame which has been aborted.
Returns
SL_STATUS_OK to indicate that ongoing session are aborted.
SL_STATUS_NOT_FOUND to indicate that no transmission was ongoing.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_s0_on_frame_received()

sl_status_t zwave_s0_on_frame_received ( const zwave_controller_connection_info_t connection_info,
const zwave_rx_receive_options_t rx_options,
const uint8_t *  frame_data,
uint16_t  frame_length 
)

Entry point of S0 frames received from the PHY/radio stack.

This function is used to feed S0 frames into the S0 engine. See S0_application_command_handler

Parameters
connection_infoInformation about sender.
rx_optionsReceive options
frame_dataS0 control frame data
frame_lengthS0 control frame length
Returns
sl_status_t
  • SL_STATUS_WOULD_OVERFLOW Frame length is more than ZWAVE_MAX_FRAME_SIZE
  • SL_STATUS_NOT_FOUND if Command class is not Security 0 or command inside the command class is unknown
  • SL_STATUS_NOT_SUPPORTED If frame is not supported because of some reason
  • SL_STATUS_FAIL Decryption of frame failed
  • SL_STATUS_OK if OK
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_s0_send_data()

sl_status_t zwave_s0_send_data ( const zwave_controller_connection_info_t connection,
uint16_t  data_length,
const uint8_t *  cmd_data,
const zwave_tx_options_t tx_options,
const on_zwave_tx_send_data_complete_t  on_send_complete,
void *  user,
zwave_tx_session_id_t  parent_session_id 
)

Sending an S0 encapsulated frame.

This function will encrypt a data payload and encapsupate it into an Security 0 message.

Parameters
connectionContains information about target node.
data_lengthLength of un-encrypted data.
cmd_dataun-encrypted data to send
tx_optionsTransmit options. The number_of_responses field determines if S0 verify delivery is going to be used
on_send_completeCallback for the transmission complete event.
userUser pointer
parent_session_idParent session id of this session
Returns
sl_status_t
  • SL_STATUS_OK on success
  • SL_STATUS_NOT_SUPPORTED if unknown encapuslation scheme is applied.
  • SL_STATUS_BUSY if a tranmission is ongoing.
  • SL_STATUS_WOULD_OVERFLOW if we cannot handle the frame and it should just be dropped.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_s0_transport_init()

sl_status_t zwave_s0_transport_init ( void  )

Initialize the S0 Transport Also calls zwave_s0_network_init() which aborts all tx sessions and frees them and also frees rx sessions and reads S0 key from keystore and initializes the S0 key.

Returns
SL_STATUS_OK if successful
SL_STATUS_FAIL if an error occurred in zwave_s0_network_init()
Here is the call graph for this function:
Here is the caller graph for this function: