From c277a3ed68477453e2718511102bdd0eda9faaf4 Mon Sep 17 00:00:00 2001 From: Chris Jackson Date: Wed, 4 Oct 2023 09:00:17 +1300 Subject: [PATCH] Initial update to EZSP12 Signed-off-by: Chris Jackson --- .../src/main/resources/ezsp_protocol.xml | 93 ++++++++++++++++++- .../ember/ezsp/structure/EzspConfigId.java | 23 ++++- .../ember/ezsp/structure/EzspStatus.java | 45 +++++++++ .../ember/ezsp/structure/EzspValueId.java | 10 +- 4 files changed, 167 insertions(+), 4 deletions(-) diff --git a/com.zsmartsystems.zigbee.dongle.ember.autocode/src/main/resources/ezsp_protocol.xml b/com.zsmartsystems.zigbee.dongle.ember.autocode/src/main/resources/ezsp_protocol.xml index 8e6d7f17a..4e64ee5c8 100644 --- a/com.zsmartsystems.zigbee.dongle.ember.autocode/src/main/resources/ezsp_protocol.xml +++ b/com.zsmartsystems.zigbee.dongle.ember.autocode/src/main/resources/ezsp_protocol.xml @@ -5212,6 +5212,46 @@ 0x0042 The command has been filtered out by NCP. + + EZSP_ERROR_SECURITY_KEY_ALREADY_SET + 0x0043 + EZSP Security Key is already set. + + + EZSP_ERROR_SECURITY_TYPE_INVALID + 0x0044 + EZSP Security Type is invalid. + + + EZSP_ERROR_SECURITY_PARAMETERS_INVALID + 0x0045 + EZSP Security Parameters are invalid. + + + EZSP_ERROR_SECURITY_PARAMETERS_ALREADY_SET0x46 + 0x0046 + EZSP Security Parameters are already set. + + + EZSP_ERROR_SECURITY_KEY_NOT_SET + 0x0047 + EZSP Security Key is not set. + + + EZSP_ERROR_SECURITY_PARAMETERS_NOT_SET + 0x0048 + EZSP Security Parameters are not set. + + + EZSP_ERROR_UNSUPPORTED_CONTROL + 0x0049 + Received frame with unsupported control byte. + + + EZSP_ERROR_UNSECURE_FRAME + 0x004A + Received frame is unsecure, when security is established. + EZSP_ASH_ERROR_VERSION 0x0050 @@ -5362,6 +5402,11 @@ 0x0085 ASH RX + + EZSP_CPC_ERROR_INIT + 0x0086 + Failed to connect to CPC daemon or failed to open CPC endpoint. + EZSP_NO_ERROR 0x00FF @@ -5692,6 +5737,21 @@ 0x39 Valid range of a CTUNE value is 0x0000-0x01FF. Higher order bits (0xFE00) of the 16-bit value are ignored. + + EZSP_CONFIG_ASSUME_TC_CONCENTRATOR_TYPE + 0x40 + To configure non trust center node to assume a concentrator type of the trust center it join to, until it receive many-to-one route request from the trust center. For the trust center node, concentrator type is configured from the concentrator plugin. The stack by default assumes trust center be a low RAM concentrator that make other devices send route record to the trust center even without receiving a many-to-one route request. The default concentrator type can be changed by setting appropriate EmberAssumeTrustCenterConcentratorType config value. + + + EZSP_CONFIG_GP_PROXY_TABLE_SIZE + 0x41 + This is green power proxy table size. This value is readonly and cannot be set at runtime. + + + EZSP_CONFIG_GP_SINK_TABLE_SIZE + 0x42 + This is green power sink table size. This value is readonly and cannot be set at runtime. + @@ -7533,7 +7593,12 @@ EZSP_VALUE_TRANSIENT_DEVICE_TIMEOUT 0x43 - Timeout in milliseconds to store entries in the transient device table. If the devices are not authenticated before the timeout, the entry shall be purged + Timeout in milliseconds to store entries in the transient device table. If the devices are not authenticated before the timeout, the entry shall be purged. + + + EZSP_VALUE_KEY_STORAGE_VERSION + 0x44 + Return information about the key storage on an NCP. Returns 0 if keys are in classic key storage, and 1 if they are located in PSA key storage. Read only. @@ -7828,6 +7893,32 @@ + + EmberConfigTxPowerMode + + + + EMBER_TX_POWER_MODE_DEFAULT + 0x00 + Normal power mode and bi-directional RF transmitter output. + + + EMBER_TX_POWER_MODE_BOOST + 0x01 + Enable boost power mode. This is a high-performance radio mode which offers increased receive sensitivity and transmit power at the cost of an increase in power consumption. + + + EMBER_TX_POWER_MODE_ALTERNATE + 0x02 + Enable the alternate transmitter output. This allows for simplified connection to an external power amplifier via the RF_TX_ALT_P and RF_TX_ALT_N pins. + + + EMBER_TX_POWER_MODE_BOOST_AND_ALTERNATE + 0x03 + Enable both boost mode and the alternate transmitter output. + + + diff --git a/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ezsp/structure/EzspConfigId.java b/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ezsp/structure/EzspConfigId.java index 730ed1ee9..e01c45813 100644 --- a/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ezsp/structure/EzspConfigId.java +++ b/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ezsp/structure/EzspConfigId.java @@ -291,7 +291,28 @@ public enum EzspConfigId { * Valid range of a CTUNE value is 0x0000-0x01FF. Higher order bits (0xFE00) of the 16-bit value * are ignored. */ - EZSP_CONFIG_CTUNE_VALUE(0x0039); + EZSP_CONFIG_CTUNE_VALUE(0x0039), + + /** + * To configure non trust center node to assume a concentrator type of the trust center it join + * to, until it receive many-to-one route request from the trust center. For the trust center + * node, concentrator type is configured from the concentrator plugin. The stack by default + * assumes trust center be a low RAM concentrator that make other devices send route record to + * the trust center even without receiving a many-to-one route request. The default + * concentrator type can be changed by setting appropriate + * EmberAssumeTrustCenterConcentratorType config value. + */ + EZSP_CONFIG_ASSUME_TC_CONCENTRATOR_TYPE(0x0040), + + /** + * This is green power proxy table size. This value is readonly and cannot be set at runtime. + */ + EZSP_CONFIG_GP_PROXY_TABLE_SIZE(0x0041), + + /** + * This is green power sink table size. This value is readonly and cannot be set at runtime. + */ + EZSP_CONFIG_GP_SINK_TABLE_SIZE(0x0042); /** * A mapping between the integer code and its corresponding type to diff --git a/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ezsp/structure/EzspStatus.java b/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ezsp/structure/EzspStatus.java index e09d73521..48a20ec42 100644 --- a/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ezsp/structure/EzspStatus.java +++ b/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ezsp/structure/EzspStatus.java @@ -221,6 +221,46 @@ public enum EzspStatus { */ EZSP_ERROR_COMMAND_FILTERED(0x0042), + /** + * EZSP Security Key is already set. + */ + EZSP_ERROR_SECURITY_KEY_ALREADY_SET(0x0043), + + /** + * EZSP Security Type is invalid. + */ + EZSP_ERROR_SECURITY_TYPE_INVALID(0x0044), + + /** + * EZSP Security Parameters are invalid. + */ + EZSP_ERROR_SECURITY_PARAMETERS_INVALID(0x0045), + + /** + * EZSP Security Parameters are already set. + */ + EZSP_ERROR_SECURITY_PARAMETERS_ALREADY_SET0x46(0x0046), + + /** + * EZSP Security Key is not set. + */ + EZSP_ERROR_SECURITY_KEY_NOT_SET(0x0047), + + /** + * EZSP Security Parameters are not set. + */ + EZSP_ERROR_SECURITY_PARAMETERS_NOT_SET(0x0048), + + /** + * Received frame with unsupported control byte. + */ + EZSP_ERROR_UNSUPPORTED_CONTROL(0x0049), + + /** + * Received frame is unsecure, when security is established. + */ + EZSP_ERROR_UNSECURE_FRAME(0x004A), + /** * Incompatible ASH version */ @@ -370,6 +410,11 @@ public enum EzspStatus { */ EZSP_ASH_RX(0x0085), + /** + * Failed to connect to CPC daemon or failed to open CPC endpoint. + */ + EZSP_CPC_ERROR_INIT(0x0086), + /** * No reset or error */ diff --git a/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ezsp/structure/EzspValueId.java b/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ezsp/structure/EzspValueId.java index 95f0a8972..839f9cf60 100644 --- a/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ezsp/structure/EzspValueId.java +++ b/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ezsp/structure/EzspValueId.java @@ -307,9 +307,15 @@ public enum EzspValueId { /** * Timeout in milliseconds to store entries in the transient device table. If the devices are - * not authenticated before the timeout, the entry shall be purged + * not authenticated before the timeout, the entry shall be purged. */ - EZSP_VALUE_TRANSIENT_DEVICE_TIMEOUT(0x0043); + EZSP_VALUE_TRANSIENT_DEVICE_TIMEOUT(0x0043), + + /** + * Return information about the key storage on an NCP. Returns 0 if keys are in classic key + * storage, and 1 if they are located in PSA key storage. Read only. + */ + EZSP_VALUE_KEY_STORAGE_VERSION(0x0044); /** * A mapping between the integer code and its corresponding type to