Tizen Native API
5.0
|
SoftAP Manager API provides functions to manage the SoftAP.
#include <softap.h>
This set of functions is used to manage SoftAP.
This API is related with the following features:
It is recommended to design applications with regard to features, for reliability.
You can check if a device supports the related features for this API by using System Information, and control your application's actions accordingly.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on using features in your application can be found in Feature Element.
Functions | |
int | softap_create (softap_h *softap) |
Creates the handle for SoftAP. | |
int | softap_destroy (softap_h softap) |
Destroys the handle for SoftAP. | |
int | softap_enable (softap_h softap) |
Enables the SoftAP, asynchronously. | |
int | softap_disable (softap_h softap) |
Disables the SoftAP, asynchronously. | |
int | softap_is_enabled (softap_h softap, bool *enable) |
Checks whether the SoftAP is enabled or not. | |
int | softap_get_mac_address (softap_h softap, char **mac_address) |
Gets the MAC address of local device as "FC:A1:3E:D6:B1:B1". | |
int | softap_get_network_interface_name (softap_h softap, char **interface_name) |
Gets the name of network interface (e.g. wlan0). | |
int | softap_set_ip_address (softap_h softap, softap_address_family_e address_family, const char *ip_address) |
Sets the local IP address. | |
int | softap_get_ip_address (softap_h softap, softap_address_family_e address_family, char **ip_address) |
Gets the local IP address. | |
int | softap_get_gateway_address (softap_h softap, softap_address_family_e address_family, char **gateway_address) |
Gets the Gateway address. | |
int | softap_get_subnet_mask (softap_h softap, softap_address_family_e address_family, char **subnet_mask) |
Gets the Subnet Mask. | |
int | softap_foreach_connected_clients (softap_h softap, softap_connected_client_cb callback, void *user_data) |
Gets the clients which are connected. | |
int | softap_set_enabled_cb (softap_h softap, softap_enabled_cb callback, void *user_data) |
Sets the callback function, which is called when SoftAP is enabled. | |
int | softap_unset_enabled_cb (softap_h softap) |
Unsets the callback function, which is called when SoftAP is enabled. | |
int | softap_set_disabled_cb (softap_h softap, softap_disabled_cb callback, void *user_data) |
Sets the callback function called when SoftAP is disabled. | |
int | softap_unset_disabled_cb (softap_h softap) |
Unsets the callback function, which is called when SoftAP is disabled. | |
int | softap_set_client_connection_state_changed_cb (softap_h softap, softap_client_connection_state_changed_cb callback, void *user_data) |
Sets the callback function, which is called when the state of connection is changed. | |
int | softap_unset_client_connection_state_changed_cb (softap_h softap) |
Unsets the callback function, which is called when the state of connection is changed. | |
int | softap_set_security_type_changed_cb (softap_h softap, softap_security_type_changed_cb callback, void *user_data) |
Sets the callback function, which is called when the security type of SoftAP is changed. | |
int | softap_unset_security_type_changed_cb (softap_h softap) |
Unsets the callback function, which is called when the security type of SoftAP is changed. | |
int | softap_set_ssid_visibility_changed_cb (softap_h softap, softap_ssid_visibility_changed_cb callback, void *user_data) |
Sets the callback function , which is called when the visibility of SSID is changed. | |
int | softap_unset_ssid_visibility_changed_cb (softap_h softap) |
Unsets the callback function, which is called when the visibility of SSID is changed. | |
int | softap_set_passphrase_changed_cb (softap_h softap, softap_passphrase_changed_cb callback, void *user_data) |
Sets the callback function, which is called when the passphrase of SoftAP is changed. | |
int | softap_unset_passphrase_changed_cb (softap_h softap) |
Unsets the callback function, which is called when the passphrase of SoftAP is changed. | |
int | softap_set_security_type (softap_h softap, softap_security_type_e type) |
Sets the security type of SoftAP. | |
int | softap_get_security_type (softap_h softap, softap_security_type_e *type) |
Gets the security type of SoftAP. | |
int | softap_set_ssid (softap_h softap, const char *ssid) |
Sets the SSID (service set identifier) for SoftAP. | |
int | softap_get_ssid (softap_h softap, char **ssid) |
Gets the SSID (service set identifier) for SoftAP. | |
int | softap_set_ssid_visibility (softap_h softap, bool visible) |
Sets the visibility of SSID (service set identifier) for SoftAP. | |
int | softap_get_ssid_visibility (softap_h softap, bool *visible) |
Gets the visibility of SSID (service set identifier) for SoftAP. | |
int | softap_set_passphrase (softap_h softap, const char *passphrase) |
Sets the passphrase for SoftAP. | |
int | softap_get_passphrase (softap_h softap, char **passphrase) |
Gets the passphrase for SoftAP. | |
int | softap_reload_settings (softap_h softap, softap_settings_reloaded_cb callback, void *user_data) |
Reloads the settings (SSID / Passphrase / Security type / SSID visibility) for SoftAP. | |
int | softap_push_wps_button (softap_h softap) |
Pushes the WPS button to connect with SoftAP client(WPS PBC). | |
int | softap_set_wps_pin (softap_h softap, const char *wps_pin) |
Sets the WPS PIN to connect with SoftAP client(WPS PIN). | |
int | softap_set_vendor_element (softap_h softap, const char *vendor_element) |
Sets vendor specific elements for Beacon and Probe Response frames. | |
int | softap_get_vendor_element (softap_h softap, char **vendor_element) |
Gets vendor specific elements for Beacon and Probe Response frames. | |
int | softap_set_channel (softap_h softap, int channel) |
Sets the channel for SoftAP. | |
int | softap_get_channel (softap_h softap, int *channel) |
Gets the channel for SoftAP. | |
int | softap_enable_dhcp (softap_h softap) |
Enables the DHCP server. | |
int | softap_disable_dhcp (softap_h softap) |
Disables the DHCP server. | |
int | softap_is_dhcp_enabled (softap_h softap, bool *dhcp_enabled) |
Checks whether the DHCP is enabled or not. | |
int | softap_enable_dhcp_with_range (softap_h softap, char *rangestart, char *rangestop) |
Enables the DHCP server with the address range. | |
int | softap_set_mode (softap_h softap, softap_wireless_mode_e mode) |
Sets the wireless mode for SoftAP. | |
int | softap_get_mode (softap_h softap, softap_wireless_mode_e *mode) |
Gets the wireless mode for SoftAP. | |
Typedefs | |
typedef void * | softap_h |
The SoftAP handle. | |
typedef void(* | softap_enabled_cb )(softap_error_e result, bool is_requested, void *user_data) |
Called when the SoftAP is enabled. | |
typedef void(* | softap_disabled_cb )(softap_error_e result, softap_disabled_cause_e cause, void *user_data) |
Called when the SoftAP is disabled. | |
typedef void(* | softap_client_connection_state_changed_cb )(softap_client_h client, bool opened, void *user_data) |
Called when the connection state is changed. | |
typedef bool(* | softap_connected_client_cb )(softap_client_h client, void *user_data) |
Called when you get the connected client repeatedly. | |
typedef void(* | softap_security_type_changed_cb )(softap_security_type_e changed_type, void *user_data) |
Called when the security type of SoftAP is changed. | |
typedef void(* | softap_ssid_visibility_changed_cb )(bool changed_visible, void *user_data) |
Called when the visibility of SSID is changed. | |
typedef void(* | softap_passphrase_changed_cb )(void *user_data) |
Called when the passphrase is changed. | |
typedef void(* | softap_settings_reloaded_cb )(softap_error_e result, void *user_data) |
Called when SoftAP settings are reloaded. |
typedef void(* softap_client_connection_state_changed_cb)(softap_client_h client, bool opened, void *user_data) |
Called when the connection state is changed.
[in] | client | The client of which connection state is changed |
[in] | opened | true when connection is opened, otherwise false |
[in] | user_data | The user data passed from softap_set_client_connection_state_changed_cb() |
typedef bool(* softap_connected_client_cb)(softap_client_h client, void *user_data) |
Called when you get the connected client repeatedly.
[in] | client | The connected client |
[in] | user_data | The user data passed from the request function |
true
to continue with the next iteration of the loop, false
to break out of the loop typedef void(* softap_disabled_cb)(softap_error_e result, softap_disabled_cause_e cause, void *user_data) |
Called when the SoftAP is disabled.
The following error codes can be received:
SOFTAP_ERROR_NONE: Success
SOFTAP_ERROR_INVALID_PARAMETER: Invalid parameter
SOFTAP_ERROR_OUT_OF_MEMORY: Out of memory
SOFTAP_ERROR_OPERATION_FAILED: Operation failed
[in] | result | The result of disabling the SoftAP |
[in] | cause | The cause of disabling |
[in] | user_data | The user data passed from softap_set_disabled_cb() |
typedef void(* softap_enabled_cb)(softap_error_e result, bool is_requested, void *user_data) |
Called when the SoftAP is enabled.
The following error codes can be received:
SOFTAP_ERROR_NONE: Success
SOFTAP_ERROR_NOT_PERMITTED: Operation not permitted
SOFTAP_ERROR_INVALID_PARAMETER: Invalid parameter
SOFTAP_ERROR_OUT_OF_MEMORY: Out of memory
SOFTAP_ERROR_OPERATION_FAILED: Operation failed
SOFTAP_ERROR_ALREADY_ENABLED: Already enabled
[in] | result | The result of enabling the SoftAP |
[in] | is_requested | Indicates whether this change is requested |
[in] | user_data | The user data passed from softap_set_enabled_cb() |
typedef void* softap_h |
The SoftAP handle.
typedef void(* softap_passphrase_changed_cb)(void *user_data) |
Called when the passphrase is changed.
[in] | user_data | The user data passed from the register function |
typedef void(* softap_security_type_changed_cb)(softap_security_type_e changed_type, void *user_data) |
Called when the security type of SoftAP is changed.
[in] | changed_type | The changed security type |
[in] | user_data | The user data passed from the register function |
typedef void(* softap_settings_reloaded_cb)(softap_error_e result, void *user_data) |
Called when SoftAP settings are reloaded.
The following error codes can be received:
SOFTAP_ERROR_NONE: Success
SOFTAP_ERROR_NOT_PERMITTED: Operation not permitted
SOFTAP_ERROR_INVALID_PARAMETER: Invalid parameter
SOFTAP_ERROR_OUT_OF_MEMORY: Out of memory
SOFTAP_ERROR_OPERATION_FAILED: Operation failed
[in] | result | The result of reloading the settings |
[in] | user_data | The user data passed from the request function |
typedef void(* softap_ssid_visibility_changed_cb)(bool changed_visible, void *user_data) |
Called when the visibility of SSID is changed.
[in] | changed_visible | The changed visibility of SSID |
[in] | user_data | The user data passed from the register function |
Enumeration for the cause of disabling the SoftAP.
enum softap_error_e |
Enumeration for the SoftAP.
int softap_create | ( | softap_h * | softap | ) |
Creates the handle for SoftAP.
[out] | softap | A handle of a new mobile ap handle on success |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_OUT_OF_MEMORY | Out of memory |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_destroy | ( | softap_h | softap | ) |
Destroys the handle for SoftAP.
[in] | softap | The SoftAP handle |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_disable | ( | softap_h | softap | ) |
Disables the SoftAP, asynchronously.
[in] | softap | The SoftAP handle |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_INVALID_OPERATION | Invalid operation |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_disable_dhcp | ( | softap_h | softap | ) |
Disables the DHCP server.
Enable/disable the DHCP server.
[in] | softap | The SoftAP handle |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_enable | ( | softap_h | softap | ) |
Enables the SoftAP, asynchronously.
[in] | softap | The SoftAP handle |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_NOT_PERMITTED | Operation not permitted |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_INVALID_OPERATION | Invalid operation |
SOFTAP_ERROR_RESOURCE_BUSY | Device or resource busy |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_enable_dhcp | ( | softap_h | softap | ) |
Enables the DHCP server.
Enable/disable the DHCP server.
[in] | softap | The SoftAP handle |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_enable_dhcp_with_range | ( | softap_h | softap, |
char * | rangestart, | ||
char * | rangestop | ||
) |
Enables the DHCP server with the address range.
Enable the DHCP server with the address range.
[in] | softap | The handle of softap |
[in] | rangestart | Start address range |
[in] | rangestop | End address range |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_foreach_connected_clients | ( | softap_h | softap, |
softap_connected_client_cb | callback, | ||
void * | user_data | ||
) |
Gets the clients which are connected.
[in] | softap | The SoftAP handle |
[in] | callback | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_INVALID_OPERATION | Invalid operation |
SOFTAP_ERROR_OPERATION_FAILED | Operation failed |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_get_channel | ( | softap_h | softap, |
int * | channel | ||
) |
Gets the channel for SoftAP.
[in] | softap | The SoftAP handle |
[out] | channel | The channel number |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_get_gateway_address | ( | softap_h | softap, |
softap_address_family_e | address_family, | ||
char ** | gateway_address | ||
) |
Gets the Gateway address.
[in] | softap | The SoftAP handle |
[in] | address_family | The address family of IP address (currently only SOFTAP_ADDRESS_FAMILY_IPV4 is supported) |
[out] | gateway_address | Gateway address |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_OUT_OF_MEMORY | Out of memory |
SOFTAP_ERROR_OPERATION_FAILED | Operation failed |
SOFTAP_ERROR_INVALID_OPERATION | Invalid operation |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_get_ip_address | ( | softap_h | softap, |
softap_address_family_e | address_family, | ||
char ** | ip_address | ||
) |
Gets the local IP address.
[in] | softap | The SoftAP handle |
[in] | address_family | The address family of IP address (currently only SOFTAP_ADDRESS_FAMILY_IPV4 is supported) |
[out] | ip_address | The local IP address |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_OUT_OF_MEMORY | Out of memory |
SOFTAP_ERROR_OPERATION_FAILED | Operation failed |
SOFTAP_ERROR_INVALID_OPERATION | Invalid operation |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_get_mac_address | ( | softap_h | softap, |
char ** | mac_address | ||
) |
Gets the MAC address of local device as "FC:A1:3E:D6:B1:B1".
[in] | softap | The SoftAP handle |
[out] | mac_address | The MAC address |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_OUT_OF_MEMORY | Out of memory |
SOFTAP_ERROR_OPERATION_FAILED | Operation failed |
SOFTAP_ERROR_INVALID_OPERATION | Invalid operation |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_get_mode | ( | softap_h | softap, |
softap_wireless_mode_e * | mode | ||
) |
Gets the wireless mode for SoftAP.
[in] | softap | The SoftAP handle |
[out] | mode | The wireless mode |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_get_network_interface_name | ( | softap_h | softap, |
char ** | interface_name | ||
) |
Gets the name of network interface (e.g. wlan0).
[in] | softap | The SoftAP handle |
[out] | interface_name | The name of the network interface |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_OUT_OF_MEMORY | Out of memory |
SOFTAP_ERROR_OPERATION_FAILED | Operation failed |
SOFTAP_ERROR_INVALID_OPERATION | Invalid operation |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_get_passphrase | ( | softap_h | softap, |
char ** | passphrase | ||
) |
Gets the passphrase for SoftAP.
If the passphrase is not set, random string of 8 characters will be used.
[in] | softap | The SoftAP handle |
[out] | passphrase | The passphrase |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_OUT_OF_MEMORY | Out of memory |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_get_security_type | ( | softap_h | softap, |
softap_security_type_e * | type | ||
) |
Gets the security type of SoftAP.
If security type is not set, WPA2_PSK is used.
[in] | softap | The SoftAP handle |
[out] | type | The security type |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_get_ssid | ( | softap_h | softap, |
char ** | ssid | ||
) |
Gets the SSID (service set identifier) for SoftAP.
If SSID is not set, Device name is used as SSID.
[in] | softap | The SoftAP handle |
[out] | ssid | The SSID |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_OUT_OF_MEMORY | Out of memory |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_get_ssid_visibility | ( | softap_h | softap, |
bool * | visible | ||
) |
Gets the visibility of SSID (service set identifier) for SoftAP.
If the visibility is set to invisible, then the SSID of this device is hidden and Wi-Fi scan won't find your device.
[in] | softap | The SoftAP handle |
[out] | visible | The visibility of SSID: (true = visible, false = invisible) |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_get_subnet_mask | ( | softap_h | softap, |
softap_address_family_e | address_family, | ||
char ** | subnet_mask | ||
) |
Gets the Subnet Mask.
[in] | softap | The SoftAP handle |
[in] | address_family | The address family of IP address (currently only SOFTAP_ADDRESS_FAMILY_IPV4 is supported) |
[out] | subnet_mask | Subnet mask |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_OUT_OF_MEMORY | Out of memory |
SOFTAP_ERROR_OPERATION_FAILED | Operation failed |
SOFTAP_ERROR_INVALID_OPERATION | Invalid operation |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_get_vendor_element | ( | softap_h | softap, |
char ** | vendor_element | ||
) |
Gets vendor specific elements for Beacon and Probe Response frames.
[in] | softap | The SoftAP handle |
[out] | vendor_element | The vendor specific elements |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_is_dhcp_enabled | ( | softap_h | softap, |
bool * | dhcp_enabled | ||
) |
Checks whether the DHCP is enabled or not.
[in] | softap | The SoftAP handle |
[out] | dhcp_enabled | true if DHCP is enabled, false if DHCP is disabled |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_is_enabled | ( | softap_h | softap, |
bool * | enable | ||
) |
Checks whether the SoftAP is enabled or not.
[in] | softap | The SoftAP handle |
[out] | enable | true if SoftAP is enabled, false if SoftAP is disabled |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_OPERATION_FAILED | Operation failed |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_push_wps_button | ( | softap_h | softap | ) |
Pushes the WPS button to connect with SoftAP client(WPS PBC).
[in] | softap | The SoftAP handle |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_OPERATION_FAILED | Operation failed |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_reload_settings | ( | softap_h | softap, |
softap_settings_reloaded_cb | callback, | ||
void * | user_data | ||
) |
Reloads the settings (SSID / Passphrase / Security type / SSID visibility) for SoftAP.
[in] | softap | The SoftAP handle |
[in] | callback | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_OPERATION_FAILED | Operation failed |
SOFTAP_ERROR_RESOURCE_BUSY | Device or resource busy |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_set_channel | ( | softap_h | softap, |
int | channel | ||
) |
Sets the channel for SoftAP.
If channel is not set, channel 1 is used as default.
[in] | softap | The SoftAP handle |
[in] | channel | The channel number |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_set_client_connection_state_changed_cb | ( | softap_h | softap, |
softap_client_connection_state_changed_cb | callback, | ||
void * | user_data | ||
) |
Sets the callback function, which is called when the state of connection is changed.
[in] | softap | The SoftAP handle |
[in] | callback | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_set_disabled_cb | ( | softap_h | softap, |
softap_disabled_cb | callback, | ||
void * | user_data | ||
) |
Sets the callback function called when SoftAP is disabled.
[in] | softap | The SoftAP handle |
[in] | callback | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_set_enabled_cb | ( | softap_h | softap, |
softap_enabled_cb | callback, | ||
void * | user_data | ||
) |
Sets the callback function, which is called when SoftAP is enabled.
[in] | softap | The SoftAP handle |
[in] | callback | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_set_ip_address | ( | softap_h | softap, |
softap_address_family_e | address_family, | ||
const char * | ip_address | ||
) |
Sets the local IP address.
[in] | softap | The SoftAP handle |
[in] | address_family | The address family of IP address (currently only SOFTAP_ADDRESS_FAMILY_IPV4 is supported) |
[in] | ip_address | The local IP address |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_set_mode | ( | softap_h | softap, |
softap_wireless_mode_e | mode | ||
) |
Sets the wireless mode for SoftAP.
If wireless mode is not set, IEEE 802.11g is used as default.
[in] | softap | The SoftAP handle |
[in] | mode | The mode |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_set_passphrase | ( | softap_h | softap, |
const char * | passphrase | ||
) |
Sets the passphrase for SoftAP.
If the passphrase is not set, random string of 8 characters is used.
[in] | softap | The SoftAP handle |
[in] | passphrase | The passphrase |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_set_passphrase_changed_cb | ( | softap_h | softap, |
softap_passphrase_changed_cb | callback, | ||
void * | user_data | ||
) |
Sets the callback function, which is called when the passphrase of SoftAP is changed.
[in] | softap | The SoftAP handle |
[in] | callback | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_set_security_type | ( | softap_h | softap, |
softap_security_type_e | type | ||
) |
Sets the security type of SoftAP.
If security type is not set, WPA2_PSK is used.
[in] | softap | The SoftAP handle |
[in] | type | The security type |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_OPERATION_FAILED | Operation failed |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_set_security_type_changed_cb | ( | softap_h | softap, |
softap_security_type_changed_cb | callback, | ||
void * | user_data | ||
) |
Sets the callback function, which is called when the security type of SoftAP is changed.
[in] | softap | The SoftAP handle |
[in] | callback | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_set_ssid | ( | softap_h | softap, |
const char * | ssid | ||
) |
Sets the SSID (service set identifier) for SoftAP.
The SSID cannot exceed 32 bytes. If SSID is not set, device name is used as SSID.
[in] | softap | The SoftAP handle |
[in] | ssid | The SSID |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_OUT_OF_MEMORY | Out of memory |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_set_ssid_visibility | ( | softap_h | softap, |
bool | visible | ||
) |
Sets the visibility of SSID (service set identifier) for SoftAP.
If you set the visibility to invisible, then the SSID of this device is hidden and Wi-Fi scan won't find your device.
By default visibility is set to true
.
[in] | softap | The SoftAP handle |
[in] | visible | The visibility of SSID: (true = visible, false = invisible) |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_OPERATION_FAILED | Operation failed |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_set_ssid_visibility_changed_cb | ( | softap_h | softap, |
softap_ssid_visibility_changed_cb | callback, | ||
void * | user_data | ||
) |
Sets the callback function , which is called when the visibility of SSID is changed.
[in] | softap | The SoftAP handle |
[in] | callback | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_set_vendor_element | ( | softap_h | softap, |
const char * | vendor_element | ||
) |
Sets vendor specific elements for Beacon and Probe Response frames.
[in] | softap | The SoftAP handle |
[in] | vendor_element | The vendor specific elements |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_set_wps_pin | ( | softap_h | softap, |
const char * | wps_pin | ||
) |
Sets the WPS PIN to connect with SoftAP client(WPS PIN).
[in] | softap | The SoftAP handle |
[in] | wps_pin | The WPS PIN |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_OPERATION_FAILED | Operation failed |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_unset_client_connection_state_changed_cb | ( | softap_h | softap | ) |
Unsets the callback function, which is called when the state of connection is changed.
[in] | softap | The SoftAP handle |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_unset_disabled_cb | ( | softap_h | softap | ) |
Unsets the callback function, which is called when SoftAP is disabled.
[in] | softap | The SoftAP handle |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_unset_enabled_cb | ( | softap_h | softap | ) |
Unsets the callback function, which is called when SoftAP is enabled.
[in] | softap | The SoftAP handle |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_unset_passphrase_changed_cb | ( | softap_h | softap | ) |
Unsets the callback function, which is called when the passphrase of SoftAP is changed.
[in] | softap | The SoftAP handle |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_unset_security_type_changed_cb | ( | softap_h | softap | ) |
Unsets the callback function, which is called when the security type of SoftAP is changed.
[in] | softap | The SoftAP handle |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |
int softap_unset_ssid_visibility_changed_cb | ( | softap_h | softap | ) |
Unsets the callback function, which is called when the visibility of SSID is changed.
[in] | softap | The SoftAP handle |
SOFTAP_ERROR_NONE | Successful |
SOFTAP_ERROR_INVALID_PARAMETER | Invalid parameter |
SOFTAP_ERROR_NOT_SUPPORTED | API is not supported |
SOFTAP_ERROR_PERMISSION_DENIED | Permission denied |