Tizen Native API
4.0
|
The Wi-Fi API provides functions for managing Wi-Fi.
#include <wifi-manager.h>
To use Wifi Manager API, first create a wifi handle using wifi_initialize(). After that, you can obtain wifi information. You should destroy the created wifi handle if you do not need it anymore. The Wi-Fi Manager provides functions for managing Wi-Fi. Using the Wi-Fi Manager, you can implement features that allow the users of your application to:
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 featuring your application can be found from Feature Element.
Functions | |
int | wifi_manager_activate (wifi_manager_h wifi, wifi_manager_activated_cb callback, void *user_data) |
Activates Wi-Fi asynchronously. | |
int | wifi_manager_activate_with_wifi_picker_tested (wifi_manager_h wifi, wifi_manager_activated_cb callback, void *user_data) |
Activates Wi-Fi asynchronously and displays Wi-Fi picker (popup) when Wi-Fi is not automatically connected. | |
int | wifi_manager_deactivate (wifi_manager_h wifi, wifi_manager_deactivated_cb callback, void *user_data) |
Deactivates Wi-Fi asynchronously. | |
int | wifi_manager_is_activated (wifi_manager_h wifi, bool *activated) |
Checks whether Wi-Fi is activated. | |
int | wifi_manager_get_mac_address (wifi_manager_h wifi, char **mac_address) |
Gets the local MAC address. | |
int | wifi_manager_get_network_interface_name (wifi_manager_h wifi, char **name) |
Gets the name of the network interface. | |
int | wifi_manager_scan (wifi_manager_h wifi, wifi_manager_scan_finished_cb callback, void *user_data) |
Starts scan asynchronously. | |
int | wifi_manager_get_scan_state (wifi_manager_h wifi, wifi_manager_scan_state_e *scan_state) |
Gets the Wi-Fi scan state. | |
int | wifi_manager_scan_specific_ap (wifi_manager_h wifi, const char *essid, wifi_manager_scan_finished_cb callback, void *user_data) |
Starts specific AP scan, asynchronously. | |
int | wifi_manager_specific_scan_create (wifi_manager_h wifi, wifi_manager_specific_scan_h *specific_scan) |
Creates a Wi-Fi specific AP scan handle. | |
int | wifi_manager_specific_scan_destroy (wifi_manager_h wifi, wifi_manager_specific_scan_h specific_scan) |
Destroys a Wi-Fi specific AP scan handle. | |
int | wifi_manager_specific_scan_set_ssid (wifi_manager_specific_scan_h specific_scan, const char *essid) |
Sets the SSID of a specific AP scan. | |
int | wifi_manager_specific_scan_set_freq (wifi_manager_specific_scan_h specific_scan, int freq) |
Sets the channel frequency of a specific AP scan. | |
int | wifi_manager_specific_ap_start_multi_scan (wifi_manager_h wifi, wifi_manager_specific_scan_h specific_scan, wifi_manager_scan_finished_cb callback, void *user_data) |
Starts multi SSID and multi channel specific scan, asynchronously. | |
int | wifi_manager_connect_hidden_ap (wifi_manager_h wifi, const char *essid, wifi_manager_security_type_e sec_type, const char *passphrase, wifi_manager_connected_cb callback, void *user_data) |
Connects to the hidden AP, asynchronously. | |
int | wifi_manager_get_connected_ap (wifi_manager_h wifi, wifi_manager_ap_h *ap) |
Gets the handle of the connected access point. | |
int | wifi_manager_foreach_found_ap (wifi_manager_h wifi, wifi_manager_found_ap_cb callback, void *user_data) |
Gets the result of the scan. | |
int | wifi_manager_foreach_found_specific_ap (wifi_manager_h wifi, wifi_manager_found_ap_cb callback, void *user_data) |
Gets the result of specific AP scan. | |
int | wifi_manager_foreach_found_bssid_ap (wifi_manager_h wifi, wifi_manager_found_ap_cb callback, void *user_data) |
Gets the result of the BSSID scan (i.e. BSSID, ESSID & RSSI). | |
int | wifi_manager_connect (wifi_manager_h wifi, wifi_manager_ap_h ap, wifi_manager_connected_cb callback, void *user_data) |
Connects to the access point asynchronously. | |
int | wifi_manager_disconnect (wifi_manager_h wifi, wifi_manager_ap_h ap, wifi_manager_disconnected_cb callback, void *user_data) |
Disconnects to the access point asynchronously. | |
int | wifi_manager_connect_by_wps_pbc (wifi_manager_h wifi, wifi_manager_ap_h ap, wifi_manager_connected_cb callback, void *user_data) |
Connects to the access point with WPS PBC asynchronously. | |
int | wifi_manager_connect_by_wps_pin (wifi_manager_h wifi, wifi_manager_ap_h ap, const char *pin, wifi_manager_connected_cb callback, void *user_data) |
Connects to the access point with WPS PIN asynchronously. | |
int | wifi_manager_connect_by_wps_pbc_without_ssid (wifi_manager_h wifi, wifi_manager_connected_cb callback, void *user_data) |
Connects to the access point with WPS PBC without entering SSID. | |
int | wifi_manager_connect_by_wps_pin_without_ssid (wifi_manager_h wifi, const char *pin, wifi_manager_connected_cb callback, void *user_data) |
Connects to the access point with WPS PIN without entering SSID. | |
int | wifi_manager_cancel_wps (wifi_manager_h wifi) |
Stops ongoing WPS provisioning / disconnects from the connected access point. | |
int | wifi_manager_forget_ap (wifi_manager_h wifi, wifi_manager_ap_h ap) |
Deletes the information of a stored access point and disconnects from it if it was connected to. | |
int | wifi_manager_update_ap (wifi_manager_h wifi, wifi_manager_ap_h ap) |
Updates an existing AP. | |
int | wifi_manager_add_vsie (wifi_manager_h wifi, wifi_manager_vsie_frames_e frame_id, const char *vsie_str) |
Adds the Wi-Fi Vendor Specific Information Element (VSIE) to a specific frame type. | |
int | wifi_manager_get_vsie (wifi_manager_h wifi, wifi_manager_vsie_frames_e frame_id, char **vsie_str) |
Gets the Wi-Fi Vendor Specific Information Elements (VSIE) from a specific frame. | |
int | wifi_manager_remove_vsie (wifi_manager_h wifi, wifi_manager_vsie_frames_e frame_id, const char *vsie_str) |
Removes the Wi-Fi Vendor Specific Information Element (VSIE) from specific frame. | |
Typedefs | |
typedef void * | wifi_manager_specific_scan_h |
The Wi-Fi specific ap scan handle. | |
typedef bool(* | wifi_manager_found_ap_cb )(wifi_manager_ap_h ap, void *user_data) |
Called for each found access point. | |
typedef void(* | wifi_manager_scan_finished_cb )(wifi_manager_error_e error_code, void *user_data) |
Called when the scan is finished. | |
typedef void(* | wifi_manager_scan_state_changed_cb )(wifi_manager_scan_state_e state, void *user_data) |
Called when the scanning state is changed. | |
typedef void(* | wifi_manager_activated_cb )(wifi_manager_error_e result, void *user_data) |
Called after wifi_manager_activate() or wifi_manager_activate_with_wifi_picker_tested() is completed. | |
typedef void(* | wifi_manager_deactivated_cb )(wifi_manager_error_e result, void *user_data) |
Called after wifi_manager_deactivate() is completed. | |
typedef void(* | wifi_manager_connected_cb )(wifi_manager_error_e result, void *user_data) |
Called when the connection process is completed. | |
typedef void(* | wifi_manager_disconnected_cb )(wifi_manager_error_e result, void *user_data) |
Called after wifi_manager_disconnect() is completed. | |
typedef void(* | wifi_manager_bssid_scan_finished_cb )(wifi_manager_error_e error_code, void *user_data) |
Called when the BSSID scan is finished. |
typedef void(* wifi_manager_activated_cb)(wifi_manager_error_e result, void *user_data) |
Called after wifi_manager_activate() or wifi_manager_activate_with_wifi_picker_tested() is completed.
[in] | result | The result |
[in] | user_data | The user data passed from wifi_manager_activate() and wifi_manager_activate_with_wifi_picker_tested() |
typedef void(* wifi_manager_bssid_scan_finished_cb)(wifi_manager_error_e error_code, void *user_data) |
Called when the BSSID scan is finished.
[in] | error_code | The error code |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* wifi_manager_connected_cb)(wifi_manager_error_e result, void *user_data) |
Called when the connection process is completed.
The following functions start the connection process and will result in the callback being called:
[in] | result | The result |
[in] | user_data | The user data passed from the connection function. |
typedef void(* wifi_manager_deactivated_cb)(wifi_manager_error_e result, void *user_data) |
Called after wifi_manager_deactivate() is completed.
[in] | result | The result |
[in] | user_data | The user data passed from wifi_manager_deactivate() |
typedef void(* wifi_manager_disconnected_cb)(wifi_manager_error_e result, void *user_data) |
Called after wifi_manager_disconnect() is completed.
[in] | result | The result |
[in] | user_data | The user data passed from wifi_manager_disconnect() |
typedef bool(* wifi_manager_found_ap_cb)(wifi_manager_ap_h ap, void *user_data) |
Called for each found access point.
[in] | ap | The access point |
[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(* wifi_manager_scan_finished_cb)(wifi_manager_error_e error_code, void *user_data) |
Called when the scan is finished.
[in] | error_code | The error code |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* wifi_manager_scan_state_changed_cb)(wifi_manager_scan_state_e state, void *user_data) |
Called when the scanning state is changed.
[in] | state | The wifi scanning state |
[in] | user_data | The user data passed from the callback registration function |
typedef void* wifi_manager_specific_scan_h |
The Wi-Fi specific ap scan handle.
Enumeration for Wi-Fi Frame type.
int wifi_manager_activate | ( | wifi_manager_h | wifi, |
wifi_manager_activated_cb | callback, | ||
void * | user_data | ||
) |
Activates Wi-Fi asynchronously.
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback function to be called This can be NULL if you don't want to get the notification. |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_SECURITY_RESTRICTED | Restricted by security system policy |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_activate_with_wifi_picker_tested | ( | wifi_manager_h | wifi, |
wifi_manager_activated_cb | callback, | ||
void * | user_data | ||
) |
Activates Wi-Fi asynchronously and displays Wi-Fi picker (popup) when Wi-Fi is not automatically connected.
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback function to be called This can be NULL if you don't want to get the notification. |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_SECURITY_RESTRICTED | Restricted by security system policy |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_add_vsie | ( | wifi_manager_h | wifi, |
wifi_manager_vsie_frames_e | frame_id, | ||
const char * | vsie_str | ||
) |
Adds the Wi-Fi Vendor Specific Information Element (VSIE) to a specific frame type.
[in] | wifi | The Wi-Fi handle |
[in] | frame_id | The frame ID for setting VSIE |
[in] | vsie_str | The VSIE data |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_cancel_wps | ( | wifi_manager_h | wifi | ) |
Stops ongoing WPS provisioning / disconnects from the connected access point.
[in] | wifi | The Wi-Fi handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_connect | ( | wifi_manager_h | wifi, |
wifi_manager_ap_h | ap, | ||
wifi_manager_connected_cb | callback, | ||
void * | user_data | ||
) |
Connects to the access point asynchronously.
[in] | wifi | The Wi-Fi handle |
[in] | ap | The access point handle |
[in] | callback | The callback function to be called This can be NULL if you don't want to get the notification. |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_connect_by_wps_pbc | ( | wifi_manager_h | wifi, |
wifi_manager_ap_h | ap, | ||
wifi_manager_connected_cb | callback, | ||
void * | user_data | ||
) |
Connects to the access point with WPS PBC asynchronously.
[in] | wifi | The Wi-Fi handle |
[in] | ap | The access point handle |
[in] | callback | The callback function to be called This can be NULL if you don't want to get the notification. |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_connect_by_wps_pbc_without_ssid | ( | wifi_manager_h | wifi, |
wifi_manager_connected_cb | callback, | ||
void * | user_data | ||
) |
Connects to the access point with WPS PBC without entering SSID.
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback function to be called This can be NULL if you don't want to get the notification. |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_connect_by_wps_pin | ( | wifi_manager_h | wifi, |
wifi_manager_ap_h | ap, | ||
const char * | pin, | ||
wifi_manager_connected_cb | callback, | ||
void * | user_data | ||
) |
Connects to the access point with WPS PIN asynchronously.
[in] | wifi | The Wi-Fi handle |
[in] | ap | The access point handle |
[in] | pin | The WPS PIN is a non-NULL string with length greater than 0 and less than or equal to 8 |
[in] | callback | The callback function to be called (this can be NULL if you don't want to get the notification) |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_connect_by_wps_pin_without_ssid | ( | wifi_manager_h | wifi, |
const char * | pin, | ||
wifi_manager_connected_cb | callback, | ||
void * | user_data | ||
) |
Connects to the access point with WPS PIN without entering SSID.
[in] | wifi | The Wi-Fi handle |
[in] | pin | The WPS PIN, a non-NULL string with length greater than 0 and less than or equal to 8 |
[in] | callback | The callback function to be called This can be NULL if you don't want to get the notification. |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_connect_hidden_ap | ( | wifi_manager_h | wifi, |
const char * | essid, | ||
wifi_manager_security_type_e | sec_type, | ||
const char * | passphrase, | ||
wifi_manager_connected_cb | callback, | ||
void * | user_data | ||
) |
Connects to the hidden AP, asynchronously.
[in] | wifi | The Wi-Fi handle |
[in] | essid | The ESSID of the hidden AP |
[in] | sec_type | The security type of the hidden AP |
[in] | passphrase | The passphrase of the hidden AP |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_deactivate | ( | wifi_manager_h | wifi, |
wifi_manager_deactivated_cb | callback, | ||
void * | user_data | ||
) |
Deactivates Wi-Fi asynchronously.
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback function to be called This can be NULL if you don't want to get the notification. |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_disconnect | ( | wifi_manager_h | wifi, |
wifi_manager_ap_h | ap, | ||
wifi_manager_disconnected_cb | callback, | ||
void * | user_data | ||
) |
Disconnects to the access point asynchronously.
[in] | wifi | The Wi-Fi handle |
[in] | ap | The access point handle |
[in] | callback | The callback function to be called This can be NULL if you don't want to get the notification. |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_foreach_found_ap | ( | wifi_manager_h | wifi, |
wifi_manager_found_ap_cb | callback, | ||
void * | user_data | ||
) |
Gets the result of the scan.
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback to be called |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_foreach_found_bssid_ap | ( | wifi_manager_h | wifi, |
wifi_manager_found_ap_cb | callback, | ||
void * | user_data | ||
) |
Gets the result of the BSSID scan (i.e. BSSID, ESSID & RSSI).
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback to be called |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_foreach_found_specific_ap | ( | wifi_manager_h | wifi, |
wifi_manager_found_ap_cb | callback, | ||
void * | user_data | ||
) |
Gets the result of specific AP scan.
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback to be called |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_forget_ap | ( | wifi_manager_h | wifi, |
wifi_manager_ap_h | ap | ||
) |
Deletes the information of a stored access point and disconnects from it if it was connected to.
If an AP is connected to, then connection information will be stored. This information is used when a connection to that AP is established automatically.
[in] | wifi | The Wi-Fi handle |
[in] | ap | The access point handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_get_connected_ap | ( | wifi_manager_h | wifi, |
wifi_manager_ap_h * | ap | ||
) |
Gets the handle of the connected access point.
[in] | wifi | The Wi-Fi handle |
[out] | ap | The access point handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OUT_OF_MEMORY | Out of memory |
WIFI_MANAGER_ERROR_NO_CONNECTION | There is no connected AP |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_get_mac_address | ( | wifi_manager_h | wifi, |
char ** | mac_address | ||
) |
Gets the local MAC address.
[in] | wifi | The Wi-Fi handle |
[out] | mac_address | The MAC address |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_get_network_interface_name | ( | wifi_manager_h | wifi, |
char ** | name | ||
) |
Gets the name of the network interface.
[in] | wifi | The Wi-Fi handle |
[out] | name | The name of network interface |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OUT_OF_MEMORY | Out of memory |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_get_scan_state | ( | wifi_manager_h | wifi, |
wifi_manager_scan_state_e * | scan_state | ||
) |
Gets the Wi-Fi scan state.
[in] | wifi | The Wi-Fi handle |
[in] | scan_state | The Wi-Fi scan state |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_get_vsie | ( | wifi_manager_h | wifi, |
wifi_manager_vsie_frames_e | frame_id, | ||
char ** | vsie_str | ||
) |
Gets the Wi-Fi Vendor Specific Information Elements (VSIE) from a specific frame.
[in] | wifi | The Wi-Fi handle |
[in] | frame_id | The frame ID for getting VSIE |
[out] | vsie_str | The VSIE data |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_is_activated | ( | wifi_manager_h | wifi, |
bool * | activated | ||
) |
Checks whether Wi-Fi is activated.
[in] | wifi | The Wi-Fi handle |
[out] | activated | true if Wi-Fi is activated, otherwise false if Wi-Fi is not activated. |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_remove_vsie | ( | wifi_manager_h | wifi, |
wifi_manager_vsie_frames_e | frame_id, | ||
const char * | vsie_str | ||
) |
Removes the Wi-Fi Vendor Specific Information Element (VSIE) from specific frame.
[in] | wifi | The wifi handle |
[in] | frame_id | The frame ID for removing VSIE |
[in] | vsie_str | The VSIE data |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_scan | ( | wifi_manager_h | wifi, |
wifi_manager_scan_finished_cb | callback, | ||
void * | user_data | ||
) |
Starts scan asynchronously.
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_scan_specific_ap | ( | wifi_manager_h | wifi, |
const char * | essid, | ||
wifi_manager_scan_finished_cb | callback, | ||
void * | user_data | ||
) |
Starts specific AP scan, asynchronously.
[in] | wifi | The Wi-Fi handle |
[in] | essid | The essid of specific AP |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_specific_ap_start_multi_scan | ( | wifi_manager_h | wifi, |
wifi_manager_specific_scan_h | specific_scan, | ||
wifi_manager_scan_finished_cb | callback, | ||
void * | user_data | ||
) |
Starts multi SSID and multi channel specific scan, asynchronously.
[in] | wifi | The Wi-Fi handle |
[in] | specific_scan | The Wi-Fi specific AP scan handle |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_specific_scan_create | ( | wifi_manager_h | wifi, |
wifi_manager_specific_scan_h * | specific_scan | ||
) |
Creates a Wi-Fi specific AP scan handle.
[in] | wifi | The Wi-Fi handle |
[out] | specific_scan | The Wi-Fi specific AP scan handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OUT_OF_MEMORY | Out of memory |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_specific_scan_destroy | ( | wifi_manager_h | wifi, |
wifi_manager_specific_scan_h | specific_scan | ||
) |
Destroys a Wi-Fi specific AP scan handle.
[in] | wifi | The Wi-Fi handle |
[in] | specific_scan | The Wi-Fi specific AP scan handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OUT_OF_MEMORY | Out of memory |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_specific_scan_set_freq | ( | wifi_manager_specific_scan_h | specific_scan, |
int | freq | ||
) |
Sets the channel frequency of a specific AP scan.
[in] | specific_scan | The Wi-Fi specific AP scan handle |
[in] | freq | The channel frequency of specific AP scan |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OUT_OF_MEMORY | Out of memory |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_specific_scan_set_ssid | ( | wifi_manager_specific_scan_h | specific_scan, |
const char * | essid | ||
) |
Sets the SSID of a specific AP scan.
[in] | specific_scan | The Wi-Fi specific AP scan handle |
[in] | essid | The SSID of specific AP scan |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OUT_OF_MEMORY | Out of memory |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_update_ap | ( | wifi_manager_h | wifi, |
wifi_manager_ap_h | ap | ||
) |
Updates an existing AP.
When a AP is changed, these changes will be not applied to the Connection Manager immediately. When you call this function, your changes affect the Connection Manager and the existing AP is updated.
[in] | wifi | The Wi-Fi handle |
[in] | ap | The access point handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |