### Sample Installation Code File Source: https://docs.silabs.com/zigbee/9.0.2/using-installation-codes-with-zigbee-devices/05-programming-the-installation-code-on-a-zigbee-device Provides an example of a correctly formatted installation code file. The CRC is not included in this file. ```shell Install Code: 83FED3407A939723A5C639B26916D505 ``` -------------------------------- ### Install CPCd and Components Source: https://docs.silabs.com/zigbee/9.0.2/using-co-processor-communication-daemon/03-compiling-installing-and-configuring-cpcd Install the CPC daemon, CPC library, and configuration file using the make install command. This requires super-user permissions. ```shell make install ``` -------------------------------- ### Accessing Basic Dynamic Token Data Source: https://docs.silabs.com/zigbee/9.0.2/using-tokens-for-non-volatile-storage/03-creating-and-accessing-tokens Example demonstrating how to read and update a basic dynamic token for storing installation data. This involves defining a structure and using sl_token_get_data and sl_token_set_data. ```C typedef struct { int8u install_date[11] /** YYYY-mm-dd + NULL */ int8u room_number; /** The room where this device is installed */ } InstallationData_t; InstallationData_t data; // Read the stored token data sl_token_get_data(TOKEN_DEVICE_INSTALL_DATA, 1, &data, sizeof(data)); // Set the local copy of the data to new values data.room_number = < user input data > MEMCOPY(data.install_date, < user input data>, 0, sizeof(data.install_date)); // Update the stored token data with the new values sl_token_set_data(TOKEN_DEVICE_INSTALL_DATA, 1, &data, sizeof(data)); ``` -------------------------------- ### start Source: https://docs.silabs.com/zigbee/9.0.2/using-manufacturing-library-for-emberznet/02-using-the-manufacturing-library-in-an-emberznet-application Starts the mfglib test mode. Optionally, it can use a callback for received data. ```APIDOC ## start ### Description Starts the mfglib test mode. The `useCallback` argument determines if the Rx callback should be used. ### API Function emAfMfglibStartCommand ### Arguments - **useCallback** (BOOLEAN) - Required - Use the Rx callback. ``` -------------------------------- ### Start Zigbeed Service Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/building-zigbee-hosts-locally Command to start the Zigbeed service using systemctl after the service file has been installed. ```bash sudo systemctl start zigbeed ``` -------------------------------- ### Get SE Status Example Output Source: https://docs.silabs.com/zigbee/9.0.2/efr32-dci-swd-programming/06-series-2-dci-and-swd-programming-examples Example output after executing the 'GET SE STATUS' DCI task, showing firmware versions, debug status, and device configuration. ```sh . Current DCI task is GET SE STATUS. + Press SPACE to cycle through the DCI tasks, press ENTER to run the selected DCI task. . Read target device SE status... OK + SE firmware version : 00010209 + MCU firmware version : NA + Debug lock : Disabled + Debug lock state : False + Device Erase : Enabled + Secure debug : Disabled + Secure boot : Disabled + Boot status : 0x20 - Command successful. ``` -------------------------------- ### Install Prerequisite Packages Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/local-host-configuration Installs essential packages for building and running the multiprotocol solution, including build tools, libraries, and Bluetooth support. ```bash sudo apt-get update && sudo apt-get upgrade -y sudo apt-get install cmake git libreadline-dev libmbedtls-dev socat sudo apt-get install bluetooth bluez bluez-tools rfkill libbluetooth-dev ``` -------------------------------- ### SE Manager Attestation Example Initialization Source: https://docs.silabs.com/zigbee/9.0.2/authenticating-devices-using-device-certificates/08-r-examples Demonstrates the initialization of the SE Manager and the selection of nonce size for the IAT token in the Attestation Platform Example. ```shell SE Manager Attestation Example - Core running at 38000 kHz. Initializing SE Manager... SL_STATUS_OK (cycles: 10 time: 0 us) Select nonce size for the IAT token (32, 48 or 64 bytes). Press SPACE to cycle through the options. Press ENTER to make a selection. Current nonce size: 32 Selected nonce size: 32 Calling sl_se_attestation_get_psa_iat_token... SL_STATUS_OK (cycles: 661072 time: 17396 us) ``` -------------------------------- ### Install OTBR Dependencies Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/building-otbr-locally Navigates to the OTBR source directory and runs the bootstrap script to install necessary dependencies. ```shell cd ~/simplicity_sdk/openthread_stack/util/third_party/ot-br-posix/ sudo ./script/bootstrap ``` -------------------------------- ### Start Network Creator Plugin Source: https://docs.silabs.com/zigbee/9.0.2/ota-bootload-server-client-setup-zigbee-sdk-v7x-higher/06-zigbee-ota-hands-on-tutorial Initiates the network creator plugin on the Z3Gateway host console to start forming a network. ```bash > plugin network-creator start 1 ``` -------------------------------- ### Zigbeed-socat Service File Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/building-zigbee-hosts-locally This is an example of a systemd service file for Zigbeed-socat. It defines how the service should start, stop, and log its output. ```bash [Unit] Description=Zigbeed socat helper service StartLimitIntervalSec=0 [Service] Type=simple Restart=always RestartSec=1 User=root ExecStart=/usr/bin/socat -v pty,link=/dev/ttyZigbeeNCP pty,link=/tmp/ttyZigbeeNCP ExecStop=/bin/kill -WINCH ${MAINPID} PIDFile=/run/zigbeed-socat.pid StandardOutput=syslog StandardError=syslog SyslogIdentifier=zigbeed-socat [Install] WantedBy=multi-user.target ``` -------------------------------- ### Example Manufacturing Token Data Output Source: https://docs.silabs.com/zigbee/9.0.2/using-installation-codes-with-zigbee-devices/05-programming-the-installation-code-on-a-zigbee-device Illustrates the expected output format for manufacturing token data, highlighting fields related to the installation code. Note that byte-arrays are hex, integers are BIG endian hex, and strings are quoted ASCII. ```shell # # The token data can be in one of three main forms: byte-array, integer, or string. # Byte-arrays are a series of hexadecimal numbers of the required length. # Integers are BIG endian hexadecimal numbers. # String data is a quoted set of ASCII characters. # # MFG_EMBER_EUI_64 : A8D417FEFF570B00 MFG_CUSTOM_VERSION : 0xFFFF MFG_CUSTOM_EUI_64 : FFFFFFFFFFFFFFFF MFG_STRING : "" MFG_BOARD_NAME : "" MFG_MANUF_ID : 0xFFFF MFG_PHY_CONFIG : 0xFFFF MFG_SYNTH_FREQ_OFFSET: 0xFFFF MFG_CCA_THRESHOLD : 0xFFFF MFG_EZSP_STORAGE : FFFFFFFFFFFFFFFF MFG_CTUNE : 0xFFFF MFG_XO_TUNE : 0xFFFF MFG_LOCKBITS_PLW : 0x000000000000000000000000FFFF MFG_LOCKBITS_CLW0 : 0xFFFFFFFF MFG_LOCKBITS_MLW : 0xFFFFFFFF MFG_LOCKBITS_ULW : 0xFFFFFFFF MFG_LOCKBITS_DLW : 0xFFFFFFFF MFG_BOOTLOAD_AES_KEY : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MFG_SECURITY_CONFIG : 0xFFFF MFG_ASH_CONFIG[0] : 0xFFFF MFG_ASH_CONFIG[1] : 0xFFFF MFG_ASH_CONFIG[2] : 0xFFFF MFG_ASH_CONFIG[3] : 0xFFFF MFG_ASH_CONFIG[4] : 0xFFFF MFG_ASH_CONFIG[5] : 0xFFFF MFG_ASH_CONFIG[6] : 0xFFFF MFG_ASH_CONFIG[7] : 0xFFFF MFG_ASH_CONFIG[8] : 0xFFFF MFG_ASH_CONFIG[9] : 0xFFFF MFG_ASH_CONFIG[10] : 0xFFFF MFG_ASH_CONFIG[11] : 0xFFFF MFG_ASH_CONFIG[12] : 0xFFFF MFG_ASH_CONFIG[13] : 0xFFFF MFG_ASH_CONFIG[14] : 0xFFFF MFG_ASH_CONFIG[15] : 0xFFFF MFG_ASH_CONFIG[16] : 0xFFFF MFG_ASH_CONFIG[17] : 0xFFFF MFG_ASH_CONFIG[18] : 0xFFFF MFG_ASH_CONFIG[19] : 0xFFFF 'MFG_CBKE_DATA (Smart Energy CBKE)' token group Device Implicit Cert : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CA Public Key : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF Device Private Key : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF # CBKE Flags : 0xFF 'MFG_INSTALLATION_CODE (Smart Energy Install Code)' token group # Install Code Flags : 0xFFFF Install Code : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF # CRC : 0xFFFF 'MFG_SECURE_BOOTLOADER_KEY (Manufacture token space for storing secure bootloader key.)' token group MFG_SECURE_BOOTLOADER_KEY : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 'MFG_CBKE_283K1_DATA (Smart Energy 1.2 CBKE)' token group Device Implicit Cert (283k1) : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFpFFFFFFFFF CA Public Key (283k1) : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF Device Private Key (283k1) : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF # CBKE FLAGS (283k1) : 0xFF 'MFG_SIGNED_BOOTLOADER_KEY_X (Manufacture token space for storing ECDSA signed bootloader key (X-point).)' token group MFG_SIGNED_BOOTLOADER_KEY_X : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 'MFG_SIGNED_BOOTLOADER_KEY_Y (Manufacture token space for storing ECDSA signed bootloader key (Y-point).)' token group MFG_SIGNED_BOOTLOADER_KEY_Y : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DONE ``` -------------------------------- ### Start Multiprotocol Services with run.sh Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/running-multiprotocol-on-docker Illustrates the arguments for the run.sh script to start specific multiprotocol services and launch associated terminals within the Docker container. ```bash -Z starts zigbeed and launches a terminal with zigbee_z3_gateway -T starts OTBR and opens a terminal with ot-ctl -L starts Bluetooth and opens a terminal with bluetoothctl -C launches a terminal with zigbee_z3_gateway_cpc (for use with the Zigbee NCP/OpenThread RCP) ``` -------------------------------- ### Install ot-br-posix and zigbeed Packages Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/running-multiprotocol-with-packages Installs the ot-br-posix and zigbeed packages after ensuring the correct dhcpcd version is in place. Replace `` with the appropriate version number. ```bash apt-get install -y ./debian-bookworm/deb/ot-br-posix_.deb apt-get install -y ./debian-bookworm/deb/zigbeed_.deb ``` -------------------------------- ### Basic Server Cluster Callback Example Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-app-framework-dev-guide-sdk-7x/06-zigbee-application-framework-callback-interface Example of implementing the sl_zigbee_af_basic_cluster_reset_to_factory_defaults_cb callback for the Basic Server Cluster software component. ```c void sl_zigbee_af_basic_cluster_reset_to_factory_defaults_cb(void) ``` -------------------------------- ### Install Zigbeed Package Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/running-multiprotocol-with-packages Installs the Zigbeed daemon on OpenWRT. It's recommended to run 'opkg update' beforehand. ```shell opkg update opkg install zigbeed_.ipk ``` -------------------------------- ### Install CPCd and CPC Library Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/building-cpcd-locally Install the built CPCd and its library to the system, update the dynamic linker cache, and copy the configuration file to the appropriate directory. ```bash sudo make install sudo ldconfig sudo cp ../cpcd.conf /usr/local/etc/. ``` -------------------------------- ### Install CPCD Packages Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/running-multiprotocol-with-packages Installs the CPCD daemon and its associated library on OpenWRT. Ensure 'opkg update' is run first. ```shell opkg update opkg install libcpc_.ipk opkg install cpcd_.ipk ``` -------------------------------- ### Start otbr-agent Binary Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/running-local-processes-concurrently Use this command to start the otbr-agent directly in the terminal. Ensure CPCd is running first. Logs will appear in the terminal. ```bash sudo ./otbr-agent -d 6 -v -I wpan0 -B eth0 'spinel+cpc://cpcd_0?iid=2&iid-list=0' ``` -------------------------------- ### Start Network Creator Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-af-api/network-creator Initiates the network creator process to form a network with arbitrary parameters. Use this to start the network formation process. ```c sl_status_t sl_zigbee_af_network_creator_start(bool centralizedNetwork); ``` -------------------------------- ### SE Manager Key Provisioning Example Output (Success) Source: https://docs.silabs.com/zigbee/9.0.2/series2-secure-boot-with-rtsl/03-examples Example output showing successful initialization, key provisioning, and verification of the GBL Decryption Key in SE OTP. ```shell SE Manager Key Provisioning Example - Core running at 38000 kHz. . SE manager initialization... SL_STATUS_OK (cycles: 9 time: 0 us) . Get current SE firmware version... SL_STATUS_OK (cycles: 3578 time: 94 us) + Current SE firmware version (MSB..LSB): 00010209 . Read SE OTP configuration... SL_STATUS_COMMAND_IS_INVALID (cycles: 3908 time: 102 us) . Press ENTER to program 128-bit AES key in SE OTP or press SPACE to skip. + Warning: The 128-bit AES key in SE OTP cannot be changed once written! + Press ENTER to confirm or press SPACE to skip if you are not sure. . Initialize 128-bit AES key... SL_STATUS_OK (cycles: 39059 time: 1027 us) . Encrypt 16 bytes plaintext with 128-bit AES OTP key... SL_STATUS_OK (cycles: 11013 time: 289 us) + Compare encrypted message with expected ciphertext... OK . Press ENTER to program public sign key in SE OTP or press SPACE to skip. . Get public sign key... SL_STATUS_FAIL (cycles: 4126 time: 108 us) . Press ENTER to program public command key in SE OTP or press SPACE to skip. . Get public command key... SL_STATUS_FAIL (cycles: 4126 time: 108 us) . Press ENTER to initialize SE OTP for secure boot configuration or press SPACE to skip. . SE manager deinitialization... SL_STATUS_OK (cycles: 10 time: 0 us) ``` -------------------------------- ### Example User-Supplied Certificate Data Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-image-builder-instructions/04-creating-an-ota-file An example of a text file containing the hexadecimal arrays for a user-supplied certificate and its corresponding private key. ```bash Certificate:0307834a5cfa185ee9c9550a6561212af7082ef6d319000d6f000092e04e544553545345434100000000000000000000 Private Key:02032ed11b3ceeddae99ce00e23bc54564d16b18ea ``` -------------------------------- ### SE Manager Key Provisioning - Initial Steps Source: https://docs.silabs.com/zigbee/9.0.2/series2-secure-boot-with-rtsl/03-examples Demonstrates the initial steps of SE manager initialization, reading SE OTP configuration, and attempting to encrypt plaintext with an AES OTP key. This snippet shows a failure case for encryption. ```sh SE Manager Key Provisioning Example - Core running at 38000 kHz. . SE manager initialization... SL_STATUS_OK (cycles: 9 time: 0 us) . Get current SE firmware version... SL_STATUS_OK (cycles: 3578 time: 94 us) + Current SE firmware version (MSB..LSB): 00010209 . Read SE OTP configuration... SL_STATUS_COMMAND_IS_INVALID (cycles: 3908 time: 102 us) . Press ENTER to program 128-bit AES key in SE OTP or press SPACE to skip. . Encrypt 16 bytes plaintext with 128-bit AES OTP key... SL_STATUS_FAIL (cycles: 4627 time: 121 us) . Press ENTER to program public sign key in SE OTP or press SPACE to skip. ``` -------------------------------- ### Start Time Attribute Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-af-api/zcl-prepayment-cluster-emergency-credit-setup-command Specifies the start time for the Emergency Credit Setup command. This attribute is of type uint32_t. ```c uint32_t __zcl_prepayment_cluster_emergency_credit_setup_command::startTime ``` -------------------------------- ### SE OTP Initialization Prompt Source: https://docs.silabs.com/zigbee/9.0.2/series2-secure-boot-with-rtsl/03-examples This example shows the console output during the SE OTP initialization process. Pressing SPACE skips the secure boot configuration programming. ```sh . Press ENTER to initialize SE OTP for secure boot configuration or press SPACE to skip. . SE manager deinitialization... SL_STATUS_OK (cycles: 5 time: 0 us) ``` -------------------------------- ### Start Multiprotocol Services in Docker Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/running-multiprotocol-on-docker Executes systemctl commands inside the 'multiprotocol' Docker container to start essential services like zigbeed, otbr, and hciattach. ```bash docker exec -it multiprotocol systemctl start zigbeed docker exec -it multiprotocol systemctl start otbr docker exec -it multiprotocol systemctl start hciattach ``` -------------------------------- ### Counter Token Usage Example Source: https://docs.silabs.com/zigbee/9.0.2/using-tokens-for-non-volatile-storage/03-creating-and-accessing-tokens Example demonstrating how to use sl_token_increment_counter to track events like heating cycles and sl_token_get_data to retrieve the count. ```C void requestHeatCycle(void) { /// < application logic to initiate heat cycle > sl_token_increment_counter(TOKEN_LIFETIME_HEAT_CYCLES); } int32u totalHeatCycles(void) { int32u heatCycles; sl_token_get_data(TOKEN_LIFETIME_HEAT_CYCLES, 1, &heatCycles, sizeof(heatCycles)); return heatCycles; } ``` -------------------------------- ### sl_zigbee_af_messaging_server_cancel_message Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-af-api/messaging-server Gets the message and metadata that the plugin sends to clients. For 'start now' messages that are current or scheduled, the duration is adjusted to reflect how many minutes remain for the message. Otherwise, the start time and duration of 'start now' messages reflect the actual start and the original duration. ```APIDOC ## sl_zigbee_af_messaging_server_cancel_message ### Description Get the message used by the messaging server plugin. ### Parameters #### Arguments - **nodeId** (sl_802154_short_addr_t) - The relevant endpoint. - **srcEndpoint** (uint8_t) - The sl_zigbee_af_plugin_messaging_server_message_t structure describing the message. - **dstEndpoint** (uint8_t) - ### Returns - bool - True if the message is valid or false if the message does not exist or is expired. ``` -------------------------------- ### sl_zigbee_af_messaging_server_display_message Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-af-api/messaging-server Gets the message and metadata that the plugin sends to clients. For 'start now' messages that are current or scheduled, the duration is adjusted to reflect how many minutes remain for the message. Otherwise, the start time and duration of 'start now' messages reflect the actual start and the original duration. ```APIDOC ## sl_zigbee_af_messaging_server_display_message ### Description Get the message used by the messaging server plugin. ### Parameters #### Arguments - **nodeId** (sl_802154_short_addr_t) - The relevant endpoint. - **srcEndpoint** (uint8_t) - The sl_zigbee_af_plugin_messaging_server_message_t structure describing the message. - **dstEndpoint** (uint8_t) - ### Returns - bool - True if the message is valid or false if the message does not exist or is expired. ``` -------------------------------- ### Start OTA Client State Machine Source: https://docs.silabs.com/zigbee/9.0.2/ota-bootload-server-client-setup-zigbee-sdk-v7x-higher/06-zigbee-ota-hands-on-tutorial Initiate the OTA client's state machine to begin the over-the-air bootloading process. This command starts the client's upgrade sequence. ```bash plugin ota-client start ``` -------------------------------- ### sl_zigbee_af_messaging_server_get_message Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-af-api/messaging-server Gets the message and metadata that the plugin sends to clients. For 'start now' messages that are current or scheduled, the duration is adjusted to reflect how many minutes remain for the message. Otherwise, the start time and duration of 'start now' messages reflect the actual start and the original duration. ```APIDOC ## sl_zigbee_af_messaging_server_get_message ### Description Get the message used by the messaging server plugin. ### Parameters #### Arguments - **endpoint** (uint8_t) - The relevant endpoint. - **message** (sl_zigbee_af_plugin_messaging_server_message_t *) - The sl_zigbee_af_plugin_messaging_server_message_t structure describing the message. ### Returns - bool - True if the message is valid or false if the message does not exist or is expired. ``` -------------------------------- ### Z3Gateway CLI Output Example Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/running-local-processes-concurrently This output displays the initialization and configuration status of the Z3Gateway upon startup. It includes EZSP version, stack details, and confirmation of various configuration settings applied to the Zigbee network. ```bash Reset info: 11 (SOFTWARE) ezsp ver 0x0E stack type 0x02 stack ver. [8.0.1 GA build 270] Ezsp Config: set address table size to 0x0002:Success: set Ezsp Config: set TC addr cache to 0x0002:Success: set Ezsp Config: set MAC indirect TX timeout to 0x1E00:Success: set Ezsp Config: set max hops to 0x001E:Success: set Ezsp Config: set tx power mode to 0x8000:Success: set Ezsp Config: set supported networks to 0x0001:Success: set Ezsp Config: set stack profile to 0x0002:Success: set Ezsp Config: set security level to 0x0005:Success: set Ezsp Value : set end device keep alive support mode to 0x00000003:Success: set Ezsp Policy: set binding modify to "allow for valid endpoints & clusters only":Success: set Ezsp Policy: set message content in msgSent to "return":Success: set Ezsp Value : set maximum incoming transfer size to 0x00000052:Success: set Ezsp Value : set maximum outgoing transfer size to 0x00000052:Success: set Ezsp Value : set default timeout for transient device table to 0x00002710:Success: set Ezsp Config: set binding table size to 0x0002:Success: set Ezsp Config: set key table size to 0x0004:Success: set Ezsp Config: set max end device children to 0x0006:Success: set Ezsp Config: set aps unicast message count to 0x000A:Success: set Ezsp Config: set broadcast table size to 0x000F:Success: set Ezsp Config: set neighbor table size to 0x0010:Success: set Ezsp Config: set end device poll timeout to 0x0008:Success: set Ezsp Config: set zll group addresses to 0x0000:Success: set Ezsp Config: set zll rssi threshold to 0xFFD8:Success: set Ezsp Config: set transient key timeout to 0x012C:Success: set Ezsp Config: set retry size to 0x0010:Success: set Ezsp Endpoint 1 added, profile 0x0104, in clusters: 8, out clusters 17 Ezsp Endpoint 242 added, profile 0xA1E0, in clusters: 0, out clusters 1 Starting identifying on endpoint 0x01, identify time is 0 sec Stopping identifying on endpoint 0x01 No endpoints identifying; stopping identification feedback. Found 0 files zigbee_z3_gateway> ``` -------------------------------- ### ZCL Calendar Cluster Get Special Days Command startTime Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-af-api/zcl-calendar-cluster-get-special-days-command Represents the start time for the Get Special Days command in the ZCL Calendar Cluster. ```c uint32_t __zcl_calendar_cluster_get_special_days_command::startTime ``` -------------------------------- ### Build OTBR with Multi-PAN and CPC Support Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/building-otbr-locally Runs the setup script to build the OTBR agent with specific options for multi-PAN, CPC, Thread 1.4 certification, and other features. Ensure to provide absolute paths for SDK_DIR and CPCD_DIR. ```shell sudo INFRA_IF_NAME=eth0 OTBR_OPTIONS="-DOT_THREAD_VERSION=1.4 -DOT_MULTIPAN_RCP=ON -DCPCD_SOURCE_DIR=$CPCD_DIR -DOT_POSIX_RCP_HDLC_BUS=ON -DOT_POSIX_RCP_SPI_BUS=ON -DOT_POSIX_RCP_VENDOR_BUS=ON -DOT_POSIX_CONFIG_RCP_VENDOR_DEPS_PACKAGE=$SDK_DIR/protocol/openthread/platform-abstraction/posix/posix_vendor_rcp.cmake -DOT_POSIX_CONFIG_RCP_VENDOR_INTERFACE=$SDK_DIR/protocol/openthread/platform-abstraction/posix/cpc_interface.cpp -DOT_PLATFORM_CONFIG=openthread-core-silabs-posix-config.h -DOTBR_DUA_ROUTING=ON -DOTBR_DHCP6_PD=ON" ./script/setup ``` -------------------------------- ### Start Index Attribute for Get Endpoint List Response Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-af-api/zcl-zll-commissioning-cluster-get-endpoint-list-response-command Indicates the starting index for the endpoint list response. This is a public attribute of the ZCL command structure. ```c uint8_t __zcl_zll_commissioning_cluster_get_endpoint_list_response_command::startIndex ``` -------------------------------- ### Get Snapshot Command Structure Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-af-api/zcl-simple-metering-cluster-get-snapshot-command Provides the structure and attributes for the Get Snapshot command, including earliest start time, latest end time, snapshot offset, and snapshot cause. ```APIDOC ## Get Snapshot Command ### Description This command is used to request a snapshot of meter data within a specified time range. It includes parameters to define the time window and offset for retrieving the snapshot. ### Attributes - **earliestStartTime** (uint32_t) - The earliest time for which snapshot data is requested. - **latestEndTime** (uint32_t) - The latest time for which snapshot data is requested. - **snapshotOffset** (uint8_t) - An offset to specify which snapshot to retrieve if multiple are available within the time range. - **snapshotCause** (uint32_t) - Indicates the reason for the snapshot being taken. ``` -------------------------------- ### HMAC MAC Sign and Verify Example Source: https://docs.silabs.com/zigbee/9.0.2/mbedtls-psa-crypto-porting-guide/06-migration-guide Demonstrates setting up key attributes, importing a volatile HMAC key, streaming message data for signing, and then verifying the MAC. It also shows how to destroy the key. ```c++ #include "psa/crypto.h" void app_process_action(void) { uint8_t hmac_key[] = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 }; uint8_t hmac_msg[] = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 }; uint8_t mac_buf[32]; size_t mac_len; uint32_t mac_total; uint32_t stream_block_size = 8; psa_status_t ret; psa_key_id_t key_id; psa_key_attributes_t key_attr; psa_mac_operation_t mac_op; ret = psa_crypto_init(); // Set up attributes for a HMAC key key_attr = psa_key_attributes_init(); psa_set_key_type(&key_attr, PSA_KEY_TYPE_HMAC); psa_set_key_usage_flags(&key_attr, PSA_KEY_USAGE_SIGN_MESSAGE | PSA_KEY_USAGE_VERIFY_MESSAGE); psa_set_key_algorithm(&key_attr, PSA_ALG_HMAC(PSA_ALG_SHA_256)); // Import a volatile plain key for HMAC ret = psa_import_key(&key_attr, hmac_key, sizeof(hmac_key), &key_id); // Stream message and calculate the HMAC MAC // Expected HMAC MAC: // fb 5b 26 22 9c 20 b7 ed 86 67 06 a2 fb fa e6 7e 3f 40 4b b6 ab e7 7f f4 50 63 a4 59 a4 29 24 a4 mac_op = psa_mac_operation_init(); ret = psa_mac_sign_setup(&mac_op, key_id, PSA_ALG_HMAC(PSA_ALG_SHA_256)); mac_total = 0; // Streaming block while ((sizeof(hmac_msg) - mac_total) > stream_block_size) { ret = psa_mac_update(&mac_op, hmac_msg + mac_total, stream_block_size); mac_total += stream_block_size; } ret = psa_mac_update(&mac_op, hmac_msg + mac_total, sizeof(hmac_msg) - mac_total); ret = psa_mac_sign_finish(&mac_op, mac_buf, sizeof(mac_buf), &mac_len); // Stream message and verify the HMAC MAC mac_op = psa_mac_operation_init(); ret = psa_mac_verify_setup(&mac_op, key_id, PSA_ALG_HMAC(PSA_ALG_SHA_256)); mac_total = 0; // Streaming block while ((sizeof(hmac_msg) - mac_total) > stream_block_size) { ret = psa_mac_update(&mac_op, hmac_msg + mac_total, stream_block_size); mac_total += stream_block_size; } ret = psa_mac_update(&mac_op, hmac_msg + mac_total, sizeof(hmac_msg) - mac_total); ret = psa_mac_verify_finish(&mac_op, mac_buf, mac_len); // Destroy a volatile plain key for HMAC ret = psa_destroy_key(key_id); } ``` -------------------------------- ### OpenSSL Version Output Source: https://docs.silabs.com/zigbee/9.0.2/efr32-secure-vault-tamper/09-examples Example console output when checking the OpenSSL version. This confirms the OpenSSL installation and version details. ```sh OpenSSL 3.5.0 8 Apr 2025 ``` -------------------------------- ### sl_zigbee_af_ota_client_pre_bootload_cb Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-af-api/ota-client-cb This callback is invoked shortly before the downloaded image is installed. It allows for pre-bootload actions. ```APIDOC ## sl_zigbee_af_ota_client_pre_bootload_cb ### Description Called shortly before installing the downloaded image. ### Signature `void sl_zigbee_af_ota_client_pre_bootload_cb(uint8_t srcEndpoint, uint8_t serverEndpoint, sl_802154_short_addr_t serverNodeId)` ### Parameters #### Path Parameters - **srcEndpoint** (uint8_t) - N/A - Ver.: always - **serverEndpoint** (uint8_t) - N/A - Ver.: always - **serverNodeId** (sl_802154_short_addr_t) - N/A - Ver.: always ``` -------------------------------- ### PSA Crypto AEAD Example with AES GCM Source: https://docs.silabs.com/zigbee/9.0.2/mbedtls-psa-crypto-porting-guide/06-migration-guide Demonstrates authenticated encryption and decryption using AES GCM with associated data. This example covers key setup, import, streaming encryption/decryption, and tag verification. It requires the PSA Crypto library and specific algorithm configurations. ```c++ #include "psa/crypto.h" void app_process_action(void) { uint8_t key_buf[] = { 0x5f, 0xe0, 0x1c, 0x4b, 0xaf, 0x01, 0xcb, 0xe0, 0x77, 0x96, 0xd5, 0xaa, 0xef, 0x6e, 0xc1, 0xf4, 0x51, 0x93, 0xa9, 0x8a, 0x22, 0x35, 0x94, 0xae, 0x4f, 0x0e, 0xf4, 0x95, 0x2e, 0x82, 0xe3, 0x30 }; uint8_t nonce_buf[] = {0xbd, 0x58, 0x73, 0x21, 0x56, 0x6c, 0x7f, 0x1a, 0x5d, 0xd8, 0x65, 0x2d}; uint8_t ad_buf[] = { 0x90, 0x13, 0x61, 0x78, 0x17, 0xdd, 0xa9, 0x47, 0xe1, 0x35, 0xee, 0x6d, 0xd3, 0x65, 0x33, 0x82 }; uint8_t plain_msg_buf[] = { 0x88, 0x1d, 0xc6, 0xc7, 0xa5, 0xd4, 0x50, 0x9f, 0x3c, 0x4b, 0xd2, 0xda, 0xab, 0x08, 0xf1, 0x65, 0xdd, 0xc2, 0x04, 0x48, 0x9a, 0xa8, 0x13, 0x45, 0x62, 0xa4, 0xea, 0xc3, 0xd0, 0xbc, 0xad, 0x79, 0x65, 0x84, 0x7b, 0x10, 0x27, 0x33, 0xbb, 0x63, 0xd1, 0xe5, 0xc5, 0x98, 0xec, 0xe0, 0xc3, 0xe5, 0xda, 0xdd, 0xdd }; uint8_t cipher_buf[51]; uint8_t tag_buf[16]; size_t tag_len; size_t out_len; uint32_t out_total; uint32_t stream_cnt; uint32_t stream_block_size = 14; // Block size for streaming psa_status_t ret; psa_key_id_t key_id; psa_key_attributes_t key_attr; psa_aead_operation_t aead_op; ret = psa_crypto_init(); // Set up attributes for a AES GCM key key_attr = psa_key_attributes_init(); psa_set_key_type(&key_attr, PSA_KEY_TYPE_AES); psa_set_key_usage_flags(&key_attr, PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT); psa_set_key_algorithm(&key_attr, PSA_ALG_GCM); // Import a volatile plain key for AES GCM ret = psa_import_key(&key_attr, key_buf, sizeof(key_buf), &key_id); // AES GCM stream encryption and decryption // Expected ciphertext: // 16 e3 75 b4 97 3b 33 9d 3f 74 6c 1c 5a 56 8b c7 52 6e 90 9d df f1 e1 9c 95 c9 4a 6c cf f2 10 c9 // a4 a4 06 79 de 57 60 c3 96 ac 0e 2c eb 12 34 f9 f5 fe 26 // Expected tag: ab d3 d2 6d 65 a6 27 5f 7a 4f 56 b4 22 ac ab 49 aead_op = psa_aead_operation_init(); ret = psa_aead_encrypt_setup(&aead_op, key_id, PSA_ALG_GCM); ret = psa_aead_set_nonce(&aead_op, nonce_buf, sizeof(nonce_buf)); ret = psa_aead_update_ad(&aead_op, ad_buf, sizeof(ad_buf)); stream_cnt = 0; // Streaming block out_total = 0; while ((sizeof(plain_msg_buf) - (stream_cnt * stream_block_size)) > stream_block_size) { ret = psa_aead_update(&aead_op, plain_msg_buf + (stream_cnt * stream_block_size), stream_block_size, cipher_buf + out_total, sizeof(cipher_buf) - out_total, &out_len); stream_cnt++; out_total += out_len; } ret = psa_aead_update(&aead_op, // Last block plain_msg_buf + (stream_cnt * stream_block_size), sizeof(plain_msg_buf) - (stream_cnt * stream_block_size), cipher_buf + out_total, sizeof(cipher_buf) - out_total, &out_len); out_total += out_len; ret = psa_aead_finish(&aead_op, // Generate tag cipher_buf + out_total, sizeof(cipher_buf) - out_total, &out_len, tag_buf, sizeof(tag_buf), &tag_len); out_total += out_len; aead_op = psa_aead_operation_init(); ret = psa_aead_decrypt_setup(&aead_op, key_id, PSA_ALG_GCM); ret = psa_aead_set_nonce(&aead_op, nonce_buf, sizeof(nonce_buf)); ret = psa_aead_update_ad(&aead_op, ad_buf, sizeof(ad_buf)); stream_cnt = 0; // Streaming block out_total = 0; while ((sizeof(cipher_buf) - (stream_cnt * stream_block_size)) > stream_block_size) { ret = psa_aead_update(&aead_op, cipher_buf + (stream_cnt * stream_block_size), stream_block_size, plain_msg_buf + out_total, sizeof(plain_msg_buf) - out_total, &out_len); stream_cnt++; out_total += out_len; } ret = psa_aead_update(&aead_op, // Last block cipher_buf + (stream_cnt * stream_block_size), sizeof(cipher_buf) - (stream_cnt * stream_block_size), plain_msg_buf + out_total, sizeof(plain_msg_buf) - out_total, &out_len); out_total += out_len; ret = psa_aead_verify(&aead_op, // Verify tag plain_msg_buf + out_total, sizeof(plain_msg_buf) - out_total, &out_len, tag_buf, sizeof(tag_buf)); out_total += out_len; // Destroy a volatile plain key for AES GCM ret = psa_destroy_key(key_id); } ``` -------------------------------- ### Simplicity Commander Version Output Source: https://docs.silabs.com/zigbee/9.0.2/efr32-secure-vault-tamper/09-examples Example console output when checking the Simplicity Commander version. This helps confirm the tool's installation and version details. ```sh Simplicity Commander 1v14p6b1289 JLink DLL version: 7.70d Qt 5.12.10 Copyright (C) 2017 The Qt Company Ltd. EMDLL Version: 0v18p9b677 mbed TLS version: 2.16.6 DONE ``` -------------------------------- ### sl_zigbee_af_ota_client_start_cb Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-af-api/global-callback This callback should be called when the profile-specific registration has completed successfully, initiating the client's state machine to find the OTA server and manage the image download and bootload process. ```APIDOC ## sl_zigbee_af_ota_client_start_cb ### Description Ota Client Start callback. This callback should be called when the profile specific registration has completed successfully. It will start the client's state machine that will find the OTA server, query it for the next image, download the image, wait for the bootload message, and kick off the bootload. ### Signature `void sl_zigbee_af_ota_client_start_cb(void)` ### Parameters This callback does not take any parameters. ``` -------------------------------- ### Check Security Status for Secure Debug Example Source: https://docs.silabs.com/zigbee/9.0.2/series2-secure-debug/07-examples Initial check of the security status for a device in the context of secure debug operations. This helps confirm the starting state before key generation and provisioning. ```sh commander security status --device sixg301 --serialno 440326972 ``` ```sh commander security status --device sixg301 --serialno 440326972 --------------------------------------------------------------- SE ROM version : 5.3 SE Firmware version : 3.3.2 Serial number : 0000000000000000781c9dfffe589591 Debug lock : Disabled Device erase : Enabled Secure debug unlock : Disabled Tamper status : OK Secure boot : Disabled Boot status : 0x20 - OK Command key installed : False Sign key installed : False Security state : Production DONE ``` -------------------------------- ### sl_zigbee_af_compact_logger_init Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-af-api/compact-logger Initialize compact logger. ```APIDOC ## sl_zigbee_af_compact_logger_init ### Description Initialize compact logger. ### Method void ### Parameters void ### Returns void ``` -------------------------------- ### Multi-PAN RCP Configuration for OTBR Agent Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/building-otbr-locally Configures the OTBR agent options for a multi-PAN RCP setup, specifying interfaces and Spinel Interface IDs (IIDs). This example is for an OT RCP interface responding to IID=2. ```shell OTBR_AGENT_OPTS="-I wpan0 -B eth0 spinel+cpc://cpcd_0?iid=2&iid-list=0" ``` -------------------------------- ### Start Bluetooth CLI Utility Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/running-local-processes-concurrently Launches the Bluetooth command-line interface utility for managing Bluetooth controller devices. ```bash sudo bluetoothctl ``` -------------------------------- ### Testing Custom EZSP Messaging with Zigbee Host NCP LED Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/building-zigbee-hosts-locally This example demonstrates how to send custom EZSP messages to Zigbeed from the zigbee_host_xncp_led application and receive responses. It shows commands for setting and getting LED states. ```bash $ zigbee_host_xncp_led -p ttyZigbeeNCP zigbee_host_xncp_led>custom set-led 1 zigbee_host_xncp_led>custom get-led custom get-led Send custom frame: 0x00 Response (state): 1 (OFF) ``` -------------------------------- ### Creating Tokens with CTM Helper Macros Source: https://docs.silabs.com/zigbee/9.0.2/using-tokens-for-non-volatile-storage/05-common-token-manager Demonstrates how to create dynamic, static device, and static secure tokens using CTM helper macros. Assumes a user-defined dynamic token and specific NVM3 domain configurations. ```C // To create a token, the CTM provides helper macros such as SL_TOKEN_GET_STATIC_DEVICE_TOKEN(token) //To create a 32-bit static device token. SL_TOKEN_GET_STATIC_SECURE_TOKEN(token) //To create a 32-bit static secure token. SL_TOKEN_GET_DYNAMIC_TOKEN(token, IsCounterObj) //To create dynamic token, in case of counter object 'IsCounterObj' should be set to '1'. /** * Example usage */ /* Creating dynamic tokens */ // Basic token #define TOKEN_DYNAMIC_USER_DATA SL_TOKEN_GET_DYNAMIC_TOKEN((NVM3KEY_DOMAIN_USER | 0x000A), 0) // Counter token #define TOKEN_DYNAMIC_COUNTER SL_TOKEN_GET_DYNAMIC_TOKEN((NVM3KEY_DOMAIN_USER | 0x000C), 1) /* Creating static token */ // Static device token #define STATIC_DEVICE_TOKEN_EXAMPLE (SL_TOKEN_STATIC_DEVICE_TOKENS | 0x600) #define STATIC_DEVICE_TOKEN_EXAMPLE_SIZE 4 //4 bytes #define TOKEN_STATIC_DEVICE_DATA SL_TOKEN_GET_STATIC_DEVICE_TOKEN(STATIC_DEVICE_TOKEN_EXAMPLE) // Static secure token #define STATIC_SECURE_TOKEN_EXAMPLE (SL_TOKEN_STATIC_SECURE_DATA_TOKENS | 0x610) #define STATIC_SECURE_TOKEN_EXAMPLE_SIZE 2 //2 bytes #define TOKEN_STATIC_SECURE_DATA SL_TOKEN_GET_STATIC_SECURE_TOKEN(STATIC_SECURE_TOKEN_EXAMPLE) ``` -------------------------------- ### Install OTBR Package Source: https://docs.silabs.com/zigbee/9.0.2/multiprotocol-solution-linux/running-multiprotocol-with-packages Installs the OpenThread Border Router package on OpenWRT. Run 'opkg update' before installation. ```shell opkg update opkg install openthread-br_.ipk ``` -------------------------------- ### sl_zigbee_af_messaging_server_set_message Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-af-api/messaging-server Sets the message and metadata that the plugin will send to clients. Setting the start time to zero instructs clients to start the message now. For 'start now' messages, the plugin will automatically adjust the duration reported to clients based on the original start time of the message. ```APIDOC ## sl_zigbee_af_messaging_server_set_message ### Description Set the message used by the Messaging server plugin. ### Parameters #### Arguments - **endpoint** (uint8_t) - The relevant endpoint. - **message** (const sl_zigbee_af_plugin_messaging_server_message_t *) - The sl_zigbee_af_plugin_messaging_server_message_t structure describing the message. If NULL, the message is removed from the server. ### Returns void ``` -------------------------------- ### Sleepy to Sleepy Network Start Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-api-ref-v7-vs-v8/03-api-consolidation Starts a network between sleepy devices. ```APIDOC ## sl_zigbee_sleepy_to_sleepy_network_start ### Description Starts a network between sleepy devices. ### Signature `sl_status_t sl_zigbee_sleepy_to_sleepy_network_start(sl_zigbee_network_params_t *parameters, bool initiator);` ``` -------------------------------- ### Initialize SE OTP - Invalid Parameters Source: https://docs.silabs.com/zigbee/9.0.2/efr32-dci-swd-programming/06-series-2-dci-and-swd-programming-examples This output indicates that the 'Initialize SE OTP' command failed due to invalid parameters, likely because the Public Sign Key has not been provisioned while secure boot is enabled. ```shell . Initialize SE OTP of the target device... Failed - Parameters are invalid or buffer is too small. + Press ENTER to issue a pin reset to the target, press SPACE to skip. ``` -------------------------------- ### sl_zigbee_af_ota_server_update_started_cb Source: https://docs.silabs.com/zigbee/9.0.2/zigbee-af-api/ota-server-cb Called when an update has started. This function will be called when an update has started. ```APIDOC ## sl_zigbee_af_ota_server_update_started_cb ### Description Called when an update has started. This function will be called when an update has started. ### Parameters #### Path Parameters - **manufacturerId** (uint16_t) - Out - The manufacturer ID. - **imageTypeId** (uint16_t) - Out - The image Type ID. - **firmwareVersion** (uint32_t) - Out - Firmware Version. - **maxDataSize** (uint8_t) - Out - Maximum data size. - **offset** (uint32_t) - Out - Offset. ``` -------------------------------- ### zcl_prepayment_cluster_emergency_credit_setup_command Source: https://docs.silabs.com/zigbee/latest/llms.txt Documentation for the Emergency Credit Setup command within the Prepayment cluster. ```APIDOC ## zcl_prepayment_cluster_emergency_credit_setup_command ### Description Provides details on the Emergency Credit Setup command for the Prepayment cluster. ### Method N/A (ZCL Command) ### Endpoint N/A (ZCL Command) ### Parameters N/A (Refer to linked documentation for command-specific parameters) ### Request Example N/A ### Response N/A ``` -------------------------------- ### stream start Source: https://docs.silabs.com/zigbee/9.0.2/using-manufacturing-library-for-emberznet/02-using-the-manufacturing-library-in-an-emberznet-application Starts the stream test for data transmission testing. ```APIDOC ## stream start ### Description Starts the stream test. ### API Function emAfMfglibStreamStartCommand ### Arguments N/A ```