Network Profiles#

Functions#

sl_status_t
sl_net_set_profile(sl_net_interface_t interface, sl_net_profile_id_t id, const sl_net_profile_t *profile)

Store a network profile for a given interface.

sl_status_t
sl_net_get_profile(sl_net_interface_t interface, sl_net_profile_id_t id, sl_net_profile_t *profile)

Retrieve a stored network profile for a given interface.

sl_status_t
sl_net_delete_profile(sl_net_interface_t interface, sl_net_profile_id_t id)

Delete a stored network profile for a given interface.

Function Documentation#

sl_net_set_profile#

sl_status_t sl_net_set_profile (sl_net_interface_t interface, sl_net_profile_id_t id, const sl_net_profile_t * profile)

Store a network profile for a given interface.

Parameters
TypeDirectionArgument NameDescription
sl_net_interface_t[in]interface

Interface identified by sl_net_interface_t.

sl_net_profile_id_t[in]id

Profile storage index / identifier of type sl_net_profile_id_t.

const sl_net_profile_t *[in]profile

Pointer to profile data of type sl_net_profile_t.

This function stores the network profile data such as WIFI Credentials and Network Credentials for the specified interface. The profile can be used later to bring the interface up with the stored settings.

The user can use the id to store multiple profiles for the same interface and pass the id to different APIs.

  • Pre-conditions:

Returns

Note

  • When configuring Wi-Fi clients or Access Points with open security (SL_WIFI_OPEN), set the credential_id field to SL_WIFI_NO_CREDENTIAL_ID within the respective configuration structures (sl_wifi_client_configuration_t in sl_net_wifi_client_profile_t for clients and sl_wifi_ap_configuration_t in sl_net_wifi_ap_profile_t for APs). This ensures the stack does not attempt to fetch credentials that are not required for open security.


sl_net_get_profile#

sl_status_t sl_net_get_profile (sl_net_interface_t interface, sl_net_profile_id_t id, sl_net_profile_t * profile)

Retrieve a stored network profile for a given interface.

Parameters
TypeDirectionArgument NameDescription
sl_net_interface_t[in]interface

Interface identified by sl_net_interface_t.

sl_net_profile_id_t[in]id

Profile storage index / identifier of type sl_net_profile_id_t.

sl_net_profile_t *[out]profile

Pointer to sl_net_profile_t object that will store the retrieved profile data.

This function retrieves the network profile data for the specified interface and profile ID. The retrieved profile data is stored in the provided profile object.

  • Pre-conditions:

Returns


sl_net_delete_profile#

sl_status_t sl_net_delete_profile (sl_net_interface_t interface, sl_net_profile_id_t id)

Delete a stored network profile for a given interface.

Parameters
TypeDirectionArgument NameDescription
sl_net_interface_t[in]interface

Interface identified by sl_net_interface_t.

sl_net_profile_id_t[in]id

Profile storage index / identifier of type sl_net_profile_id_t.

This function deletes the network profile data for the specified interface and profile ID. Once deleted, the profile cannot be used to bring the interface up.

  • Pre-conditions:

Returns