![]() |
WiConnect Host Library- API Reference Guide | ||
Methods for joining/leaving a WLAN. More...
Functions | |
WiconnectResult | wiconnect::NetworkInterface::join (const char *ssid=NULL, const char *password=NULL, const Callback &completeHandler=Callback()) |
Join a WiFi network. More... | |
WiconnectResult | wiconnect::NetworkInterface::leave () |
Leave a WiFi network. More... | |
WiconnectResult | wiconnect::NetworkInterface::getNetworkStatus (NetworkStatus *statusPtr) |
Get connection status to WiFi network. More... | |
WiconnectResult | wiconnect::NetworkInterface::getNetworkJoinResult (NetworkJoinResult *joinResultPtr) |
Get the result of joining the network. More... | |
WiconnectResult | wiconnect::NetworkInterface::getSignalStrength (NetworkSignalStrength *signalStrengthPtr) |
Get NetworkSignalStrength of WiFi network module is connected. | |
WiconnectResult | wiconnect::NetworkInterface::getRssi (int32_t *rssiPtr) |
Get the RSSI in dBm of WiFi network. | |
WiconnectResult | wiconnect::NetworkInterface::getMacAddress (MacAddress *macAddress) |
Get MAC address of the WiFi module. | |
Methods for joining/leaving a WLAN.
WiconnectResult wiconnect::NetworkInterface::getNetworkJoinResult | ( | NetworkJoinResult * | joinResultPtr | ) |
Get the result of joining the network.
Refer to NetworkJoinResult for more info.
[out] | joinResultPtr | Point to a NetworkJoinResult which will hold the result of joining the network |
WiconnectResult wiconnect::NetworkInterface::getNetworkStatus | ( | NetworkStatus * | statusPtr | ) |
Get connection status to WiFi network.
Refer to NetworkStatus for more info.
[out] | statusPtr | Point to a NetworkStatus which will hold current network status of module |
WiconnectResult wiconnect::NetworkInterface::join | ( | const char * | ssid = NULL , |
const char * | password = NULL , |
||
const Callback & | completeHandler = Callback() |
||
) |
Join a WiFi network.
This command has an optional background processing feature. Background processing is enabled if the completeHandler parameter is specified. If enabled, the library will poll the module every second for the join status (essentially it'll call getNetworkStatus() every second in the background). When the module join sequence complete the callback will be executed. The background processing is disabled when leave() is called.
Refer to Asynchronous Processing for more info.
[in] | ssid | Optional, optionally set the SSID of the network to join |
[in] | password | Optional, optionally set the passkey of the network to join Note: to join an OPEN network, set this parameter to a null string (i.e. "") |
[in] | completeHandler | Optional, callback to be executed when the join sequence completes. The 'result' callback parameter contains the WiconnectResult of joining. The 'arg1' parameter is a NetworkJoinResult of joining. |
WiconnectResult wiconnect::NetworkInterface::leave | ( | ) |
Leave a WiFi network.
This method may be called to either terminate a join sequence or leave a previously connected networked.