1 /***************************************************************************/ /** 2 * @file 3 * @brief SL Network API 4 ******************************************************************************* 5 * # License 6 * <b>Copyright 2022 Silicon Laboratories Inc. www.silabs.com</b> 7 ******************************************************************************* 8 * 9 * SPDX-License-Identifier: Zlib 10 * 11 * The licensor of this software is Silicon Laboratories Inc. 12 * 13 * This software is provided 'as-is', without any express or implied 14 * warranty. In no event will the authors be held liable for any damages 15 * arising from the use of this software. 16 * 17 * Permission is granted to anyone to use this software for any purpose, 18 * including commercial applications, and to alter it and redistribute it 19 * freely, subject to the following restrictions: 20 * 21 * 1. The origin of this software must not be misrepresented; you must not 22 * claim that you wrote the original software. If you use this software 23 * in a product, an acknowledgment in the product documentation would be 24 * appreciated but is not required. 25 * 2. Altered source versions must be plainly marked as such, and must not be 26 * misrepresented as being the original software. 27 * 3. This notice may not be removed or altered from any source distribution. 28 * 29 ******************************************************************************/ 30 #pragma once 31 32 #include "sl_status.h" 33 #include "sl_net_types.h" 34 35 /** 36 * \addtogroup NET_INTERFACE_FUNCTIONS Network Interface 37 * 38 * @note Stack overflows may occur if you invoke functions or use your own variables or data structures while handling callbacks. 39 * Please configure the stack size by modifying the pre-processor macro `SL_SI91X_EVENT_HANDLER_STACK_SIZE` as 40 * per your application's requirements. See [here](https://docs.silabs.com/wiseconnect/latest/wiseconnect-developers-guide-prog-preprocessor-build-settings/list-of-preprocessor-build-settings) 41 * for the instructions for modifying a pre-processor macro. 42 * @note Event/Callback handlers must not contain function calls or code which can block or delay the execution of 43 * the event/callback handler as it will cause all the other events to queue up and delay the execution of 44 * other events since all the events are invoked and handled from a single thread. 45 * @note Do not call any synchronous SDK APIs from within the Event/Callback handlers. 46 * 47 * \ingroup SL_NET_FUNCTIONS 48 * @{ */ 49 50 /***************************************************************************/ /** 51 * @brief Initialize the specified network interface. 52 * 53 * This function initializes the specified network interface with the provided configuration, 54 * network context, and event handler. It supports various network interfaces such as Wi-Fi client, 55 * Wi-Fi access point. 56 * 57 * Once the user passes a function pointer to the event handler, the network context is passed in the callback, 58 * and various events can be received through this callback. 59 * 60 * @param[in] interface 61 * The network interface to initialize. One of the values from @ref sl_net_interface_t 62 * @param[in] configuration 63 * Pointer to the configuration structure for the specified interface of type [sl_wifi_device_configuration_t](../wiseconnect-api-reference-guide-si91x-driver/sl-wifi-device-configuration-t). 64 * If NULL, then the following configuration is used internally by SDK: 65 * | sl_net_interface_t | Default configuration | 66 * |:-----------------------------|:--------------------------------------| 67 * | SL_NET_WIFI_CLIENT_INTERFACE | sl_wifi_default_client_configuration | 68 * | SL_NET_WIFI_AP_INTERFACE | sl_wifi_default_ap_configuration | 69 * @param[in] network_context 70 * Runtime context specific to network interface. 71 * @param[in] event_handler 72 * Function pointer to the network event handler callback of @ref sl_net_event_handler_t type 73 * 74 * @return 75 * sl_status_t. See [Status Codes](https://docs.silabs.com/gecko-platform/latest/platform-common/status) and [Additional Status Codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) for details. 76 * @note 77 * For Wi-Fi events, sl_net uses the wifi callback framework. Register the corresponding Wi-Fi event handlers using [sl_wifi_set_callback](../wiseconnect-api-reference-guide-wi-fi/wifi-callback-framework#sl-wifi-set-callback) API. 78 * @note 79 * The \p network_context parameter is used only when the module is acting as a station in external stack mode (lwIP). 80 * In this case, \p network_context should refer to a valid @ref sl_net_wifi_lwip_context_t variable. 81 ******************************************************************************/ 82 sl_status_t sl_net_init(sl_net_interface_t interface, 83 const void *configuration, 84 void *network_context, 85 sl_net_event_handler_t event_handler); 86 87 /***************************************************************************/ /** 88 * @brief 89 * De-initialize a network interface. 90 * 91 * This function de-initializes the specified network interface, releasing any resources that were allocated during initialization. 92 * 93 * After this, the user will not receive callbacks related to events. 94 * 95 * For the `SL_NET_WIFI_CLIENT_INTERFACE` and `SL_NET_WIFI_AP_INTERFACE` interface, this function ensures proper shutdown of the Wi-Fi driver, soft resets the NWP, and releases resources. 96 * 97 * @pre Pre-conditions: 98 * - @ref sl_net_init should be called before this API. 99 * 100 * @param[in] interface 101 * Interface identified by @ref sl_net_interface_t. 102 * 103 * @return 104 * sl_status_t. See [Status Codes](https://docs.silabs.com/gecko-platform/latest/platform-common/status) and [Additional Status Codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) for details. 105 ******************************************************************************/ 106 sl_status_t sl_net_deinit(sl_net_interface_t interface); 107 108 /***************************************************************************/ /** 109 * @brief 110 * Bring a network interface up. 111 * 112 * @details 113 * This function brings the specified network interface up, making it ready for network communication. 114 * 115 * For `SL_NET_WIFI_CLIENT_INTERFACE`, the API fetches profile data from the profile ID, scans the network and connects to the network, configures the IP address, and updates the profile data. 116 * 117 * For `SL_NET_WIFI_AP_INTERFACE`, the API fetches profile data from the profile ID, configures the IP address, updates the profile data, and starts the Access Point (AP). 118 * 119 * @pre Pre-conditions: 120 * - 121 * @ref sl_net_init should be called before this API. 122 * 123 * @param[in] interface 124 * Interface identified by @ref sl_net_interface_t. 125 * 126 * @param[in] profile_id 127 * Network profile identifier for the specific interface of type @ref sl_net_profile_id_t 128 * 129 * @return 130 * sl_status_t. See [Status Codes](https://docs.silabs.com/gecko-platform/latest/platform-common/status) and [Additional Status Codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) for details. 131 * 132 * @note 133 * By default, profile and credential configurations in sl_net_defaults.h are used by SDK. 134 * @note 135 * To enable support for both IPv4 and IPv6, the ip.type in the profile should be set to (SL_IPV4|SL_IPV6). 136 * @note 137 * The user can define their profile and credential configurations for an interface by calling @ref sl_net_set_profile and @ref sl_net_set_credential APIs before calling @ref sl_net_up API. 138 * ******************************************************************************/ 139 sl_status_t sl_net_up(sl_net_interface_t interface, sl_net_profile_id_t profile_id); 140 141 /***************************************************************************/ /** 142 * @brief 143 * Bring a network interface down. 144 * 145 * @details 146 * This function deactivates the specified network interface, effectively 147 * disconnecting it from the WLAN network. It should be called to properly 148 * shut down the interface and release any associated resources. 149 * 150 * @pre Pre-conditions: 151 * - @ref sl_net_up should be called before this API to ensure the interface 152 * is active before attempting to bring it down. 153 * 154 * @param[in] interface 155 * Interface identified by @ref sl_net_interface_t. This parameter specifies 156 * which network interface to bring down. 157 * 158 * @return 159 * sl_status_t. See [Status Codes](https://docs.silabs.com/gecko-platform/latest/platform-common/status) 160 * and [Additional Status Codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) for details. 161 ******************************************************************************/ 162 sl_status_t sl_net_down(sl_net_interface_t interface); 163 164 /** @} */ 165 166 /** 167 * \addtogroup NET_IP_MANAGEMENT_FUNCTIONS IP Management 168 * \ingroup SL_NET_FUNCTIONS 169 * @{ */ 170 171 /***************************************************************************/ /** 172 * @brief 173 * Configure IP address of given interface. 174 * @pre Pre-conditions: 175 * - 176 * @ref sl_net_up should be called before this API. 177 * @param[in] interface 178 * Interface identified by @ref sl_net_interface_t 179 * @param[in] ip_config 180 * Multicast IP address of type @ref sl_net_ip_configuration_t 181 * @param[in] timeout 182 * The maximum time to wait for the IP address Configuration, in milliseconds. 183 * @return 184 * sl_status_t. See https://docs.silabs.com/gecko-platform/latest/platform-common/status for details. 185 @note 186 * - This API doesn't support async mode operation, so passing 0 in timeout parameter leads to an error. 187 ******************************************************************************/ 188 sl_status_t sl_net_configure_ip(sl_net_interface_t interface, 189 const sl_net_ip_configuration_t *ip_config, 190 uint32_t timeout); 191 192 /***************************************************************************/ /** 193 * @brief 194 * This function retrieves the IP address of the specified network interface. 195 * @pre Pre-conditions: 196 * - 197 * @ref sl_net_up should be called before this API. 198 * @param[in] interface 199 * Interface identified by @ref sl_net_interface_t 200 * @param[in] ip_address 201 * IP address of type @ref sl_net_ip_address_t 202 * @param[in] timeout 203 * The maximum time to wait for the IP address retrieval, in milliseconds. 204 * @return 205 * sl_status_t. See https://docs.silabs.com/gecko-platform/latest/platform-common/status for details. 206 @note 207 * - This API doesn't support async mode operation, so passing 0 in timeout parameter leads to an error. 208 * - If the interface is setup in SL_IP_MANAGEMENT_STATIC_IP mode, this API only returns its mode and doesn't return ip address. 209 ******************************************************************************/ 210 sl_status_t sl_net_get_ip_address(sl_net_interface_t interface, sl_net_ip_address_t *ip_address, uint32_t timeout); 211 212 /** @} */ 213 214 /** 215 * \addtogroup NET_PROFILE_FUNCTIONS Network Profiles 216 * \ingroup SL_NET_FUNCTIONS 217 * @{ */ 218 219 /***************************************************************************/ /** 220 * @brief 221 * Store a network profile for a given interface. 222 * 223 * @details 224 * This function stores the network profile data such as WIFI Credentials and Network Credentials for the specified interface. 225 * The profile can be used later to bring the interface up with the stored settings. 226 * 227 * The user can use the id to store multiple profiles for the same interface and pass the id to different APIs. 228 * 229 * @pre Pre-conditions: 230 * - @ref sl_net_init should be called before this API. 231 * 232 * @param[in] interface 233 * Interface identified by @ref sl_net_interface_t. 234 * 235 * @param[in] id 236 * Profile storage index / identifier of type @ref sl_net_profile_id_t. 237 * 238 * @param[in] profile 239 * Pointer to profile data of type @ref sl_net_profile_t. 240 * 241 * @return 242 * sl_status_t. See [Status Codes](https://docs.silabs.com/gecko-platform/latest/platform-common/status) and [Additional Status Codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) for details. 243 ******************************************************************************/ 244 sl_status_t sl_net_set_profile(sl_net_interface_t interface, sl_net_profile_id_t id, const sl_net_profile_t *profile); 245 246 /***************************************************************************/ /** 247 * @brief 248 * Retrieve a stored network profile for a given interface. 249 * 250 * @details 251 * This function retrieves the network profile data for the specified interface and profile ID. 252 * The retrieved profile data is stored in the provided profile object. 253 * 254 * @pre Pre-conditions: 255 * - 256 * @ref sl_net_init should be called before this API. 257 * 258 * @param[in] interface 259 * Interface identified by @ref sl_net_interface_t. 260 * 261 * @param[in] id 262 * Profile storage index / identifier of type @ref sl_net_profile_id_t. 263 * 264 * @param[out] profile 265 * Pointer to @ref sl_net_profile_t object that will store the retrieved profile data. 266 * 267 * @return 268 * sl_status_t. See [Status Codes](https://docs.silabs.com/gecko-platform/latest/platform-common/status) and [Additional Status Codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) for details. 269 ******************************************************************************/ 270 sl_status_t sl_net_get_profile(sl_net_interface_t interface, sl_net_profile_id_t id, sl_net_profile_t *profile); 271 272 /***************************************************************************/ /** 273 * @brief 274 * Delete a stored network profile for a given interface. 275 * 276 * @details 277 * This function deletes the network profile data for the specified interface and profile ID. 278 * Once deleted, the profile cannot be used to bring the interface up. 279 * 280 * @pre Pre-conditions: 281 * - @ref sl_net_init should be called before this API. 282 * 283 * @param[in] interface 284 * Interface identified by @ref sl_net_interface_t. 285 * 286 * @param[in] id 287 * Profile storage index / identifier of type @ref sl_net_profile_id_t. 288 * 289 * @return 290 * sl_status_t. See [Status Codes](https://docs.silabs.com/gecko-platform/latest/platform-common/status) and [Additional Status Codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) for details. 291 ******************************************************************************/ 292 sl_status_t sl_net_delete_profile(sl_net_interface_t interface, sl_net_profile_id_t id); 293 294 /** @} */ 295 296 /** 297 * \addtogroup NET_CREDENTIAL_FUNCTIONS Network Credential 298 * \ingroup SL_NET_FUNCTIONS 299 * @{ */ 300 301 /***************************************************************************/ /** 302 * @brief 303 * Set a network credential including client credentials, certificates, and keys. 304 * 305 * @details 306 * This function sets the network credential type and data for the specified credential ID. 307 * The credential data can include client credentials, certificates, and keys. 308 * 309 * Repeatedly calling this API with the same ID will overwrite the existing credential type and data. 310 * 311 * @pre Pre-conditions: 312 * - @ref sl_net_init should be called before this API. 313 * 314 * @param[in] id 315 * Network credential identifier as identified by @ref sl_net_credential_id_t. 316 * 317 * @param[in] type 318 * Network credential type as identified by @ref sl_net_credential_type_t. 319 * 320 * @param[in] credential 321 * Pointer to the credential data object. 322 * 323 * @param[in] credential_length 324 * Length of the credential data object. 325 * 326 * @return 327 * sl_status_t. See [Status Codes](https://docs.silabs.com/gecko-platform/latest/platform-common/status) and [Additional Status Codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) for details. 328 * If the credential is NULL or the credential length is zero, this API will return an error `SL_STATUS_INVALID_PARAMETER`. 329 * @note 330 * - Certificates should follow standard *.pem format 331 * - A PEM encoded file includes Base64 data. 332 * - After every 64 bytes, the special character `\n` should be used as a delimiter. 333 * - The private key is prefixed with a header like "-----BEGIN PRIVATE KEY-----" line and postfixed with an footer like"-----END PRIVATE KEY-----". 334 * - Certificates are prefixed with a header like "-----BEGIN CERTIFICATE-----" line and postfixed with an footer like"-----END CERTIFICATE-----" line. 335 * - Text outside the prefix and postfix lines is ignored and can be used for metadata. 336 * - The above mentioned Headers and Footers might vary 337 * - This API does not support the OPEN Security type for Wi-Fi client credentials. 338 ******************************************************************************/ 339 sl_status_t sl_net_set_credential(sl_net_credential_id_t id, 340 sl_net_credential_type_t type, 341 const void *credential, 342 uint32_t credential_length); 343 344 /***************************************************************************/ /** 345 * @brief 346 * Retrieve a stored network credential. 347 * 348 * @details 349 * This function retrieves the network credential data for the specified credential ID. 350 * The retrieved credential data is stored in the provided credential object. 351 * 352 * @pre Pre-conditions: 353 * - @ref sl_net_init should be called before this API. 354 * 355 * @param[in] id 356 * Network credential identifier as identified by @ref sl_net_credential_id_t. 357 * 358 * @param[out] type 359 * Network credential type as identified by @ref sl_net_credential_type_t. 360 * 361 * @param[out] credential 362 * Pointer to location where credential data is stored. 363 * 364 * @param[in,out] credential_length 365 * in: Number of bytes available at credential, 366 * out: Number of bytes written. 367 * 368 * @return 369 * sl_status_t. See [Status Codes](https://docs.silabs.com/gecko-platform/latest/platform-common/status) and [Additional Status Codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) for details. 370 * 371 * @note 372 * Currently, @ref SL_NET_CERTIFICATE and @ref SL_NET_SIGNING_CERTIFICATE are not supported for retrieval. 373 ******************************************************************************/ 374 sl_status_t sl_net_get_credential(sl_net_credential_id_t id, 375 sl_net_credential_type_t *type, 376 void *credential, 377 uint32_t *credential_length); 378 379 /***************************************************************************/ /** 380 * @brief 381 * Delete a stored network credential. 382 * 383 * @details 384 * This function deletes the network credential data for the specified credential ID and type. 385 * Once deleted, the credential cannot be used for network operations. 386 * 387 * @pre Pre-conditions: 388 * - 389 * @ref sl_net_init should be called before this API. 390 * 391 * @param[in] id 392 * Network credential identifier as identified by @ref sl_net_credential_id_t. 393 * 394 * @param[out] type 395 * Network credential type as identified by @ref sl_net_credential_type_t. 396 * 397 * @return 398 * sl_status_t. See [Status Codes](https://docs.silabs.com/gecko-platform/latest/platform-common/status) and [Additional Status Codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) for details. 399 ******************************************************************************/ 400 sl_status_t sl_net_delete_credential(sl_net_credential_id_t id, sl_net_credential_type_t type); 401 402 /** @} */ 403 404 /***************************************************************************/ /** 405 * @brief 406 * @param[in] id 407 * @param[in] data 408 * @param[in] data_length 409 * @note 410 * This API is not yet implemented. 411 ******************************************************************************/ 412 sl_status_t sl_net_set_certificate(sl_net_certificate_id_t id, const void *data, uint32_t data_length); 413 414 /***************************************************************************/ /** 415 * @brief 416 * @param[in] id 417 * @param[out] data 418 * @param[in] data_length 419 * @note 420 * This API is not yet implemented. 421 ******************************************************************************/ 422 sl_status_t sl_net_get_certificate(sl_net_certificate_id_t id, const void *data, uint32_t data_length); 423 424 /***************************************************************************/ /** 425 * @note 426 * This API is not yet implemented. 427 ******************************************************************************/ 428 sl_status_t sl_net_verify_certificate(); 429 430 /***************************************************************************/ /** 431 * @brief 432 * Convert an IPv4 address in string of from a.b.c.d to a binary uint32_t value 433 * @param[in] addr 434 * IPV4 address. 435 * @param[out] value 436 * Binary value of the given IP address. 437 * @return 438 * sl_status_t. See https://docs.silabs.com/gecko-platform/latest/platform-common/status for details. 439 ******************************************************************************/ 440 sl_status_t sl_net_inet_addr(const char *addr, uint32_t *value); 441 442 /** 443 * \addtogroup NET_MULTICAST_FUNCTIONS Network Multicast 444 * \ingroup SL_NET_FUNCTIONS 445 * @{ */ 446 447 /***************************************************************************/ /** 448 * @brief 449 * Enable multicast for the given IP address. 450 * 451 * @details 452 * This function enables multicast for the specified IP address on the given interface. 453 * It allows the interface to receive/send multicast packets sent to the specified IP address. 454 * 455 * Users can use [sendto](../wiseconnect-api-reference-guide-sockets/bsd-socket-functions#sendto) and [recvfrom](../wiseconnect-api-reference-guide-sockets/bsd-socket-functions#recvfrom) socket APIs to send and receive data. 456 * 457 * @pre Pre-conditions: 458 * - @ref sl_net_up should be called before this API. 459 * 460 * @param[in] interface 461 * Interface identified by @ref sl_net_interface_t. 462 * 463 * @param[in] ip_address 464 * Multicast IP address of type [sl_ip_address_t](../wiseconnect-api-reference-guide-nwk-mgmt/sl-ip-address-t). 465 * @return 466 * sl_status_t. See [Status Codes](https://docs.silabs.com/gecko-platform/latest/platform-common/status) and [Additional Status Codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) for details. 467 ******************************************************************************/ 468 sl_status_t sl_net_join_multicast_address(sl_net_interface_t interface, const sl_ip_address_t *ip_address); 469 470 /***************************************************************************/ /** 471 * @brief 472 * Disable multicast for the given IP address. 473 * 474 * @details 475 * This function disables multicast for the specified IP address on the given interface. 476 * It prevents the interface from receiving/sending multicast packets sent to the specified IP address. 477 * 478 * @pre Pre-conditions: 479 * - @ref sl_net_up should be called before this API. 480 * 481 * @param[in] interface 482 * Interface identified by @ref sl_net_interface_t. 483 * 484 * @param[in] ip_address 485 * Multicast IP address of type [sl_ip_address_t](../wiseconnect-api-reference-guide-nwk-mgmt/sl-ip-address-t). 486 * @return 487 * sl_status_t. See [Status Codes](https://docs.silabs.com/gecko-platform/latest/platform-common/status) and [Additional Status Codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) for details. 488 ******************************************************************************/ 489 sl_status_t sl_net_leave_multicast_address(sl_net_interface_t interface, const sl_ip_address_t *ip_address); 490 491 /** @} */ 492 493 // Helper functions 494 /** 495 * @brief Initializes the Wi-Fi client interface. 496 * 497 * This function initializes the Wi-Fi client with the specified configuration and event handler. 498 * 499 * @param interface The network interface to initialize. 500 * @param configuration Pointer to the configuration parameters. 501 * @param context User-defined context passed to the event handler. 502 * @param event_handler Callback function for network events. 503 * @return sl_status_t Status of the operation. 504 */ 505 sl_status_t sl_net_wifi_client_init(sl_net_interface_t interface, 506 const void *configuration, 507 void *context, 508 sl_net_event_handler_t event_handler); 509 510 /** 511 * @brief Deinitializes the Wi-Fi client interface. 512 * 513 * This function deinitializes the Wi-Fi client, freeing any resources allocated during initialization. 514 * 515 * @param interface The network interface to deinitialize. 516 * @return sl_status_t Status of the operation. 517 */ 518 sl_status_t sl_net_wifi_client_deinit(sl_net_interface_t interface); 519 520 /** 521 * @brief Brings up the Wi-Fi client interface. 522 * 523 * This function activates the Wi-Fi client interface using the specified profile. 524 * 525 * @param interface The network interface to activate. 526 * @param profile_id The profile ID to use for connection. 527 * @return sl_status_t Status of the operation. 528 */ 529 sl_status_t sl_net_wifi_client_up(sl_net_interface_t interface, sl_net_profile_id_t profile_id); 530 531 /** 532 * @brief Brings down the Wi-Fi client interface. 533 * 534 * This function deactivates the Wi-Fi client interface. 535 * 536 * @param interface The network interface to deactivate. 537 * @return sl_status_t Status of the operation. 538 */ 539 sl_status_t sl_net_wifi_client_down(sl_net_interface_t interface); 540 541 /** 542 * @brief Initializes the Wi-Fi AP (Access Point) interface. 543 * 544 * This function initializes the Wi-Fi AP with the specified configuration and event handler. 545 * 546 * @param interface The network interface to initialize. 547 * @param configuration Pointer to the configuration parameters. 548 * @param context User-defined context passed to the event handler. 549 * @param event_handler Callback function for network events. 550 * @return sl_status_t Status of the operation. 551 */ 552 sl_status_t sl_net_wifi_ap_init(sl_net_interface_t interface, 553 const void *configuration, 554 const void *context, 555 sl_net_event_handler_t event_handler); 556 557 /** 558 * @brief Deinitializes the Wi-Fi AP interface. 559 * 560 * This function deinitializes the Wi-Fi AP, freeing any resources allocated during initialization. 561 * 562 * @param interface The network interface to deinitialize. 563 * @return sl_status_t Status of the operation. 564 */ 565 sl_status_t sl_net_wifi_ap_deinit(sl_net_interface_t interface); 566 567 /** 568 * @brief Brings up the Wi-Fi AP interface. 569 * 570 * This function activates the Wi-Fi AP interface using the specified profile. 571 * 572 * @param interface The network interface to activate. 573 * @param profile_id The profile ID to use for the AP. 574 * @return sl_status_t Status of the operation. 575 */ 576 sl_status_t sl_net_wifi_ap_up(sl_net_interface_t interface, sl_net_profile_id_t profile_id); 577 578 /** 579 * @brief Brings down the Wi-Fi AP interface. 580 * 581 * This function deactivates the Wi-Fi AP interface. 582 * 583 * @param interface The network interface to deactivate. 584 * @return sl_status_t Status of the operation. 585 */ 586 sl_status_t sl_net_wifi_ap_down(sl_net_interface_t interface); 587