Transport for Security 0.
More...
Transport for Security 0.
◆ COMMAND_CLASS_SECURITY
| #define COMMAND_CLASS_SECURITY 0x98 |
◆ COMMAND_CLASS_SECURITY_VERSION
| #define COMMAND_CLASS_SECURITY_VERSION 1 |
◆ s0_set_key()
| void s0_set_key |
( |
const uint8_t * |
network_key | ) |
|
Set the S0 network key.
- Parameters
-
| network_key | S0 Key (Class 80) read from S2 keystore |
◆ zwave_s0_on_abort_send_data()
Z-Wave controller transport callback function which will be triggered when S0 frame tranmission is aborted.
- Parameters
-
| session_id | The 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.
◆ zwave_s0_on_frame_received()
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_info | Information about sender. |
| rx_options | Receive options |
| frame_data | S0 control frame data |
| frame_length | S0 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
◆ zwave_s0_send_data()
Sending an S0 encapsulated frame.
This function will encrypt a data payload and encapsupate it into an Security 0 message.
- Parameters
-
| connection | Contains information about target node. |
| data_length | Length of un-encrypted data. |
| cmd_data | un-encrypted data to send |
| tx_options | Transmit options. The number_of_responses field determines if S0 verify delivery is going to be used |
| on_send_complete | Callback for the transmission complete event. |
| user | User pointer |
| parent_session_id | Parent 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.
◆ zwave_s0_transport_init()
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()