WiFiSTAClass¶
詳細情報¶
メンバー¶
begin()¶
wl_status_t WiFiSTAClass::begin(const char *ssid, const char *passphrase=NULL, int32_t channel=0, const uint8_t *bssid=NULL, bool connect=true)
引数
- constchar *
ssid
const char* Pointer to the SSID string. - constchar *
passphrase
const char * Optional. Passphrase. Valid characters in a passphrase must be between ASCII 32-126 (decimal). - int32_t
channel
Optional. Channel of AP - const*
bssid
uint8_t[6] Optional. BSSID / MAC of AP - bool
connect
Optional. call connect
戻り値
wl_status_t
begin()¶
wl_status_t WiFiSTAClass::begin(char *ssid, char *passphrase=NULL, int32_t channel=0, const uint8_t *bssid=NULL, bool connect=true)
引数
- char *
ssid
- char *
passphrase
- int32_t
channel
- const*
bssid
- bool
connect
戻り値
wl_status_t
begin()¶
Use to connect to SDK config.
wl_status_t WiFiSTAClass::begin()
戻り値
wl_status_t wl_status_t
config()¶
bool WiFiSTAClass::config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1=(uint32_t) 0x00000000, IPAddress dns2=(uint32_t) 0x00000000)
引数
- IPAddress
local_ip
Static ip configuration - IPAddress
gateway
Static gateway configuration - IPAddress
subnet
Static Subnet mask - IPAddress
dns1
Static DNS server 1 - IPAddress
dns2
Static DNS server 2
戻り値
bool
reconnect()¶
will force a disconnect an then start reconnecting to AP
bool WiFiSTAClass::reconnect()
戻り値
bool ok
disconnect()¶
bool WiFiSTAClass::disconnect(bool wifioff=false, bool eraseap=false)
引数
- bool
wifioff
- bool
eraseap
戻り値
bool one value of wl_status_t enum
isConnected()¶
is STA interface connected?
bool WiFiSTAClass::isConnected()
戻り値
bool true if STA is connected to an AD
setAutoConnect()¶
bool WiFiSTAClass::setAutoConnect(bool autoConnect)
引数
- bool
autoConnect
bool
戻り値
bool if saved
getAutoConnect()¶
Checks if ESP32 station mode will connect to AP automatically or not when it is powered on.
bool WiFiSTAClass::getAutoConnect()
戻り値
bool auto connect
setAutoReconnect()¶
bool WiFiSTAClass::setAutoReconnect(bool autoReconnect)
引数
- bool
autoReconnect
戻り値
bool
getAutoReconnect()¶
bool WiFiSTAClass::getAutoReconnect()
戻り値
bool
waitForConnectResult()¶
Wait for WiFi connection to reach a result returns the status reached or disconnect if STA is off
uint8_t WiFiSTAClass::waitForConnectResult()
戻り値
uint8_t wl_status_t
localIP()¶
Get the station interface IP address.
IPAddress WiFiSTAClass::localIP()
戻り値
IPAddress station IP
macAddress()¶
uint8_t * WiFiSTAClass::macAddress(uint8_t *mac)
引数
- uint8_t*
mac
pointer to uint8_t array with length WL_MAC_ADDR_LENGTH
戻り値
uint8_t* pointer to uint8_t *
macAddress()¶
Get the station interface MAC address.
String WiFiSTAClass::macAddress()
戻り値
String String mac
subnetMask()¶
Get the interface subnet mask address.
IPAddress WiFiSTAClass::subnetMask()
戻り値
IPAddress subnetMask
gatewayIP()¶
Get the gateway ip address.
IPAddress WiFiSTAClass::gatewayIP()
戻り値
IPAddress gatewayIP
dnsIP()¶
IPAddress WiFiSTAClass::dnsIP(uint8_t dns_no=0)
引数
- uint8_t
dns_no
戻り値
IPAddress DNS IP
broadcastIP()¶
Get the broadcast ip address.
IPAddress WiFiSTAClass::broadcastIP()
戻り値
IPAddress broadcastIP
networkID()¶
Get the network id.
IPAddress WiFiSTAClass::networkID()
戻り値
IPAddress networkID
subnetCIDR()¶
Get the subnet CIDR.
uint8_t WiFiSTAClass::subnetCIDR()
戻り値
uint8_t uint8_t subnetCIDR
enableIpV6()¶
Enable IPv6 on the station interface.
bool WiFiSTAClass::enableIpV6()
戻り値
bool true on success
localIPv6()¶
Get the station interface IPv6 address.
IPv6Address WiFiSTAClass::localIPv6()
戻り値
IPv6Address
getHostname()¶
Get the station interface Host name.
const char * WiFiSTAClass::getHostname()
戻り値
constchar * char array hostname
setHostname()¶
bool WiFiSTAClass::setHostname(const char *hostname)
引数
- constchar *
hostname
pointer to const string
戻り値
bool true on success
SSID()¶
Return the current SSID associated with the network
String WiFiSTAClass::SSID() const
戻り値
String SSID
psk()¶
Return the current pre shared key associated with the network
String WiFiSTAClass::psk() const
戻り値
String psk string
BSSID()¶
Return the current bssid / mac associated with the network if configured
uint8_t * WiFiSTAClass::BSSID()
戻り値
uint8_t* bssid uint8_t *
BSSIDstr()¶
Return the current bssid / mac associated with the network if configured
String WiFiSTAClass::BSSIDstr()
戻り値
String String bssid mac
RSSI()¶
Return the current network RSSI.
int8_t WiFiSTAClass::RSSI()
戻り値
int8_t RSSI value
beginSmartConfig()¶
bool WiFiSTAClass::beginSmartConfig()
戻り値
bool
stopSmartConfig()¶
bool WiFiSTAClass::stopSmartConfig()
戻り値
bool
smartConfigDone()¶
bool WiFiSTAClass::smartConfigDone()
戻り値
bool
status()¶
Return Connection status.
wl_status_t WiFiSTAClass::status()
戻り値
wl_status_t one of the value defined in wl_status_t
_setStatus()¶
void WiFiSTAClass::_setStatus(wl_status_t status)
引数
- wl_status_t
status