Host library for controlling a WiConnect enabled Wi-Fi module.

Dependents:   wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more

Embed: (wiki syntax)

« Back to documentation index

Utility Methods

Utility Methods
[Network]

Network utility methods. More...

Functions

WiconnectResult scan (ScanResultList &resultList, const uint8_t *channelList=NULL, const char *ssid=NULL)
 Scan for available WiFi networks.
WiconnectResult ping (const char *domain=NULL, uint32_t *timeMsPtr=NULL)
 Ping a WiFi network.
WiconnectResult lookup (const char *domain, uint32_t *ipAddressPtr)
 Resolve domain name into IP address.

Detailed Description

Network utility methods.


Function Documentation

WiconnectResult lookup ( const char *  domain,
uint32_t *  ipAddressPtr 
) [inherited]

Resolve domain name into IP address.

Parameters:
[in]domainThe domain name to resolve
[out]ipAddressPtrpointer to uint32 to hold resolved IP address. Note, the IP address is in network-byte-order.
Returns:
Result of method. See WiconnectResult
WiconnectResult ping ( const char *  domain = NULL,
uint32_t *  timeMsPtr = NULL 
) [inherited]

Ping a WiFi network.

Optionally ping a specific server and return the time in milliseconds it took for the network to response. If no domain is supplied, the module pings to gateway (i.e router it's connected to).

Parameters:
[in]domainOptional, the domain name to ping
[out]timeMsPtrOptional, pointer to uint32 to hold time in milliseconds the ping took
Returns:
Result of method. See WiconnectResult
WiconnectResult scan ( ScanResultList resultList,
const uint8_t *  channelList = NULL,
const char *  ssid = NULL 
) [inherited]

Scan for available WiFi networks.

The populate the supplied ScanResultList with ScanResult of each found network.

Optionally only scan of specific channels by supplying a null terminated list of channels. Example:

 const uint8_t channelsToScan[] = {1, 6, 11, 0};
Parameters:
[out]resultListList to populate with scan results.
[in]channelListOptional, null terminated list of channels to scan.
[in]ssidOptional, specific network name to scan for.
Returns:
Result of method. See WiconnectResult