ACKme Logo WiConnect Host Library- API Reference Guide
 
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
WLAN Methods

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.
 

Detailed Description

Methods for joining/leaving a WLAN.

Function Documentation

WiconnectResult wiconnect::NetworkInterface::getNetworkJoinResult ( NetworkJoinResult joinResultPtr)

Get the result of joining the network.

Refer to NetworkJoinResult for more info.

Parameters
[out]joinResultPtrPoint to a NetworkJoinResult which will hold the result of joining the network
Returns
Result of method. See WiconnectResult
WiconnectResult wiconnect::NetworkInterface::getNetworkStatus ( NetworkStatus statusPtr)

Get connection status to WiFi network.

Refer to NetworkStatus for more info.

Parameters
[out]statusPtrPoint to a NetworkStatus which will hold current network status of module
Returns
Result of method. See WiconnectResult
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.

  • If completeHandler parameter is NOT specified: This command will BLOCK/return WICONNECT_PROCESSING until the module has either successfully joined the network or failed.
  • If the completeHandler parameter IS specified: This command will return and use the background processing feature described above.
Note
only the 'result' parameter of the callback handler is valid.

Refer to Asynchronous Processing for more info.

Parameters
[in]ssidOptional, optionally set the SSID of the network to join
[in]passwordOptional, 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]completeHandlerOptional, 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.
Returns
Result of method. See WiconnectResult
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.

Returns
Result of method. See WiconnectResult