WiFi Access Point

group wifi_ap

Control and monitoring of WiFi access point interface.

Note
The WiFi access point interface provides a WiFi network access point. Control of WiFi AP including WiFi SSID and password and IP address.
See
WiFi Station Interface
See
WiFi Events Interface

Variables

AccessPointClass &WifiAccessPoint

Global instance of WiFi access point object.

Note
Use WifiAccessPoint.function to access WiFi access point functions
Note
Example:
if(WifiAccessPoint.config("ESP_AP", AUTH_OPEN))
           WifiAccessPoint.enable(true);

class AccessPointClass
#include <AccessPoint.h>

Access point class.

Public Functions

virtual ~AccessPointClass()
virtual void enable(bool enabled, bool save = false) = 0

Enable or disable WiFi AP.

Parameters
  • enabled: True to enable AP. False to disable.
  • save: True to save operational mode to flash, False to set current operational mode only

virtual bool isEnabled() const = 0

Get WiFi AP enable status.

Return Value
  • bool: True if WiFi AP enabled.

virtual bool config(const String &ssid, String password, WifiAuthMode mode, bool hidden = false, int channel = 7, int beaconInterval = 200) = 0

Configure WiFi AP.

Parameters
  • ssid: WiFi AP SSID
  • password: WiFi AP password
  • mode: WiFi AP mode
  • hidden: True to hide WiFi AP (Default: Visible)
  • channel: WiFi AP channel (Default: 7)
  • beaconInterval: WiFi AP beacon interval in milliseconds (Default: 200ms)
Return Value
  • bool: True on success

virtual IpAddress getIP() const = 0

Get WiFi AP IP address.

Return Value
  • IpAddress: WiFi AP IP address

virtual bool setIP(IpAddress address) = 0

Set WiFi AP IP addres.

Parameters
  • address: New IP address for WiFi AP
Return Value
  • bool: True on success

virtual MacAddress getMacAddress() const = 0

Get WiFi AP MAC address.

Return Value
  • MacAddress:

String getMAC(char sep = '0') const

Get WiFi AP MAC address.

Parameters
  • sep: separator between bytes (e.g. ‘:’)
Return Value

virtual IpAddress getNetworkMask() const = 0

Get WiFi AP network mask.

Return Value
  • IpAddress: WiFi AP network mask

virtual IpAddress getNetworkGateway() const = 0

Get WiFi AP default gateway.

Return Value
  • IpAddress: WiFi AP default gateway

virtual IpAddress getNetworkBroadcast() const = 0

Get WiFi AP broadcast address.

Return Value
  • IpAddress: WiFi AP broadcast address

virtual String getSSID() const = 0

Get WiFi access point SSID.

Return Value
  • String: WiFi access point SSID

virtual String getPassword() const = 0

Get WiFi access point password.

Return Value
  • String: WiFi access point password