Marco Hsu / WIFI_API_32kRAM
Embed: (wiki syntax)

« Back to documentation index

WIFIDevice Class Reference

WIFIDevice Class Reference

Interface using WI-FI to connect to Ethernet. More...

#include <WIFIDevice.h>

Public Member Functions

int sleep (void)
 Set WIFI in sleep mode.
int setSwitch (int position)
 Set the position of embedded RF switch.
int getSwitch (void)
 Get the position of embedded RF switch.
void setNetwork (char *SSID, char *PW, uint8_t priority)
 Perform one time WIFI scan.

Detailed Description

Interface using WI-FI to connect to Ethernet.

Definition at line 10 of file WIFIDevice.h.


Member Function Documentation

int getSwitch ( void   )

Get the position of embedded RF switch.

Get the current position of RF switch

Returns:
get 1 on WIFI to use, get 0 on BLE to use
void setNetwork ( char *  SSID,
char *  PW,
uint8_t  priority 
)

Perform one time WIFI scan.

Scan for available access point on all channels.

Returns:
number of scanned WIFI access point Get the scanned access point information. Get the scanned associated access point information table on least oneTimeScan.
Parameters:
indexquery the information of result table in index number [0~19]
SSIDaccess point SSID name on query index
RSSIaccess point RSSI (Received Signal Strength Indicator) on query index
securityaccess point security type on query index, get 0 on no security, 1 on WEP, 2 on WPA, 3 on WPA2
Returns:
0 on success, a negative number on failure when empty Set network connection in priority. Set SSID, password and priority to connect.
Parameters:
SSIDname of access point to connect
PWpassword of the given SSID
priorityrange from 0 to 2, set 0 for the highest priority
int setSwitch ( int  position )

Set the position of embedded RF switch.

Set the position of RF switch between WIFI and BLE.

Parameters:
positionset 1 on WIFI to use, set 0 on BLE to use.
Returns:
0 on success, a negative number on failure
int sleep ( void   )

Set WIFI in sleep mode.

Disable WIFI and set into sleep mode to conserve energy (no WIFI function is available at this point).

Returns:
0 on success, a negative number on failure