This function sets the information of the connection destination AP candidate.

Syntax

int SysSetWLANApInfoEap(
  int index,
  tstrWlanApInfoEap *apInfo
);

Parameters

index
[in] Specify the array number that stores the AP information of the wireless LAN (0 to 29).
apInfo
[in]A pointer to the tstrWlanApInfoEap structure.

Return value

Returns TRUE if the function succeeds, FALSE otherwise.

Remarks

Requirements

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

Sample

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

void main(void)
{
    tstrWlanApInfoEap apInfo;
    if (SysGetWLANApInfoEap(0, &apInfo))
    {
        printf("SUCCESS\n");
        printf("SSID:%s\n",apInfo.au8SSID);
        if (apInfo.u8SecType == M2M_WIFI_SEC_OPEN)
        {
            printf("SecType:OPEN\n");
        }
        else if (apInfo.u8SecType == M2M_WIFI_SEC_WPA_PSK)
        {
            printf("SecType:WPA\n");
            printf("PSK:%s\n",apInfo.key.au8PSK);
        }
        else if (apInfo.u8SecType == M2M_WIFI_SEC_WEP)
        {
            printf("SecType:WEP\n");
            printf("Wepkey:%s\n",apInfo.key.strWepInfo.au8WepKey);
            printf("Index:%d\n",apInfo.key.strWepInfo.u8KeyIndx);
        }
    }
}

Last updated: 2020/11/24