Functions | WLAN

The following table lists functions in this documentation.

Connects to the AP, as specified by the ap_info. DA WLAN service can only support one connection at the same time due to chip constraint. If a new connection request is received, the connecting process of the current request will be aborted. If there is a connection established already, the connection will be disconnected, and then make a new connection. 
Disconnects the current WLAN connection. After the WLAN disconnecting process is complete, the specified callback will be invoked. 
Gets information of the connected AP, such as BSSID, RSSI and the profile ID.
The info_type specifies what kind of information to be retrieved. The caller should ensure enough space for the buffer to store the information as following: info_type info VM_WLAN_AP_INFO_BSSID VMUINT8 array with length at least VM_WLAN_MAC_ADDRESS_LENGTH + 1. VM_WLAN_AP_INFO_PROF_ID VMUINT32* points to a VMUINT32 variable. VM_WLAN_AP_INFO_RSSI VMINT32* points to an VMINT32 variable. VM_WLAN_AP_INFO_ALL vm_wlan_connected_ap_info_t* to an vm_wlan_connected_ap_info_t variable. 
Gets the IP address, Netmask, gateway IP and DNS, when they are available. The IP information will be available only when the WLAN server is in CONNECTED status. There are two situations due to the way of how to obtain the IP. If using static IP when connecting, the IP will be available once the connection succeeds. If using DHCP when connecting, the IP will be available only when ABM notifies the IP by MSG, which will take a little time after connection succeeds. 
Gets the MAC address. The size of the dest buffer must be equal to or greater than VM_WLAN_MAC_ADDRESS_LENGTH, which means the destination_length must be equal to or greater than VM_WLAN_MAC_ADDRESS_LENGTH. Otherwise the WLAN Server will fail, and the required length (VM_WLAN_MAC_ADDRESS_LENGTH) will be set in the request_length, back to the application.
If the dest is NULL and the request_length exists (not NULL), the function will fail with the required length set in request_length for the application. 
Gets the parameter under different modes. Currently, only VM_WLAN_MODE_AP and VM_WLAN_MODE_AP_STA are supported to get AP's SSID, Auth mode and Password.
The caller should prepare the corresponding variables with proper types for parameter. The caller should prepare varible with proper type for "parameter" input parameter. 
Retrieves the WLAN mode. 
Switches the mode. VM_WLAN_SET_MODE_OFF turns off both AP mode and STA mode. VM_WLAN_SET_MODE_AP turns only AP mode on. VM_WLAN_SET_MODE_STA turns only STA mode on. VM_WLAN_SET_MODE_AP_STA turns both AP mode and STA mode on. 
Registers the callback for the notifications, such as IP available notification, or WiFi passive disconnect notification. When the related things happens, notifications will be activated and the callback will be invoked, if the callback has been registered.
Use vm_wlan_deregister_notification_handler() to un-register the callback that was registered prior. 
Gets roaming parameter. 
Sets the roaming parameter. 
Scans for the Access Points. 
Aborts the scan job. 
Sets scan parameters, such as dwell time or specific SSID list. The scan parameters will be initialized to the default values everytime when the WLAN is turned on from inactive. Setting scan parameters is not useful if the WLAN is in INACTIVE state. So it is not allowed to call this function when the WLAN is in INACTIVE state. If the scan parameters are not set, the default will be used. The default dwell time is 60 seconds; the default spec_ssid_list is NULL.
The parameter_type specifies what kind of scan parameters that is expected to be set. The caller... more 
Set the WLAN parameters under different modes. The caller should prepare the corresponding variables with proper types for parameter and parameter_type of the input parameters.
Currently, only VM_WLAN_MODE_AP and VM_WLAN_MODE_AP_STA are supported for setting up the SSID, Authorize Mode and Password.
For Authorize mode, only OPEN and WPA2_ONLY_PSK are supported. The parameter(s) need to be set before the AP is turned on.
The default values will be used if the parameters are not set or the setting operation failed. The default SSID is MTK_XXXXXX, where the value of XXXXXX is the last three bytes of mac address. The default authorize... more 
The function is used to close the sniffer in WLAN STA mode. 
The function is used to open the sniffer in WLAN STA mode. 
Retrieves the status of WLAN STA mode. 
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at