Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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:
-
index query the information of result table in index number [0~19] SSID access point SSID name on query index RSSI access point RSSI (Received Signal Strength Indicator) on query index security access 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:
-
SSID name of access point to connect PW password of the given SSID priority range 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:
-
position set 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
Generated on Mon Jul 25 2022 10:33:26 by
1.7.2