This function gets the connection status.

Syntax

int SysGetWLANConnectStatus(
  int *status
);

Parameters

status
[out] A pointer to a variable that gets a value that represents the wireless LAN connection status.
The following values is returned:
ValueDescription
SYS_WLAN_STATUS_UNAVAILABLE Wireless LAN is unavailable.
SYS_WLAN_STATUS_DISCONNECTED Wireless LAN is disconnected.
SYS_WLAN_STATUS_CONNECTED Wireless LAN is connected.

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)
{
    int errorcode, status;
    printf("\fSysGetConnectStatus \r\n\n");

    errorcode = SysGetWLANConnectStatus(&status);
    printf("error = %d\r\n", errorcode);
    printf("power = %d\r\n", status);
    printf("Please any key\r\n");
    ResetKey();
    while(!kbhit())
        Idle();

    errorcode = SysSetWLANPower(SYS_WLAN_POWER_AUTO);
    SysWLANInit(NULL);
    printf("Power ON\r\n");
    printf("Please any key\r\n");
    ResetKey();
    while(!kbhit())
        Idle();

    errorcode = SysGetWLANConnectStatus(&status);
    printf("error = %d\r\n", errorcode);
    printf("power = %d\r\n", status);
    printf("Please any key\r\n");
    ResetKey();
    while(!kbhit())
        Idle();
}

Last updated: 2020/11/24