This function sets the value of the wireless LAN system settings.

Syntax

int SysSetWLANConfigValue(
  int id, 
  tuWlanConfigValue value 
);

Parameters

id
[in]Specify the ID of the wireless LAN system settings.
ValueDescription
SYS_WLAN_CONFIG_ID_REGULATORY Sets the region to use.
※There are laws and regulations, so please use the settings that match your area.
Europe:1-13ch
US :1-11ch
SYS_WLAN_CONFIG_ID_ROAMINGMODE Sets the roaming mode.
SYS_WLAN_CONFIG_ID_ROAMINGTHRESHOLD Sets the roaming threshold.
SYS_WLAN_CONFIG_ID_DHCP Sets whether to use DHCP.
If DHCP is not used, it will be a static IP.
SYS_WLAN_CONFIG_ID_IP_ADDRESS Sets the IP address for static IP.
SYS_WLAN_CONFIG_ID_SUBNETMASK Sets the subnet mask for static IP.
SYS_WLAN_CONFIG_ID_GATEWAY Sets the default gateway for static IP.
SYS_WLAN_CONFIG_ID_DNS Sets the DNS address for static IP.
SYS_WLAN_CONFIG_ID_DNS2 Sets the secondary DNS for static IP.
SYS_WLAN_CONFIG_ID_APINFOINDEX Sets the index of AP information to use.
SYS_WLAN_CONFIG_ID_POWERSAVEMODE Sets the power saving mode.
value
[in]A pointer to the tuWlanConfigValue union.
Sets the value of the wireless LAN system setting selected by id.

Return value

Returns TRUE if the function succeeds, FALSE otherwise.

Remarks

Set the value of the wireless LAN system setting.

Requirements

Header file:
lib.h
Library file:
libSTARTUPOPH5000.a

Sample

#include <stdio.h>
#include <stdlib.h>
#include "lib.h"

void main(void)
{
    int errorcode;
    tuWlanConfigValue value;
    printf("\fSysSetWLANConfigValue \r\n\n");

    value.regulatory = EUROPE;
    errorcode = SysSetWLANConfigValue(SYS_WLAN_CONFIG_ID_REGULATORY, value);
    printf("error = %d\r\n", errorcode);
    printf("Please any key\r\n");
    ResetKey();
    while(!kbhit())
        Idle();
}

Last updated: 2020/11/23