Syntax
VM_RESULT vm_wlan_set_parameter(
    VM_WLAN_MODE mode, 
    void* parameter, 
    VM_WLAN_PARAMETER parameter_type
);
ContentsIndex
PreviousUpNext
vm_wlan_set_parameter
Example
Syntax
VM_RESULT vm_wlan_set_parameter(
    VM_WLAN_MODE mode, 
    void* parameter, 
    VM_WLAN_PARAMETER parameter_type
);
Description

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 mode is WPA2_ONLY_PSK. The default password is 12345678.

Parameters
Parameters 
Description 
VM_WLAN_MODE mode 
[IN] Specifies the WLAN mode. 
void* parameter 
[IN] Specifies the parameter of vm_wlan_parameter_t type in AP mode. 
VM_WLAN_PARAMETER parameter_type 
[IN] Specifies what parameter to configure, VM_WLAN_PARAMETER for AP mode. 
Returns

VM_WLAN_ERROR_SUCCESS: Success. 

VM_WLAN_ERROR_FAILED: Failed. 

VM_WLAN_ERROR_STATE_ERROR: Tried to set the parameter in a wrong state, 

such as trying to set AP parameter when AP is on. 

VM_WLAN_ERROR_INVALID_INPUT: Invalid input parameter(s).

Example
// Sets AP parameter before turning on AP mode.
vm_wlan_parameter_t ap_param = {0};
ap_param.authorize_mode = VM_WLAN_AUTHORIZE_MODE_WPA2_ONLY_PSK;
strcpy(ap_param.ssid, "SSIDEXAMPLE");
strcpy(ap_param.pwd, "PWDEXAMPLE")
vm_wlan_set_para(VM_WLAN_SET_MODE_AP, (void*)&ap_param, VM_WLAN_CFG_AP_PARA_ALL);
File

vmwlan.h

Group
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 support@toolsfactory.com.