### GSPI Callback with RTOS Mutex Example Source: https://github.com/SiliconLabs/wiseconnect/blob/master/docs/software-reference/manuals/siwx91x-software-reference-manual Example of a GSPI callback function demonstrating the use of a Mutex for thread-safe access to shared resources in an RTOS environment. This prevents race conditions during concurrent access. ```c void GSPI_TransferComplete_Callback(void) { // Lock the mutex before accessing shared resources xSemaphoreTake(xMutex, portMAX_DELAY); // Perform operations on shared resources // Release the mutex after operations are complete xSemaphoreGive(xMutex); } ``` -------------------------------- ### inc_serv_s Source: https://context7_llms Defines an included service. ```APIDOC ## POST /inc_serv_s ### Description Declares that a service includes another service. ### Method POST ### Endpoint /inc_serv_s ### Parameters #### Request Body - **service_handle** (integer) - Required - Handle of the primary service. - **included_service_handle** (integer) - Required - Handle of the included service. ### Request Example { "service_handle": 2, "included_service_handle": 5 } ### Response #### Success Response (200) - **status** (integer) - Operation status code. #### Response Example { "status": 0 } ``` -------------------------------- ### char_serv_s Source: https://context7_llms Defines a characteristic service. ```APIDOC ## POST /char_serv_s ### Description Defines a Bluetooth characteristic within a service. ### Method POST ### Endpoint /char_serv_s ### Parameters #### Request Body - **uuid** (string) - Required - The UUID of the characteristic. - **properties** (integer) - Required - Properties of the characteristic (e.g., read, write). ### Request Example { "uuid": "2a37", "properties": 10 } ### Response #### Success Response (200) - **status** (integer) - Operation status code. #### Response Example { "status": 0 } ``` -------------------------------- ### profile_descriptor_s Source: https://context7_llms Defines a profile descriptor. ```APIDOC ## POST /profile_descriptor_s ### Description Defines a profile descriptor, typically used in GATT services. ### Method POST ### Endpoint /profile_descriptor_s ### Parameters #### Request Body - **type** (integer) - Required - The type of the descriptor. - **value_handle** (integer) - Required - The handle of the value associated with the descriptor. ### Request Example { "type": 1, "value_handle": 10 } ### Response #### Success Response (200) - **status** (integer) - Operation status code. #### Response Example { "status": 0 } ``` -------------------------------- ### rsi_ble_ae_set_periodic_adv_create_sync_s Source: https://context7_llms Creates a synchronization with a periodic advertising source. ```APIDOC ## POST /rsi_ble_ae_set_periodic_adv_create_sync_s ### Description Establishes a connection to synchronize with periodic advertising data from a specific device. ### Method POST ### Endpoint /rsi_ble_ae_set_periodic_adv_create_sync_s ### Parameters #### Request Body - **address_type** (integer) - Required - Type of the advertiser's address (public or random). - **address** (string) - Required - The Bluetooth address of the advertiser. - **interval** (integer) - Required - The expected periodic advertising interval. ### Request Example { "address_type": 1, "address": "AA:BB:CC:DD:EE:FF", "interval": 1000 } ### Response #### Success Response (200) - **sync_handle** (integer) - A handle identifying the synchronization. - **status** (integer) - Operation status code. #### Response Example { "sync_handle": 1, "status": 0 } ``` -------------------------------- ### BLE Event Prepare Write Source: https://context7_llms Handles a BLE prepare write event. ```APIDOC ## POST /rsi_ble_event_prepare_write_s ### Description Handles a BLE prepare write event. ### Method POST ### Endpoint /rsi_ble_event_prepare_write_s ### Parameters #### Request Body - **prepare_write_info** (object) - Required - Information about the prepare write operation. ### Request Example ```json { "prepare_write_info": { "attribute_handle": "handle123", "offset": 0, "value": "partial_data" } } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### rsi_ble_initiation_params_s Source: https://context7_llms Sets initiation parameters for BLE connections. ```APIDOC ## POST /rsi_ble_initiation_params_s ### Description Configures parameters that control how the device initiates BLE connections. ### Method POST ### Endpoint /rsi_ble_initiation_params_s ### Parameters #### Request Body - **scan_interval** (integer) - Required - Scan interval during initiation. - **scan_window** (integer) - Required - Scan window during initiation. - **conn_interval_min** (integer) - Required - Minimum connection interval. - **conn_interval_max** (integer) - Required - Maximum connection interval. - **conn_latency** (integer) - Required - Connection latency. - **supervision_timeout** (integer) - Required - Supervision timeout. ### Request Example { "scan_interval": 100, "scan_window": 50, "conn_interval_min": 75, "conn_interval_max": 85, "conn_latency": 0, "supervision_timeout": 1000 } ### Response #### Success Response (200) - **status** (integer) - Operation status code. #### Response Example { "status": 0 } ``` -------------------------------- ### rsi_ble_ae_extended_create_connect_s Source: https://context7_llms Initiates an extended BLE connection. ```APIDOC ## POST /rsi_ble_ae_extended_create_connect_s ### Description Attempts to establish a BLE connection using extended advertising parameters. ### Method POST ### Endpoint /rsi_ble_ae_extended_create_connect_s ### Parameters #### Request Body - **address_type** (integer) - Required - Type of the peer device's address. - **address** (string) - Required - The Bluetooth address of the peer device. - **connection_timeout** (integer) - Required - Timeout for establishing the connection. ### Request Example { "address_type": 1, "address": "AA:BB:CC:DD:EE:FF", "connection_timeout": 5000 } ### Response #### Success Response (200) - **connection_handle** (integer) - Handle for the established connection. - **status** (integer) - Operation status code. #### Response Example { "connection_handle": 1, "status": 0 } ``` -------------------------------- ### char_serv_data_s Source: https://context7_llms Defines characteristic service data. ```APIDOC ## POST /char_serv_data_s ### Description Provides data associated with a Bluetooth characteristic service. ### Method POST ### Endpoint /char_serv_data_s ### Parameters #### Request Body - **data_type** (integer) - Required - Type of data. - **data** (string) - Required - The actual data payload. ### Request Example { "data_type": 1, "data": "010203" } ### Response #### Success Response (200) - **status** (integer) - Operation status code. #### Response Example { "status": 0 } ``` -------------------------------- ### Crypto Utility API Documentation Source: https://context7_llms Details utility functions for cryptographic operations. ```APIDOC ## Crypto Utility API Documentation ### Description This section describes the utility functions available for cryptographic operations, providing helper functionalities. ### Endpoint N/A (This is a conceptual grouping of API documentation links) ### Links - Crypto Utility: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-crypto/crypto-utility.md - Crypto Utility Functions: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-crypto/crypto-utility-functions.md ``` -------------------------------- ### att_desc_s Source: https://context7_llms Defines an attribute descriptor. ```APIDOC ## POST /att_desc_s ### Description Defines an attribute descriptor, which describes an attribute within a GATT profile. ### Method POST ### Endpoint /att_desc_s ### Parameters #### Request Body - **uuid** (string) - Required - The UUID of the attribute. - **permissions** (integer) - Required - Permissions for the attribute. ### Request Example { "uuid": "2a00", "permissions": 2 } ### Response #### Success Response (200) - **status** (integer) - Operation status code. #### Response Example { "status": 0 } ``` -------------------------------- ### Crypto Common API Documentation Source: https://context7_llms Provides documentation for common cryptographic functionalities, including constants and functions. ```APIDOC ## Crypto Common API Documentation ### Description This section outlines the common cryptographic APIs, including constants and general-purpose functions used across various cryptographic operations. ### Endpoint N/A (This is a conceptual grouping of API documentation links) ### Links - Crypto Common: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-crypto/crypto-common.md - Crypto Constants: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-crypto/crypto-constants.md - Crypto Functions: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-crypto/crypto-functions.md ``` -------------------------------- ### inc_serv_data_s Source: https://context7_llms Defines included service data. ```APIDOC ## POST /inc_serv_data_s ### Description Provides data related to an included service within a GATT profile. ### Method POST ### Endpoint /inc_serv_data_s ### Parameters #### Request Body - **start_handle** (integer) - Required - The starting handle of the included service. - **end_handle** (integer) - Required - The ending handle of the included service. - **uuid** (string) - Required - The UUID of the included service. ### Request Example { "start_handle": 5, "end_handle": 9, "uuid": "1801" } ### Response #### Success Response (200) - **status** (integer) - Operation status code. #### Response Example { "status": 0 } ``` -------------------------------- ### Ping API Documentation Source: https://context7_llms Documentation for the Ping network protocol APIs, including overview and functions. ```APIDOC ## Ping API Documentation ### Description This section provides documentation for the Ping network protocol, including an overview of its usage and available API functions. ### Endpoint N/A (This is a conceptual grouping of API documentation links) ### Links - Ping Overview: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-ping/index.md - Ping APIs: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-ping/sl-ping-apis.md - Ping Functions: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-ping/sl-ping-functions.md ``` -------------------------------- ### BLE Read Request Source: https://context7_llms Initiates a BLE read request. ```APIDOC ## POST /rsi_ble_read_req_s ### Description Initiates a BLE read request. ### Method POST ### Endpoint /rsi_ble_read_req_s ### Parameters #### Request Body - **read_request_info** (object) - Required - Information for the read request. ### Request Example ```json { "read_request_info": { "attribute_handle": "handle123" } } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### ae_adv_params_s Source: https://context7_llms Defines advertising parameters for BLE advertising. ```APIDOC ## POST /ae_adv_params_s ### Description Configures the parameters for BLE advertising. ### Method POST ### Endpoint /ae_adv_params_s ### Parameters #### Request Body - **adv_interval** (integer) - Required - Advertising interval in milliseconds. - **adv_type** (integer) - Required - Type of advertising (e.g., connectable, scannable). - **channel_map** (integer) - Required - Channel map for advertising. - **adv_filter_policy** (integer) - Required - Advertising filter policy. ### Request Example { "adv_interval": 100, "adv_type": 0, "channel_map": 7, "adv_filter_policy": 0 } ### Response #### Success Response (200) - **status** (integer) - Operation status code. #### Response Example { "status": 0 } ``` -------------------------------- ### BLE Event Write Source: https://context7_llms Handles a BLE write event. ```APIDOC ## POST /rsi_ble_event_write_s ### Description Handles a BLE write event. ### Method POST ### Endpoint /rsi_ble_event_write_s ### Parameters #### Request Body - **write_info** (object) - Required - Information about the write operation. ### Request Example ```json { "write_info": { "attribute_handle": "handle123", "value": "new_data" } } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### ae_periodic_adv_params Source: https://context7_llms Configures parameters for periodic advertising. ```APIDOC ## POST /ae_periodic_adv_params ### Description Sets the parameters for periodic advertising. ### Method POST ### Endpoint /ae_periodic_adv_params ### Parameters #### Request Body - **interval** (integer) - Required - Periodic advertising interval in milliseconds. - **data_len** (integer) - Required - Length of the periodic advertising data. ### Request Example { "interval": 1000, "data_len": 30 } ### Response #### Success Response (200) - **status** (integer) - Operation status code. #### Response Example { "status": 0 } ``` -------------------------------- ### BLE Response Add Service Source: https://context7_llms Adds a new service to a profile. ```APIDOC ## POST /rsi_ble_resp_add_serv_s ### Description Adds a new service to a profile. ### Method POST ### Endpoint /rsi_ble_resp_add_serv_s ### Parameters #### Request Body - **profile_id** (string) - Required - The ID of the profile. - **service_details** (object) - Required - Details of the service to add. ### Request Example ```json { "profile_id": "profile1", "service_details": { "name": "NewService", "uuid": "1800" } } ``` ### Response #### Success Response (200) - **service_id** (string) - The ID of the newly added service. #### Response Example ```json { "service_id": "new_service_id" } ``` ``` -------------------------------- ### BLE Periodic Advertising Sync Established Source: https://context7_llms Handles the establishment of a periodic advertising synchronization. ```APIDOC ## POST /rsi_ble_per_adv_sync_estbl_s ### Description Handles the establishment of a periodic advertising synchronization. ### Method POST ### Endpoint /rsi_ble_per_adv_sync_estbl_s ### Parameters #### Request Body - **sync_estbl_info** (object) - Required - Information about the synchronization establishment. ### Request Example ```json { "sync_estbl_info": { "sync_handle": "sync123", "adv_sid": 1, "advertiser_address": "AA:BB:CC:DD:EE:FF" } } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### BLE Response Profiles List Source: https://context7_llms Retrieves a list of available BLE profiles. ```APIDOC ## GET /rsi_ble_resp_profiles_list_s ### Description Retrieves a list of available BLE profiles. ### Method GET ### Endpoint /rsi_ble_resp_profiles_list_s ### Parameters None ### Request Example None ### Response #### Success Response (200) - **profiles** (array) - A list of BLE profile identifiers. #### Response Example ```json { "profiles": ["profile1", "profile2"] } ``` ``` -------------------------------- ### Get MCU Wakeup Status - C Source: https://github.com/SiliconLabs/wiseconnect/blob/master/docs/software-reference/manuals/siwx91x-software-reference-manual Retrieves the wakeup status of the MCU. This function, RSI_PS_GetWkpUpStatus, is used to determine the source of the wakeup event. ```c //!Get wakeup source RSI_PS_GetWkpUpStatus(); ``` -------------------------------- ### Update SiWx91x Network Initialization and Deinitialization (C) Source: https://github.com/SiliconLabs/wiseconnect/blob/master/docs/software-reference/developer-guides/migrating-from-v3-1-0 Shows API changes for network initialization and deinitialization in the SiWx91x module. `sl_net_init` now includes a `network_context` parameter, while `sl_net_deinit`, `sl_net_wifi_client_deinit`, and `sl_net_wifi_ap_deinit` have removed the `context` parameter. ```c sl_status_t sl_net_init(sl_net_interface_t interface, const void *configuration, void *context, sl_net_event_handler_t event_handler); sl_status_t sl_net_init(sl_net_interface_t interface, const void *configuration, void *network_context, sl_net_event_handler_t event_handler); sl_status_t sl_net_deinit(sl_net_interface_t interface, void *context); sl_status_t sl_net_deinit(sl_net_interface_t interface); sl_status_t sl_net_wifi_client_deinit(sl_net_interface_t interface, void *context); sl_status_t sl_net_wifi_client_deinit(sl_net_interface_t interface); sl_status_t sl_net_wifi_ap_deinit(sl_net_interface_t interface, void *context); sl_status_t sl_net_wifi_ap_deinit(sl_net_interface_t interface); ``` -------------------------------- ### Bluetooth Local Name Management Source: https://context7_llms Functions for setting and getting the local Bluetooth device name. This name is how the device is identified by other Bluetooth devices in the vicinity. ```c void rsi_bt_req_set_local_name_s(uint8_t *local_name); void rsi_bt_resp_get_local_name_s(uint8_t *local_name); ``` -------------------------------- ### Key Wrap API Documentation Source: https://context7_llms Details the Key Wrap APIs, including functions, types, and configuration parameters. ```APIDOC ## Key Wrap API Documentation ### Description This section covers the Key Wrap APIs, which are used for securely wrapping and unwrapping cryptographic keys. It includes information on functions, types, and configuration structures. ### Endpoint N/A (This is a conceptual grouping of API documentation links) ### Links - Key Wrap: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-crypto/crypto-wrap.md - Key Wrap Functions: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-crypto/crypto-wrap-functions.md - Key Wrap Types: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-crypto/crypto-wrap-types.md - sl_si91x_wrap_config_t: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-crypto/sl-si91x-wrap-config-t.md ``` -------------------------------- ### Common BLE Operations Source: https://context7_llms APIs for common BLE operations such as getting stack version, setting antenna, operating mode, power mode, and configuring transmission power. ```APIDOC ## GET /rsi_bt_resp_get_bt_stack_version_s ### Description Retrieves the version of the Bluetooth stack. ### Method GET ### Endpoint /rsi_bt_resp_get_bt_stack_version_s ### Parameters None ### Request Example None ### Response #### Success Response (200) - **version** (string) - The Bluetooth stack version. #### Response Example ```json { "version": "3.5.2" } ``` --- ## POST /rsi_ble_set_antenna_s ### Description Configures the antenna to be used for BLE operations. ### Method POST ### Endpoint /rsi_ble_set_antenna_s ### Parameters #### Request Body - **antenna_id** (integer) - The ID of the antenna to select (e.g., 0 for internal, 1 for external). ### Request Example ```json { "antenna_id": 0 } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` --- ## POST /rsi_bt_set_feature_bitmap_s ### Description Sets the feature bitmap for Bluetooth operations. ### Method POST ### Endpoint /rsi_bt_set_feature_bitmap_s ### Parameters #### Request Body - **feature_bitmap** (integer) - The bitmap value representing the desired features. ### Request Example ```json { "feature_bitmap": 1 } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` --- ## POST /rsi_ble_oper_mode_s ### Description Sets the operating mode for the BLE controller. ### Method POST ### Endpoint /rsi_ble_oper_mode_s ### Parameters #### Request Body - **mode** (integer) - The desired operating mode (e.g., 0 for master, 1 for slave). ### Request Example ```json { "mode": 0 } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` --- ## POST /rsi_ble_power_mode_s ### Description Configures the power mode for the BLE controller. ### Method POST ### Endpoint /rsi_ble_power_mode_s ### Parameters #### Request Body - **power_mode** (integer) - The desired power mode (e.g., 0 for active, 1 for sleep). ### Request Example ```json { "power_mode": 0 } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` --- ## POST /rsi_bt_set_antenna_tx_power_level_s ### Description Sets the transmit power level for the selected antenna. ### Method POST ### Endpoint /rsi_bt_set_antenna_tx_power_level_s ### Parameters #### Request Body - **power_level** (integer) - The desired transmit power level. ### Request Example ```json { "power_level": 5 } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` --- ## GET /rsi_bt_per_stats_s ### Description Retrieves statistics for Bluetooth PER (Packet Error Rate) tests. ### Method GET ### Endpoint /rsi_bt_per_stats_s ### Parameters None ### Request Example None ### Response #### Success Response (200) - **stats** (object) - An object containing PER statistics. - **tx_packets** (integer) - Number of packets transmitted. - **rx_packets** (integer) - Number of packets received. - **errors** (integer) - Number of errors. #### Response Example ```json { "stats": { "tx_packets": 1000, "rx_packets": 995, "errors": 5 } } ``` --- ## POST /rsi_bt_set_local_bd_addr_s ### Description Sets the local Bluetooth Device Address (BD_ADDR). ### Method POST ### Endpoint /rsi_bt_set_local_bd_addr_s ### Parameters #### Request Body - **bd_addr** (string) - The Bluetooth Device Address in XX:XX:XX:XX:XX:XX format. ### Request Example ```json { "bd_addr": "00:1A:7D:DA:71:03" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` --- ## POST /rsi_bt_cmd_update_gain_table_offset_or_maxpower_s ### Description Updates the gain table offset or maximum power for Bluetooth. ### Method POST ### Endpoint /rsi_bt_cmd_update_gain_table_offset_or_maxpower_s ### Parameters #### Request Body - **type** (integer) - The type of update (e.g., 0 for offset, 1 for max power). - **value** (integer) - The value to update. ### Request Example ```json { "type": 0, "value": 10 } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Update PWM Configuration File Path in Board Config Source: https://github.com/SiliconLabs/wiseconnect/blob/master/docs/software-reference/developer-guides/migrating-from-v3-1-4 This snippet shows how to update the board configuration file to point to the correct PWM initialization header for the led0 instance. This is necessary when migrating from SDK v3.1.4 to v3.2.0 if the PWM component is used with led0. ```text - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: led0 path: common_config/sl_si91x_pwm_init_led0_config.h ``` -------------------------------- ### BLE Get Local Attribute Value Source: https://context7_llms Retrieves the value of a local attribute from the GATT server. This function is used to read attribute values that are managed by the local device. It requires the attribute handle and returns the attribute's value. ```c rsi_ble_get_local_att_value_s(); ``` -------------------------------- ### BLE Get Supported Advertising Sets Source: https://context7_llms Retrieves the number of supported advertising sets for Extended Advertising. This function is used to query the device's capability for managing multiple advertising instances. It does not require specific inputs and returns the count of available advertising sets. ```c rsi_ble_ae_get_supported_no_of_adv_sets_s(); ``` -------------------------------- ### Crypto Multithread API Documentation Source: https://context7_llms Explains the APIs for handling cryptographic operations in a multithreaded environment, including variables and functions. ```APIDOC ## Crypto Multithread API Documentation ### Description This section covers the Crypto Multithread APIs, which are designed for managing cryptographic operations within a multithreaded context. It includes information on associated variables and functions. ### Endpoint N/A (This is a conceptual grouping of API documentation links) ### Links - Crypto Multithread: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-crypto/crypto-thread.md - Crypto Multithread Variables: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-crypto/crypto-thread-variables.md - Crypto Multithread Functions: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-crypto/crypto-thread-functions.md ``` -------------------------------- ### HTTP API Documentation Source: https://context7_llms Documentation for the HTTP application protocol APIs, including overview, functions, and client/server specific functions. ```APIDOC ## HTTP API Documentation ### Description This section details the HTTP (Hypertext Transfer Protocol) APIs, providing functionalities for both HTTP clients and servers. It includes an overview and specific function references. ### Endpoint N/A (This is a conceptual grouping of API documentation links) ### Links - HTTP Overview: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-http/index.md - HTTP APIs: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-http/service-http.md - HTTP Functions: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-http/service-http-functions.md - HTTP Server Functions: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-http/service-http-server-functions.md - HTTP Client Functions: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-http/service-http-client-functions.md ``` -------------------------------- ### Update Wi-Fi Initialization and Event Handling (C) Source: https://github.com/SiliconLabs/wiseconnect/blob/master/docs/software-reference/developer-guides/migrating-from-v3-1-0 Shows the evolution of Wi-Fi initialization and default event handler signatures in the Silabs SDK. The primary change in `sl_wifi_init` is the addition of a `sl_wifi_device_context_t` parameter, while `default_wifi_event_handler` is renamed to `sl_wifi_default_event_handler`. ```c sl_status_t sl_wifi_init(const sl_wifi_device_configuration_t *configuration, sl_wifi_event_handler_t event_handler); sl_status_t sl_wifi_init(const sl_wifi_device_configuration_t *configuration, sl_wifi_device_context_t *device_context, sl_wifi_event_handler_t event_handler); sl_status_t default_wifi_event_handler(sl_wifi_event_t event, sl_wifi_buffer_t *buffer); sl_status_t sl_wifi_default_event_handler(sl_wifi_event_t event, sl_wifi_buffer_t *buffer); ``` -------------------------------- ### Configure Wireless Wakeup Source - C Source: https://github.com/SiliconLabs/wiseconnect/blob/master/docs/software-reference/manuals/siwx91x-software-reference-manual Configures the wakeup source for the MCU to be wireless-based. This function, RSI_PS_SetWkpSources, is part of the power management API. ```c //!Configure Wakeup-Source as wireless based RSI_PS_SetWkpSources(WIRELESS_BASED_WAKEUP); ``` -------------------------------- ### rsi_ble_req_add_att_s Source: https://context7_llms Adds an attribute to a GATT service. ```APIDOC ## POST /rsi_ble_req_add_att_s ### Description Adds a new attribute (like a characteristic or descriptor) to a GATT service definition. ### Method POST ### Endpoint /rsi_ble_req_add_att_s ### Parameters #### Request Body - **service_handle** (integer) - Required - The handle of the service to which the attribute is added. - **attribute_type** (integer) - Required - Type of attribute to add (e.g., characteristic, descriptor). - **attribute_uuid** (string) - Required - UUID of the attribute. ### Request Example { "service_handle": 2, "attribute_type": 2, "attribute_uuid": "2a37" } ### Response #### Success Response (200) - **attribute_handle** (integer) - The handle assigned to the newly added attribute. - **status** (integer) - Operation status code. #### Response Example { "attribute_handle": 15, "status": 0 } ``` -------------------------------- ### Update SiWx91x Device Management Constants (v3.1.0 to v3.1.1) Source: https://github.com/SiliconLabs/wiseconnect/blob/master/docs/software-reference/developer-guides/migrating-from-v3-1-0 This snippet outlines the updates to SiWx91x device management constants from version v3.1.0 to v3.1.1. It shows the addition of 'SL_SI91X_' prefixes to various constants for consistency. ```c /* SiWx91x Device Management Constant Updates v3.1.0 -> v3.1.1 */ // RAM_LEVEL_NWP_MEDIUM_MCU_MEDIUM -> SL_SI91X_RAM_LEVEL_NWP_MEDIUM_MCU_MEDIUM // RAM_LEVEL_NWP_ADV_MCU_BASIC -> SL_SI91X_RAM_LEVEL_NWP_ADV_MCU_BASIC // RAM_LEVEL_NWP_BASIC_MCU_ADV -> SL_SI91X_RAM_LEVEL_NWP_BASIC_MCU_ADV // RAM_LEVEL_NWP_ALL_MCU_ZERO -> SL_SI91X_RAM_LEVEL_NWP_ALL_MCU_ZERO // SI91X_JOIN_FEAT_STA_BG_ONLY_MODE_ENABLE -> SL_SI91X_JOIN_FEAT_STA_BG_ONLY_MODE_ENABLE // SI91X_JOIN_FEAT_LISTEN_INTERVAL_VALID -> SL_SI91X_JOIN_FEAT_LISTEN_INTERVAL_VALID // SI91X_JOIN_FEAT_QUICK_JOIN -> SL_SI91X_JOIN_FEAT_QUICK_JOIN // SI91X_JOIN_FEAT_CCXV2_FEATURE -> SL_SI91X_JOIN_FEAT_CCXV2_FEATURE // SI91X_JOIN_FEAT_BSSID_BASED -> SL_SI91X_JOIN_FEAT_BSSID_BASED // SI91X_JOIN_FEAT_MFP_CAPABLE_ONLY -> SL_SI91X_JOIN_FEAT_MFP_CAPABLE_ONLY // SI91X_JOIN_FEAT_MFP_CAPABLE_REQUIRED -> SL_SI91X_JOIN_FEAT_MFP_CAPABLE_REQUIRED // SI91X_JOIN_FEAT_PS_CMD_LISTEN_INTERVAL_VALID -> SL_SI91X_JOIN_FEAT_PS_CMD_LISTEN_INTERVAL_VALID // SSL_HIGH_STREAMING_BIT -> SL_SI91X_FEAT_SSL_HIGH_STREAMING_BIT // FEAT_SECURE_ATTESTATION -> SL_SI91X_FEAT_SECURE_ATTESTATION // SL_SI91X_FEAT_CUSTOM_FEAT_EXTENTION_VALID -> SL_SI91X_CUSTOM_FEAT_EXTENTION_VALID // CHIP_917 -> SLI_SI917 // SI91X_TAKE_M4_64K -> SL_SI91X_TAKE_M4_64K // SI91X_GET_IPMU_PROGRAMMING_VALUES -> SL_SI91X_GET_IPMU_PROGRAMMING_VALUES // SI91X_READ_TA_REGISTER -> SL_SI91X_READ_TA_REGISTER // SI91X_WRITE_TA_REGISTER -> SL_SI91X_WRITE_TA_REGISTER // SI91X_ENABLE_XTAL -> SL_SI91X_ENABLE_XTAL // SI91X_WRITE_TO_COMMON_FLASH -> SL_SI91X_WRITE_TO_COMMON_FLASH ``` -------------------------------- ### BLE Event Types Overview Source: https://context7_llms This section provides an overview of the different BLE event types available in the API. ```APIDOC ## BLE Event Types This documentation covers various event types generated by the BLE stack, providing insights into device state, connection status, security procedures, and data exchange. ### Event Type List - **rsi_ble_event_adv_report_s**: Handles advertisement reports from peripheral devices. - **rsi_ble_event_conn_status_s**: Provides information about connection status changes. - **rsi_ble_event_enhnace_conn_status_s**: Details enhanced connection status updates. - **rsi_ble_event_disconnect_s**: Indicates when a BLE connection is disconnected. - **rsi_ble_event_le_ping_time_expired_s**: Signals that the LE Ping timeout has occurred. - **rsi_bt_event_le_ltk_request_s**: Handles requests for Link Layer Keys (LTK). - **rsi_bt_event_le_security_keys_s**: Provides security-related key information. - **rsi_bt_event_encryption_enabled_s**: Confirms that encryption has been enabled on the connection. - **rsi_bt_event_smp_req_s**: Represents a Security Management Protocol (SMP) request. - **rsi_bt_event_smp_resp_s**: Represents a Security Management Protocol (SMP) response. - **rsi_bt_event_smp_passkey_s**: Handles SMP passkey entry events. - **rsi_bt_event_smp_passkey_display_s**: Indicates an SMP passkey should be displayed to the user. - **rsi_bt_event_sc_passkey_s**: Handles Secure Connections (SC) passkey events. - **rsi_bt_event_smp_failed_s**: Signals an SMP authentication failure. - **rsi_bt_event_sc_method_s**: Provides information about the Secure Connections pairing method. - **rsi_bt_event_ctkd_s**: Handles Channel Translation Key Distribution (CTKD) events. - **rsi_ble_event_phy_update_s**: Informs about a change in the BLE PHY layer. - **rsi_ble_event_conn_update_s**: Details connection parameter updates. - **rsi_ble_event_remote_conn_param_req_s**: Handles requests for remote connection parameters. - **rsi_ble_event_remote_features_s**: Provides information about the remote device's features. - **rsi_ble_event_le_dev_buf_ind_s**: Indicates an LE device buffer indication. - **rsi_ble_event_data_length_update_s**: Signals an update to the data length for BLE packets. - **uuid128_s**: Represents a 128-bit UUID structure. - **rsi_ble_event_error_resp_s**: Handles error responses for BLE operations. - **rsi_ble_event_gatt_desc_s**: Provides GATT descriptor information. - **rsi_ble_event_profiles_list_s**: Returns a list of discovered GATT profiles. - **rsi_ble_event_profile_by_uuid_s**: Retrieves GATT profile information by UUID. - **rsi_ble_event_read_by_type1_s**, **rsi_ble_event_read_by_type2_s**, **rsi_ble_event_read_by_type3_s**: Handle read by type operations for GATT attributes. - **rsi_ble_event_att_value_s**: Contains the value of a GATT attribute. - **rsi_ble_set_att_resp_s**: Response for setting a GATT attribute value. - **rsi_ble_prepare_write_resp_s**: Response for a prepare write operation on GATT attributes. For detailed information on each event type, please refer to the specific documentation links provided in the project content. ``` -------------------------------- ### rsi_ble_ae_set_periodic_sync_s Source: https://context7_llms Sets parameters for periodic synchronization. ```APIDOC ## POST /rsi_ble_ae_set_periodic_sync_s ### Description Configures parameters related to synchronizing with periodic advertising. ### Method POST ### Endpoint /rsi_ble_ae_set_periodic_sync_s ### Parameters #### Request Body - **sync_timeout** (integer) - Required - Timeout for synchronization in seconds. ### Request Example { "sync_timeout": 5 } ### Response #### Success Response (200) - **status** (integer) - Operation status code. #### Response Example { "status": 0 } ``` -------------------------------- ### SiWx91x Device Management Constants Update Source: https://github.com/SiliconLabs/wiseconnect/blob/master/docs/software-reference/developer-guides/migrating-from-v3-1-0 This section details the updated SiWx91x Device Management constants from version v3.1.0 to v3.1.1. It covers changes in RAM levels, feature flags, chip identifiers, and enumeration types related to device management and networking. ```APIDOC ## SiWx91x Device Management Constants Update (v3.1.0 to v3.1.1) ### Description This section details the updated SiWx91x Device Management constants from version v3.1.0 to v3.1.1. It covers changes in RAM levels, feature flags, chip identifiers, and enumeration types related to device management and networking. ### Method N/A (Documentation of constant changes) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (200) - **Module** (string) - The module the constant belongs to. - **v3.1.0** (string) - The constant value in version 3.1.0. - **v3.1.1** (string) - The constant value in version 3.1.1. #### Response Example ```json { "Module": "SiWx91x Device Management", "v3.1.0": "RAM_LEVEL_NWP_MEDIUM_MCU_MEDIUM", "v3.1.1": "SL_SI91X_RAM_LEVEL_NWP_MEDIUM_MCU_MEDIUM" } ``` ``` -------------------------------- ### rsi_ble_ae_set_periodic_adv_terminate_sync_s Source: https://context7_llms Terminates synchronization with periodic advertising. ```APIDOC ## POST /rsi_ble_ae_set_periodic_adv_terminate_sync_s ### Description Stops the synchronization with a previously established periodic advertising connection. ### Method POST ### Endpoint /rsi_ble_ae_set_periodic_adv_terminate_sync_s ### Parameters #### Request Body - **sync_handle** (integer) - Required - The handle of the synchronization to terminate. ### Request Example { "sync_handle": 1 } ### Response #### Success Response (200) - **status** (integer) - Operation status code. #### Response Example { "status": 0 } ``` -------------------------------- ### rsi_ble_ae_set_scan_enable_s Source: https://context7_llms Enables or disables BLE scanning. ```APIDOC ## POST /rsi_ble_ae_set_scan_enable_s ### Description Controls the initiation and termination of BLE scanning. ### Method POST ### Endpoint /rsi_ble_ae_set_scan_enable_s ### Parameters #### Request Body - **enable** (boolean) - Required - True to start scanning, False to stop. ### Request Example { "enable": true } ### Response #### Success Response (200) - **status** (integer) - Operation status code. #### Response Example { "status": 0 } ``` -------------------------------- ### Configure MCU RAM Retention - C Source: https://github.com/SiliconLabs/wiseconnect/blob/master/docs/software-reference/manuals/siwx91x-software-reference-manual Sets the RAM usage and retention size for the MCU during sleep. It takes the desired RAM size and retention mode as parameters. ```c //!Configure RAM Usage and Retention Size sl_si91x_configure_ram_retention(WISEMCU_192KB_RAM_IN_USE, WISEMCU_RETAIN_DEFAULT_RAM_DURING_SLEEP); ``` -------------------------------- ### ae_scan_params_s Source: https://context7_llms Defines parameters for BLE scanning. ```APIDOC ## POST /ae_scan_params_s ### Description Configures the parameters for BLE scanning operations. ### Method POST ### Endpoint /ae_scan_params_s ### Parameters #### Request Body - **scan_interval** (integer) - Required - Scan interval in milliseconds. - **scan_window** (integer) - Required - Scan window in milliseconds. - **scan_type** (integer) - Required - Type of scan (active or passive). - **filter_policy** (integer) - Required - Filter policy for scan results. ### Request Example { "scan_interval": 100, "scan_window": 50, "scan_type": 0, "filter_policy": 0 } ### Response #### Success Response (200) - **status** (integer) - Operation status code. #### Response Example { "status": 0 } ``` -------------------------------- ### ae_periodic_adv_enable Source: https://context7_llms Enables or disables periodic advertising. ```APIDOC ## POST /ae_periodic_adv_enable ### Description Controls the enabling and disabling of periodic advertising. ### Method POST ### Endpoint /ae_periodic_adv_enable ### Parameters #### Request Body - **enable** (boolean) - Required - True to enable periodic advertising, False to disable. ### Request Example { "enable": true } ### Response #### Success Response (200) - **status** (integer) - Operation status code. #### Response Example { "status": 0 } ``` -------------------------------- ### Update Wi-Fi Client Info API Signature (C) Source: https://github.com/SiliconLabs/wiseconnect/blob/master/docs/software-reference/developer-guides/migrating-from-v3-1-0 Details the modification in the `sl_wifi_get_ap_client_info` function signature. The structure for client information has been updated from `sl_wifi_client_info_response` to `sl_wifi_client_info_response_t`. ```c sl_status_t sl_wifi_get_ap_client_info(sl_wifi_interface_t interface, sl_wifi_client_info_response *client_info); sl_status_t sl_wifi_get_ap_client_info(sl_wifi_interface_t interface, sl_wifi_client_info_response_t *client_info); ``` -------------------------------- ### SiWx91x Device Management: Event Types Source: https://github.com/SiliconLabs/wiseconnect/blob/master/docs/software-reference/developer-guides/migrating-from-v3-1-0 Enumerations for network event types in SiWx91x device management. These cover interface status changes, IP events, ping responses, Wi-Fi connection events, DNS resolution, OTA updates, and module status. Note the subset in the second definition which lists only specific events. ```c typedef enum { SL_NET_INTERFACE_UP_EVENT, SL_NET_INTERFACE_DOWN_EVENT, SL_NET_IP_UP_EVENT, SL_NET_IP_DOWN_EVENT, SL_NET_IP_EXPIRED_EVENT, SL_NET_PING_RESPONSE_EVENT, SL_NET_WIFI_CLIENT_CONNECTED_EVENT, SL_NET_WIFI_CLIENT_DISCONNECTED_EVENT, SL_NET_DNS_RESOLVE_EVENT, SL_NET_OTA_FW_UPDATE_EVENT, SL_NET_ASYNC_MODULE_STATUS_EVENT, SL_NET_EVENT_COUNT } sl_net_event_t; typedef enum { SL_NET_PING_RESPONSE_EVENT, SL_NET_DNS_RESOLVE_EVENT, ///< DNS Address resolution Event SL_NET_OTA_FW_UPDATE_EVENT, ///< OTA Firmware Update Event SL_NET_EVENT_COUNT ///< Maximum event count } sl_net_event_t; ``` -------------------------------- ### SNTP API Documentation Source: https://context7_llms Details the Simple Network Time Protocol (SNTP) APIs, including overview, functions, types, and constants. ```APIDOC ## SNTP API Documentation ### Description This section covers the SNTP (Simple Network Time Protocol) APIs, offering functionalities for time synchronization. It includes an overview, available API functions, data types, and constants. ### Endpoint N/A (This is a conceptual grouping of API documentation links) ### Links - SNTP Overview: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-sntp/index.md - SNTP APIs: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-sntp/service-sntp.md - SNTP Functions: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-sntp/service-sntp-functions.md - SNTP Types: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-sntp/service-sntp-types.md - SL_ATTRIBUTE_PACKED: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-sntp/sl-attribute-packed.md - sl_sntp_client_response_t: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-sntp/sl-sntp-client-response-t.md - sl_sntp_client_config_t: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-sntp/sl-sntp-client-config-t.md - SNTP Constants: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-sntp/service-sntp-constants.md - SNTP Methods: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-sntp/service-sntp-methods.md - SNTP Flags: https://docs.silabs.com/wiseconnect/3.5.2/wiseconnect-api-reference-guide-sntp/service-sntp-flags.md ``` -------------------------------- ### rsi_ble_ae_adv_enable_s Source: https://context7_llms Enables or disables BLE advertising. ```APIDOC ## POST /rsi_ble_ae_adv_enable_s ### Description Controls the advertising state of the BLE device. ### Method POST ### Endpoint /rsi_ble_ae_adv_enable_s ### Parameters #### Request Body - **enable** (boolean) - Required - True to enable advertising, False to disable. ### Request Example { "enable": true } ### Response #### Success Response (200) - **status** (integer) - Operation status code. #### Response Example { "status": 0 } ```