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
NetworkInterface Class Reference
[Types]
The provides an interface for joining and/or creating a network. More...
#include <NetworkInterface.h>
Inherited by Wiconnect.
Public Member Functions | |
WiconnectResult | startWebSetup (const char *ssid=NULL, const char *password=NULL, const Callback &completeHandler=Callback()) |
Start the WiConnect WiFi module 'web setup' feature. | |
WiconnectResult | stopWebSetup () |
Stop the WiConnect WiFi module 'web setup' feature. | |
WiconnectResult | isWebSetupRunning (bool *isRunningPtr) |
Return status of WiConnect WiFi module 'web setup' feature. | |
WiconnectResult | join (const char *ssid=NULL, const char *password=NULL, const Callback &completeHandler=Callback()) |
Join a WiFi network. | |
WiconnectResult | leave () |
Leave a WiFi network. | |
WiconnectResult | getNetworkStatus (NetworkStatus *statusPtr) |
Get connection status to WiFi network. | |
WiconnectResult | getNetworkJoinResult (NetworkJoinResult *joinResultPtr) |
Get the result of joining the network. | |
WiconnectResult | getSignalStrength (NetworkSignalStrength *signalStrengthPtr) |
Get NetworkSignalStrength of WiFi network module is connected. | |
WiconnectResult | getRssi (int32_t *rssiPtr) |
Get the RSSI in dBm of WiFi network. | |
WiconnectResult | getMacAddress (MacAddress *macAddress) |
Get MAC address of the WiFi module. | |
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. | |
WiconnectResult | setDhcpEnabled (bool enabled) |
Set DHCP enabled. | |
WiconnectResult | getDhcpEnabled (bool *enabledPtr) |
Get if DHCP enabled. | |
WiconnectResult | setIpSettings (uint32_t ip, uint32_t netmask, uint32_t gateway) |
Set static IP settings. | |
WiconnectResult | setIpSettings (const char *ip, const char *netmask, const char *gateway) |
Set static IP settings (with string parameters) | |
WiconnectResult | getIpSettings (uint32_t *ip, uint32_t *netmask, uint32_t *gateway) |
Get network IP settings. | |
WiconnectResult | setDnsAddress (uint32_t dnsAddress) |
Set static DNS Address. | |
WiconnectResult | getDnsAddress (uint32_t *dnsAddress) |
Get the static DNS address. | |
const char * | getIpAddress (char *buffer ALLOW_NULL_STRING_BUFFER) |
Return the current IP address of the module if possible, else return 0.0.0.0. | |
Static Public Member Functions | |
static bool | strToIp (const char *str, uint32_t *intPtr) |
Convert string to IP address. | |
static const char * | ipToStr (uint32_t ip, char *ipStrBuffer ALLOW_NULL_STRING_BUFFER) |
Convert IP address to string. | |
static const char * | networkStatusToStr (NetworkStatus status) |
Convert NetworkStatus to string. | |
static const char * | networkJoinResultToStr (NetworkJoinResult joinResult) |
Convert NetworkJoinResult to string. | |
static const char * | signalStrengthToStr (NetworkSignalStrength signalStrenth) |
Convert NetworkSignalStrength to string. | |
static NetworkSignalStrength | rssiToSignalStrength (int rssi) |
Convert RSSI (in dBm) to NetworkSignalStrength. | |
static NetworkSecurity | strToNetworkSecurity (const char *str) |
Convert string to NetworkSecurity. | |
static const char * | networkSecurityToStr (NetworkSecurity security) |
Convert NetworkSecurity to string. | |
static bool | strToSsid (const char *str, Ssid *ssid) |
Convert string Ssid. | |
static const char * | ssidToStr (const Ssid *ssid, char *ssidStrBuffer ALLOW_NULL_STRING_BUFFER) |
Convert Ssid to string. | |
static bool | strToMacAddress (const char *str, MacAddress *macAddress) |
Convert string MacAddress. | |
static const char * | macAddressToStr (const MacAddress *macAddress, char *macStrBuffer ALLOW_NULL_STRING_BUFFER) |
Convert MacAddress to string. |
Detailed Description
The provides an interface for joining and/or creating a network.
It provides other utilities such as scanning for networks, pinging a network, resolving a domain name to IP address.
- Note:
- This class is an interface to the Wiconnect class. It should never be independently instantiated or the parent of another class.
Definition at line 55 of file NetworkInterface.h.
Generated on Tue Jul 12 2022 17:35:59 by 1.7.2