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

Syntax

int SysGetWLANConfigValue(
  int id,
  tuWlanConfigValue *value
);

Parameters

id
[in] Specify the ID of the wireless LAN system settings.
ValueDescription
SYS_WLAN_CONFIG_ID_REGULATORY Gets 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 Gets the roaming mode.
SYS_WLAN_CONFIG_ID_ROAMINGTHRESHOLD Gets the roaming threshold (RSSI).
SYS_WLAN_CONFIG_ID_DHCP Gets whether to use DHCP.
If DHCP is not used, it will be a static IP.
SYS_WLAN_CONFIG_ID_IP_ADDRESS Gets the IP address for static IP.
SYS_WLAN_CONFIG_ID_SUBNETMASK Gets the subnet mask for static IP.
SYS_WLAN_CONFIG_ID_GATEWAY Gets the default gateway for static IP.
SYS_WLAN_CONFIG_ID_DNS Gets the DNS address for static IP.
SYS_WLAN_CONFIG_ID_DNS2 Gets the secondary DNS for static IP.
SYS_WLAN_CONFIG_ID_APINFOINDEX Gets the index of AP information to use.
SYS_WLAN_CONFIG_ID_POWERSAVEMODE Gets the power saving mode.
value
[out]A pointer to the tuWlanConfigValue union.
Gets the value of the wireless LAN system setting selected by id.

Return value

Returns TRUE if the function succeeds, FALSE otherwise.

Remarks

Gets the value of the wireless LAN system settings.

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");

    errorcode = SysGetWLANConfigValue(SYS_WLAN_CONFIG_ID_REGULATORY, &value);
    printf("error = %d\r\n", errorcode);
    switch (value.regulatory)
    {
    case NORTH_AMERICA:
        printf("NORTH_AMERICA\r\n");
        break;
    case EUROPE:
        printf("JAPAN/EUROPE\r\n");
        break;
    default:
        break;
    }
    printf("Please any key\r\n");
    ResetKey();
    while(!kbhit())
        Idle();
}

Last updated: 2020/11/23