### Setup Simplicity Studio v5 on Ubuntu LTS Source: https://docs.silabs.com/simplicity-studio-5-users-guide/latest/ss-5-users-guide-getting-started/install-ss-5-and-software This command sequence updates the system's package list, upgrades existing packages, navigates to the Simplicity Studio installation directory, and executes the setup script. The setup script installs necessary development rules for USB connectivity and required Linux packages. ```bash sudo apt-get update sudo apt-get upgrade cd SimplicityStudio_v5 sudo ./setup.sh ``` -------------------------------- ### Print CoAP Help and Usage Instructions in C Source: https://context7_llms Displays help information for CoAP operations including server setup, discovery commands, and resource access instructions. This function outputs command-line examples for the Border Router to interact with CoAP resources on the device, including GET requests and resource modifications with parameters. ```C void print_coap_help (char* device_global_ipv6_string, char* border_router_ipv6_string) { printf("\n"); printf("To start a CoAP server on the linux Border Router:\n"); printf(" coap-server -A %s -p %d -d 10\n", border_router_ipv6_string, 5685); printf("CoAP discovery:\n"); printf(" coap-client -m get -N -B 3 coap://[%s]:5683/.well-known/core\n", device_global_ipv6_string); printf("CoAP GET requests:\n"); printf(" coap-client -m get -N -B 3 coap://[%s]:5683/, for the following resources:\n", device_global_ipv6_string); sl_wisun_coap_rhnd_print_resources(); printf(" '/settings/auto_send' returns the current notification duration in seconds\n"); printf(" '/settings/auto_send' -e ' changes the notification duration to d seconds\n"); printf(" '/status/neighbor' returns the neighbor_count\n"); printf(" '/status/neighbor -e ' returns the neighbor information for neighbor at index n\n"); printf(" '/statistics/stack/ -e reset' clears the Stack statistics for the selected group\n"); printf(" '/statistics/app/all -e reset' clears all statistics\n"); printf("\n"); } ``` -------------------------------- ### Install wisun-br-gui Plugin System-Wide Source: https://github.com/SiliconLabs/wisun-br-gui Installs the built Wi-SUN Border Router GUI plugin system-wide for all users on the system. This command requires superuser privileges. ```bash sudo make install ``` -------------------------------- ### Clock Configuration Example Source: https://www.raspberrypi.com/documentation/computers/configuration.html This snippet demonstrates how to configure clock routing and setup for Raspberry Pi. It shows how to set a specific VCO frequency, divide a channel, and route a clock source to a destination, with an example for an audio codec. ```dts clock_routing { vco@PLLA { freq = <1966080000>; }; chan@APER { div = <4>; }; clock@GPCLK0 { pll = "PLLA"; chan = "APER"; }; }; clock_setup { clock@PWM { freq = <2400000>; }; clock@GPCLK0 { freq = <12288000>; }; clock@GPCLK1 { freq = <25000000>; }; }; ``` -------------------------------- ### Install wisun-br-gui Plugin for Current User Source: https://github.com/SiliconLabs/wisun-br-gui Installs the Wi-SUN Border Router GUI plugin only for the currently logged-in user, targeting the '~/.local' directory. This avoids the need for superuser privileges. ```bash DEST_DIR=~/.local make install ``` -------------------------------- ### Dynamic Multiprotocol Setup with RAIL_ConfigChannels Source: https://community.silabs.com/s/article/rail-tutorial-multi-phy-usecases-and-examples Demonstrates initializing two different radio frequency protocols (868MHz and 915MHz) for a Dynamic Multiprotocol setup using RAILTest. It requires separate rail handles for each protocol and uses RAIL_ConfigChannels to set up the channels, with RAIL automatically managing configuration loading via its scheduler. ```c RAIL_ConfigChannels(railHandle868, channelConfigs[0], NULL); RAIL_ConfigChannels(railHandle915, channelConfigs[1], NULL); ``` -------------------------------- ### Start Wi-SUN Border Router with CLI (C) Source: https://docs.silabs.com/wisun/latest/wisun-getting-started-development/03-wisun-network This snippet shows how to initiate the Wi-SUN Border Router using a command-line interface with default FAN 1.1 PHY settings. Ensure your mainboard has the latest 'Adapter FW' for optimal performance. ```c #include #include int main() { printf("> wisun start_fan11\n"); // In a real scenario, this command would be sent to the device's CLI. // This is a conceptual representation. return 0; } ``` -------------------------------- ### Install Direct Connect Tool (Linux Host) Source: https://context7_llms Installs the 'silabs-ws-dc' tool on a Linux host by cloning the wisun-br-linux repository and using cmake and ninja for building and installation. Requires dependencies and mbedTLS. ```bash git clone https://github.com/SiliconLabs/wisun-br-linux.git cd wisun-br-linux mkdir build && cd build && cmake -G Ninja -DCOMPILE_DEVTOOLS=true .. ninja sudo ninja install ``` -------------------------------- ### Install make Dependency (Debian/Ubuntu) Source: https://github.com/SiliconLabs/wisun-br-gui Installs the 'make' utility on Debian-based systems (like Ubuntu), which is required for building the project. This command is run with superuser privileges. ```bash sudo apt install make ``` -------------------------------- ### Start Wi-SUN SoC Border Router - Silicon Labs Source: https://docs.silabs.com/wisun/latest/wisun/2.8.0/wisun-phy-quick-start This snippet shows the command to start the Wi-SUN SoC Border Router using a built-in trusted CA. It's a simple command-line instruction. ```bash > wisun start_fan11 [Using built-in trusted CA #0 ``` -------------------------------- ### Wi-SUN Network Configuration Example Source: https://docs.silabs.com/wisun/latest/wisun/2.8.0/wisun-phy-overview Example of configuring Wi-SUN network settings, including Wi-Fi credentials and security. ```APIDOC ## Wi-SUN Network Configuration ### Description This section shows an example of how to configure Wi-SUN network settings, specifically for Wi-Fi credentials and security protocols. ### Method N/A (Configuration example) ### Endpoint N/A ### Parameters #### Query Parameters None #### Request Body ```json { "wifi": { "ssid": "BRSoCDemo", "security": "WPA2_CCMP (3)", "passphrase": "Silabs_BRSoC", "wlan_state": "..." } } ``` ### Request Example ```json { "wifi": { "ssid": "BRSoCDemo", "security": "WPA2_CCMP (3)", "passphrase": "Silabs_BRSoC", "wlan_state": "..." } } ``` ### Response #### Success Response (200) N/A (Configuration example) #### Response Example N/A ``` -------------------------------- ### Install make Dependency (Fedora) Source: https://github.com/SiliconLabs/wisun-br-gui Installs the 'make' utility on Fedora systems, a necessary tool for compiling and building the project. This command requires administrator privileges. ```bash sudo dnf install make ``` -------------------------------- ### URI Construction Examples Source: https://datatracker.ietf.org/doc/html/rfc7252 Provides examples of how URIs are constructed in CoAP based on input parameters like destination IP address, port, host, and path. ```APIDOC ## URI Construction Examples ### Description These examples demonstrate the construction of CoAP URIs based on different sets of input parameters, including destination IP address, UDP port, Uri-Host, and Uri-Path. ### Method N/A (Informational) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example **Input 1:** - Destination IP Address = `[2001:db8::2:1]` - Destination UDP Port = `5683` **Output 1:** `coap://[2001:db8::2:1]/` **Input 2:** - Destination IP Address = `[2001:db8::2:1]` - Destination UDP Port = `5683` - Uri-Host = `"example.net"` **Output 2:** `coap://example.net/` **Input 3:** - Destination IP Address = `[2001:db8::2:1]` - Destination UDP Port = `5683` - Uri-Host = `"example.net"` - Uri-Path = `".well-` (partial) **Output 3:** (Construction depends on full Uri-Path and algorithm steps) ``` -------------------------------- ### NVM3 Example: Initialize and Use NVM3 Driver Source: https://docs.silabs.com/gecko-platform/latest/platform-driver/nvm3 Demonstrates the initialization and basic usage of the NVM3 driver. It includes opening an instance, erasing all objects, writing, incrementing, and reading a counter. The example requires a cache array and proper linker script placement. ```c void nvm3_example_2(void) { NVM3_DEFINE_SECTION_INIT_DATA(nvm3Data2, &nvm3_halFlashHandle); nvm3_Handle_t handle; sl_status_t status; uint32_t counter = 1; memset(&handle, 0, sizeof(nvm3_Handle_t)); status = nvm3_open(&handle, &nvm3Data2); if (status != SL_STATUS_OK) { // Handle error } nvm3_eraseAll(&handle); nvm3_writeCounter(&handle, USER_KEY, counter); nvm3_incrementCounter(&handle, USER_KEY, NULL); nvm3_readCounter(&handle, USER_KEY, &counter); } ``` -------------------------------- ### CoAP GET Auto-Send Duration Source: https://github.com/SiliconLabs/wisun_applications/tree/main/wisun_node_monitoring Example of using coap-client to perform a GET request to retrieve the current auto-send duration setting. ```bash coap-client -m get -N -B 10 -t text coap://[fd12:3456::62a4:23ff:fe37:aec3]:5683/settings/auto_send ``` -------------------------------- ### NVM3 Initialization, Data Objects, and Repacking (C) Source: https://docs.silabs.com/gecko-platform/latest/platform-driver/nvm3 Demonstrates initializing NVM3, defining static data and initialization structures, opening the NVM3 instance, managing data objects (writing, reading, getting info), and performing repacking if necessary. It assumes nvm3.h and nvm3_hal_flash.h are included and nvm3_halFlashHandle is available. ```c #include "nvm3.h" #include "nvm3_hal_flash.h" // Create a NVM area of 24kB (size must equal N * FLASH_PAGE_SIZE, N is integer). Create a cache of 10 entries. NVM3_DEFINE_SECTION_STATIC_DATA(nvm3Data1, 24576, 10); // This macro creates the following: // 1. An array to hold NVM data named nvm3Data1_nvm // 2. A section called nvm3Data1_section containing nvm3Data1_nvm. The application linker script must place this section correctly in memory. // 3. A cache array: nvm3Data1_cache void nvm3_example_1(void) { // Declare a nvm3_Init_t struct of name nvm3Data1 with initialization data. This is passed to nvm3_open() below. NVM3_DEFINE_SECTION_INIT_DATA(nvm3Data1, &nvm3_halFlashHandle); nvm3_Handle_t handle; sl_status_t status; size_t numberOfObjects; unsigned char data1[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; unsigned char data2[] = { 11, 12, 13, 14, 15 }; uint32_t objectType; size_t dataLen1; size_t dataLen2; // Initialize the handle to zero (void)memset(&handle, 0, sizeof(nvm3_Handle_t)); status = nvm3_open(&handle, &nvm3Data1); if (status != SL_STATUS_OK) { // Handle error } // Get the number of valid keys already in NVM3 numberOfObjects = nvm3_countObjects(&handle); // Skip if we have initial keys. If not, generate objects and store // persistently in NVM3 before proceeding. if (numberOfObjects < 2) { // Erase all objects and write initial data to NVM3 nvm3_eraseAll(&handle); nvm3_writeData(&handle, 1, data1, sizeof(data1)); nvm3_writeData(&handle, 2, data2, sizeof(data2)); } // Find size of data for object with key identifier 1 and 2 and read out nvm3_getObjectInfo(&handle, 1, &objectType, &dataLen1); if (objectType == NVM3_OBJECTTYPE_DATA) { nvm3_readData(&handle, 1, data1, dataLen1); } nvm3_getObjectInfo(&handle, 2, &objectType, &dataLen2); if (objectType == NVM3_OBJECTTYPE_DATA) { nvm3_readData(&handle, 2, data2, dataLen2); } // Update and write back data data1[0]++; data2[0]++; nvm3_writeData(&handle, 1, data1, dataLen1); nvm3_writeData(&handle, 2, data2, dataLen2); // Do repacking if needed if (nvm3_repackNeeded(&handle)) { status = nvm3_repack(&handle); if (status != SL_STATUS_OK) { // Handle error } } } ``` -------------------------------- ### Install Raspberry Pi Splash Screen Support Package Source: https://www.raspberrypi.com/documentation/computers/configuration.html Installs the 'rpi-splash-screen-support' package, which provides tools to simplify splash screen setup. ```shell sudo apt install rpi-splash-screen-support ``` -------------------------------- ### Splash Screen Parameters for cmdline.txt Source: https://www.raspberrypi.com/documentation/computers/configuration.html Example of parameters to add to '/boot/firmware/cmdline.txt' to enable a fullscreen splash image and hide the cursor. ```text fullscreen_logo_name=logo.tga fullscreen_logo=1 vt.global_cursor_default=0 ``` -------------------------------- ### GET /temperature (Non-confirmable Request; Non-confirmable Response) Source: https://datatracker.ietf.org/doc/html/rfc7252 A basic example of a Non-confirmable GET request. Both the request and the response are Non-confirmable, meaning they can be lost without any retransmission or notification mechanism. ```APIDOC ## GET /temperature (Non-confirmable Request; Non-confirmable Response) ### Description This example shows a simple Non-confirmable GET request for the 'temperature' resource. Since both the request and response are Non-confirmable (T=NON), there is no guarantee of delivery. Lost messages are not retransmitted. ### Method GET ### Endpoint /temperature ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ``` Client -> Server: Header: GET (T=NON, Code=0.01, MID=0x7d40), Token: 0x75, Uri-Path: "temperature" ``` ### Response #### Success Response (200) - **Header** (object) - CoAP header details - **Token** (string) - Token identifier - **Payload** (string) - "22.3 C" #### Response Example ``` Server -> Client: Header: 2.05 Content (T=NON, Code=2.05, MID=0xad7d), Token: 0x75, Payload: "22.3 C" ``` ``` -------------------------------- ### Enable Audio, I2C, and SPI Interfaces (config.txt) Source: https://www.raspberrypi.com/documentation/computers/configuration.html This snippet shows how to enable and configure onboard audio, I2C, and SPI interfaces directly within the `/boot/config.txt` file. It demonstrates setting I2C baud rate and allows for multiple parameters on a single line, adhering to an 80-character limit. ```config dtparam=audio=on,i2c_arm=on,i2c_arm_baudrate=400000,spi=on ``` -------------------------------- ### Matter over Thread Quick-Start Guide Source: https://docs.silabs.com/wisun/latest/wisun/2.8.0/wisun-ip-communication/04-multicast This guide details the setup and usage of Matter over Thread, explaining how Bluetooth connections are terminated for Matter communication. ```APIDOC ## Matter over Thread Quick-Start Guide ### Description This guide covers the integration and usage of Matter over Thread. It explains the process by which Bluetooth connections are terminated and subsequent communication exclusively occurs over Matter. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (N/A) N/A #### Response Example N/A ``` -------------------------------- ### Start Firmware Download using coap-client Source: https://context7_llms This command initiates a firmware download process using `coap-client`. It sends a POST request with a 'start' payload to the specified CoAP URI on the Wi-SUN node. The `-N` flag indicates a non-confirmable message, `-B 3` sets a break timeout of 3 seconds, and `-v 6` increases verbosity. ```bash coap-client -m post -N -B 3 -t text coap://[$WISUN_NODE_IPV6_ADDR]:5683/ota/dfu -e "start" -v 6 ``` -------------------------------- ### TFTP Client Download File Implementation in C Source: https://context7_llms Complete example demonstrating TFTP client initialization, option configuration, and file download functionality with data and error callbacks. The code initializes a TFTP client, sets block size options, initiates file download from a remote server, and monitors completion status. ```c #include "sl_tftp_clnt.h" // TFTP data callback // In this callback you can implement storing data chunks to flash, heap or any other memory. static void tftp_data_hnd(sl_tftp_clnt_t * const clnt, const uint8_t * const data_ptr, const uint16_t data_size) { (void)data_ptr; (void)data_size; printf("Data received chunk %u (%u bytes)\n", clnt->packet.content.data.block_num, clnt->packet.content.data.data_size); } // TFTP error callback // You can implement error handling in this callback. static void tftp_error_hnd(sl_tftp_clnt_t * const clnt, const uint16_t error_code, const char *error_msg) { (void)clnt; printf("Error (%u): %s\n", error_code, error_msg); } static void tftp_get_file(void) { static sl_tftp_clnt_t tftp_clnt = { 0 }; // Initialize Client instance if (sl_tftp_clnt_init(&tftp_clnt, "2001:db8::1", SL_TFTP_DEFAULT_HOST_PORT, tftp_data_hnd, tftp_error_hnd) != SL_STATUS_OK) { // Error handling return; } // Set blocksize option if (sl_tftp_clnt_set_option(&tftp_clnt, SL_TFTP_OPT_EXT_BLOCKSIZE, 1228) != SL_STATUS_OK) { // Error handling return; } // Start to download a file if (sl_tftp_clnt_get(&tftp_clnt, "test.txt") != SL_STATUS_OK) { // Error handling return; } while (1) { if (sl_tftp_clnt_is_op_finished(&tftp_clnt)) { printf("File download finished\n"); break; } osDelay(1); } } ``` -------------------------------- ### CoAP Communication Source: https://context7_llms Guide for establishing CoAP communication to get metering data from a CoAP meter node. ```APIDOC ## CoAP Communication ### Description This section outlines how to retrieve metering data from a Wi-SUN SoC CoAP Meter node using the libcoap client on a Raspberry Pi. ### Installation #### Description Install the libcoap library on your Raspberry Pi. #### Method apt-get commands. #### Endpoint N/A #### Request Example ```bash $sudo apt-get install libcoap2 $sudo apt-get install libcoap2-bin ``` ### Node Connection Check #### Description Verify that your Wi-SUN node is connected to the network. #### Method `wisun` CLI command. #### Endpoint N/A #### Request Example ```bash > wisun get wisun.join_state ``` #### Response Example ``` wisun.connection_state = Operational (5) ``` ### Node Global Address Retrieval #### Description Retrieve the global IPv6 address of your Wi-SUN node. #### Method `wisun` CLI command. #### Endpoint N/A #### Request Example ```bash > wisun get wisun.ip_address_global ``` #### Response Example ``` wisun.ip_address_global = fd12:3456::be33:acff:fef6:3161 ``` ### Discover Available Resources #### Description Discover the resources available on the CoAP meter node using the libcoap client. #### Method `coap-client` GET method. #### Endpoint `coap://[node_ipv6_address]:5683/.well-known/core` #### Parameters - **-m get**: Specifies the GET method. - **-N**: Non-confirmable request. - **coap://[node_ipv6_address]:5683/.well-known/core**: The discovery endpoint. #### Request Example ```bash $coap-client -m get -N coap://[fd12:3456::be33:acff:fef6:3161]:5683/.well-known/core ``` #### Response Example ``` ;ct=40,;ct=40,;rt="led";if="gpio",;rt="light";if="sensor",;rt="humidity";if="sensor",;rt="temperature";if="sensor",;rt="all";if="sensor" ``` ### Get CoAP Meter Sensor Data #### Description Retrieve all sensor data (temperature, humidity, light) from the CoAP meter node. #### Method `coap-client` GET method. #### Endpoint `coap://[node_ipv6_address]:5683/sensor/all` #### Parameters - **-m get**: Specifies the GET method. - **-N**: Non-confirmable request. - **coap://[node_ipv6_address]:5683/sensor/all**: The sensor data endpoint. #### Request Example ```bash $coap-client -m get -N coap://[fd12:3456::be33:acff:fef6:3161]:5683/sensor/all ``` #### Response Example ```json { "id": 0, "temp": 28.18, "hum": 46.36, "lx": 512 } ``` ### Get Specific Sensor Data (e.g., Humidity) #### Description Retrieve a specific sensor data value (e.g., humidity) from the CoAP meter node. #### Method `coap-client` GET method. #### Endpoint `coap://[node_ipv6_address]:5683/sensor/[sensor_type]` #### Parameters - **-m get**: Specifies the GET method. - **-N**: Non-confirmable request. - **coap://[node_ipv6_address]:5683/sensor/[sensor_type]**: The specific sensor endpoint. - **[sensor_type]** (string) - Required - The type of sensor data to retrieve (e.g., `temperature`, `humidity`, `light`). #### Request Example ```bash $coap-client -m get -N coap://[fd12:3456::be33:acff:fef6:3161]:5683/sensor/humidity ``` #### Response Example ``` 46.59 % ``` ### Get Help on CoAP Meter Capabilities #### Description Retrieve information about the capabilities and available commands of the CoAP meter. #### Method `coap-client` PUT method. #### Endpoint `coap://[node_ipv6_address]:5683/meter/help` #### Parameters - **-t text**: Specifies the text format. - **-m put**: Specifies the PUT method. - **-N**: Non-confirmable request. - **-B 1**: Set a block option (e.g., 1 second timeout). - **coap://[node_ipv6_address]:5683/meter/help**: The help endpoint. #### Request Example ```bash $coap-client -t text -m put -N -B 1 coap://[fd12:3456::be33:acff:fef6:3161]:5683/meter/help ``` #### Response Example ``` Command example: coap-client -m get -N -B 10 -t text coap://[$METER_IPV6_ADDR]:5683/$URI_PATH -e "$PAYLOAD" Requests: [PUT/POST/GET] sensor/all: - no payload or "async": GET request to get measurement data - "register": POST/PUT request to register collector - "remove": POST/PUT request to remove collector [GET] sensor/temperature: Request to get temperature [GET] sensor/humidity: Request to get humidity [GET] sensor/light: Request to get light [PUT/POST] gpio/led: Toggle LED0/LED1. Payload is index of the LED: "0" or "1" ``` ### Toggle LEDs #### Description Toggle the LEDs on the CoAP meter node remotely. #### Method `coap-client` PUT method. #### Endpoint `coap://[node_ipv6_address]:5683/gpio/led` #### Parameters - **-t text**: Specifies the text format. - **-m put**: Specifies the PUT method. - **-N**: Non-confirmable request. - **-B 1**: Set a block option (e.g., 1 second timeout). - **coap://[node_ipv6_address]:5683/gpio/led**: The GPIO LED endpoint. - **-e "[LED_INDEX]"**: The payload specifying which LED to toggle ('0' for LED0, '1' for LED1). #### Request Example for LED0 ```bash $coap-client -t text -m put -N -B 1 coap://[fd12:3456::be33:acff:fef6:3161]:5683/gpio/led -e "0" ``` #### Request Example for LED1 ```bash $coap-client -t text -m put -N -B 1 coap://[fd12:3456::be33:acff:fef6:3161]:5683/gpio/led -e "1" ``` ``` -------------------------------- ### UART Driver Example - Non-blocking Transmit Source: https://docs.silabs.com/wisun/latest/wisun/2.8.0/wisun-phy-quick-start This code example demonstrates how to initiate a non-blocking transmit using the UARTDRV (UART Driver) component from the Gecko Platform API. It requires a queue size configuration. ```c /* Start a non-blocking transmit. Parameters ... */ { \ .head = 0, \ .tail = 0, \ .used = 0, \ .size = qSize, } ``` -------------------------------- ### Load LIRC Overlay with Parameters (config.txt) Source: https://www.raspberrypi.com/documentation/computers/configuration.html This demonstrates two methods for loading a device tree overlay (`lirc-rpi`) and its associated parameters in `/boot/config.txt`. Parameters can be appended directly to the `dtoverlay` line or specified on subsequent `dtparam` lines. Overlay parameters are active until the next overlay is loaded. ```config dtoverlay=lirc-rpi dtparam=gpio_out_pin=16 dtparam=gpio_in_pin=17 dtparam=gpio_in_pull=down ``` ```config dtoverlay=lirc-rpi,gpio_out_pin=16,gpio_in_pin=17,gpio_in_pull=down ``` -------------------------------- ### Initialize App OS Statistic Service (C) Source: https://context7_llms Initializes the application OS statistic service, including thread and statistic storage setup. This function is essential for starting the memory statistics collection. ```c void app_os_stat_init(void); ``` -------------------------------- ### Launch Simplicity Studio with Wayland Display Protocol Source: https://docs.silabs.com/simplicity-studio-5-users-guide/latest/ss-5-users-guide-getting-started/install-ss-5-and-software If the Wayland display protocol is in use, Simplicity Studio should be launched from the terminal using this command. This ensures proper rendering and compatibility within the Wayland environment. ```bash ./studiowayland.sh ``` -------------------------------- ### Build wisun-br-gui Plugin Source: https://github.com/SiliconLabs/wisun-br-gui Builds the Wi-SUN Border Router GUI plugin using the 'make' command. This process compiles the source code and prepares the plugin for installation. ```bash make ``` -------------------------------- ### Start Wi-SUN Firmware Update Source: https://docs.silabs.com/wisun/latest/wisun-stack-api/sl-wisun-ota-dfu-api Initiates the firmware update process. This function triggers the download and installation of a new firmware image over the air. Ensure that the host address and GBL file path are correctly set before calling this function. ```c sl_status_t sl_wisun_ota_dfu_start_fw_update(void); ``` -------------------------------- ### Copy wsbrd Configuration Example Source: https://github.com/SiliconLabs/wisun-br-gui Copies an example wsbrd configuration file to the standard location (/etc/wsbrd.conf). This is a crucial step for setting up the Wi-SUN border router service, allowing for customization of its behavior. ```bash sudo cp /usr/local/share/doc/wsbrd/examples/wsbrd.conf /etc ``` -------------------------------- ### Manually Start CPCd Source: https://context7_llms Starts the CPCd daemon using a configuration file. This is a prerequisite for starting wsbrd. ```bash sudo cpcd --conf /usr/local/etc/cpcd.conf ``` -------------------------------- ### Run wisun-br-gui in Development Mode Source: https://github.com/SiliconLabs/wisun-br-gui Installs the Wi-SUN Border Router GUI module directly from the git tree for development purposes. This allows for easier testing and iteration during development. ```bash make devel-install ``` -------------------------------- ### Manually Start CPCd with Encryption Source: https://context7_llms Starts the CPCd daemon with a specified configuration file and enables ECDH encryption. This command is typically run before starting wsbrd. ```bash sudo cpcd --conf /usr/local/etc/cpcd.conf --bind ecdh ``` -------------------------------- ### NVM3 Initialization and Counter Objects (C) Source: https://docs.silabs.com/gecko-platform/latest/platform-driver/nvm3 Illustrates the initialization of NVM3 and the usage of counter objects, which provide a space-efficient method for storing 32-bit values and minimizing NVM wear. This example defines a static data area and uses a user-defined key for the counter. ```c #include "nvm3.h" #include "nvm3_hal_flash.h" // Create a NVM area of 24kB (size must equal N * FLASH_PAGE_SIZE, N is integer). Create a cache of 10 entries. NVM3_DEFINE_SECTION_STATIC_DATA(nvm3Data2, 24576, 10); #define USER_KEY 1 // This macro creates the following: // 1. An array to hold NVM data named nvm3Data2_nvm // 2. A section called nvm3Data2_section containing nvm3Data2_nvm. The ```