| 
    Nol.A SDK Library
    25.8.1
    
   For IoT System Software Development 
   | 
 
WiFi 장치를 제어하기 위한 클래스 More...
#include <WiFi.hpp>
Classes | |
| struct | event_ap_probe_req_rx_t | 
| struct | event_ap_staconnected_t | 
| struct | event_ap_stadisconnected_t | 
| struct | event_sta_authmode_change_t | 
| struct | event_sta_connected_t | 
| struct | event_sta_disconnected_t | 
| struct | event_sta_got_ip_t | 
| struct | event_sta_scan_done_t | 
| struct | event_sta_wps_er_pin_t | 
Public Types | |
| enum | mode_t {  MODE_NULL = 0b000000 , MODE_STA = 0b000001 , MODE_AP = 0b000010 , MODE_APSTA = 0b000011 , MODE_MAX = 0b000100 }  | 
| enum | status_t {  STATUS_STOP = 255 , STATUS_IDLE = 0 , STATUS_NO_SSID_AVAIL = 1 , STATUS_SCAN_COMPLETED = 2 , STATUS_CONNECTED = 3 , STATUS_CONNECT_FAILED = 4 , STATUS_CONNECTION_LOST = 5 , STATUS_DISCONNECTED = 6 }  | 
| enum | event_id_t {  EVENT_READY = 0 , EVENT_SCAN_DONE , EVENT_STA_START , EVENT_STA_STOP , EVENT_STA_CONNECTED , EVENT_STA_DISCONNECTED , EVENT_STA_AUTHMODE_CHANGE , EVENT_STA_GOT_IP , EVENT_STA_LOST_IP , EVENT_STA_WPS_ER_SUCCESS , EVENT_STA_WPS_ER_FAILED , EVENT_STA_WPS_ER_TIMEOUT , EVENT_STA_WPS_ER_PIN , EVENT_AP_START , EVENT_AP_STOP , EVENT_AP_STACONNECTED , EVENT_AP_STADISCONNECTED , EVENT_AP_PROBEREQRECVED , EVENT_MAX }  | 
| enum | auth_mode_t {  AUTH_OPEN = 0 , AUTH_WEP , AUTH_WPA_PSK , AUTH_WPA2_PSK , AUTH_WPA_WPA2_PSK , AUTH_WPA2_ENTERPRISE , AUTH_MAX }  | 
| enum | err_reason_t {  REASON_UNSPECIFIED = 1 , REASON_AUTH_EXPIRE = 2 , REASON_AUTH_LEAVE = 3 , REASON_ASSOC_EXPIRE = 4 , REASON_ASSOC_TOOMANY = 5 , REASON_NOT_AUTHED = 6 , REASON_NOT_ASSOCED = 7 , REASON_ASSOC_LEAVE = 8 , REASON_ASSOC_NOT_AUTHED = 9 , REASON_DISASSOC_PWRCAP_BAD = 10 , REASON_DISASSOC_SUPCHAN_BAD = 11 , REASON_IE_INVALID = 13 , REASON_MIC_FAILURE = 14 , REASON_4WAY_HANDSHAKE_TIMEOUT = 15 , REASON_GROUP_KEY_UPDATE_TIMEOUT = 16 , REASON_IE_IN_4WAY_DIFFERS = 17 , REASON_GROUP_CIPHER_INVALID = 18 , REASON_PAIRWISE_CIPHER_INVALID = 19 , REASON_AKMP_INVALID = 20 , REASON_UNSUPP_RSN_IE_VERSION = 21 , REASON_INVALID_RSN_IE_CAP = 22 , REASON_802_1X_AUTH_FAILED = 23 , REASON_CIPHER_SUITE_REJECTED = 24 , REASON_BEACON_TIMEOUT = 200 , REASON_NO_AP_FOUND = 201 , REASON_AUTH_FAIL = 202 , REASON_ASSOC_FAIL = 203 , REASON_HANDSHAKE_TIMEOUT = 204 }  | 
| enum | event_sta_wps_fail_reason_t { WPS_FAIL_REASON_NORMAL = 0 , WPS_FAIL_REASON_RECV_M2D , WPS_FAIL_REASON_MAX } | 
| typedef void(* | EventCb) (event_id_t event) | 
| typedef void(* | EventFullCb) (event_id_t event, void *info) | 
Public Member Functions | |
| virtual void | onEvent (EventCb cbEvent, event_id_t event=EVENT_MAX) | 
| virtual void | onEvent (EventFullCb cbEvent, event_id_t event=EVENT_MAX) | 
| virtual int32_t | channel (void)=0 | 
| virtual void | persistent (bool persistent) | 
| virtual bool | mode (mode_t)=0 | 
| virtual mode_t | getMode ()=0 | 
| virtual bool | enableSTA (bool enable) | 
| virtual bool | enableAP (bool enable) | 
| virtual void | _eventCallback (event_id_t event, void *info) | 
| virtual int | hostByName (const char *aHostname, IPAddress &aResult)=0 | 
| virtual status_t | begin (const char *ssid, const char *passphrase=NULL, int32_t channel=0, const uint8_t *bssid=NULL, bool connect=true)=0 | 
| virtual status_t | begin ()=0 | 
| virtual bool | config (IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1=(uint32_t) 0x00000000, IPAddress dns2=(uint32_t) 0x00000000)=0 | 
| virtual bool | reconnect ()=0 | 
| virtual bool | disconnect (bool wifioff=false)=0 | 
| virtual bool | isConnected () | 
| virtual bool | setAutoConnect (bool autoConnect)=0 | 
| virtual bool | getAutoConnect ()=0 | 
| bool | setAutoReconnect (bool autoReconnect) | 
| bool | getAutoReconnect () | 
| virtual uint8_t | waitForConnectResult () | 
| virtual IPAddress | localIP ()=0 | 
| virtual uint8_t * | macAddress (uint8_t *mac)=0 | 
| virtual IPAddress | subnetMask ()=0 | 
| virtual IPAddress | gatewayIP ()=0 | 
| virtual IPAddress | dnsIP (uint8_t dns_no=0)=0 | 
| virtual bool | enableIpV6 ()=0 | 
| virtual IPv6Address | localIPv6 ()=0 | 
| virtual const char * | getHostname ()=0 | 
| virtual bool | setHostname (const char *hostname)=0 | 
| status_t | status () | 
| virtual const char * | SSID () const =0 | 
| virtual const char * | psk () const =0 | 
| virtual const uint8_t * | BSSID ()=0 | 
| virtual int16_t | RSSI ()=0 | 
| void | _setStatus (status_t status) | 
| virtual int8_t | scanNetworks (bool async=false, bool show_hidden=false, bool passive=false, uint32_t max_ms_per_chan=300)=0 | 
| virtual int8_t | scanComplete () | 
| virtual void | scanDelete ()=0 | 
| virtual bool | getNetworkInfo (uint8_t i, const char **ssid, auth_mode_t *encryptionType, int16_t *RSSI, const uint8_t **BSSID, int32_t *channel)=0 | 
| const char * | SSID (uint8_t i) | 
| auth_mode_t | encryptionType (uint8_t i) | 
| int16_t | RSSI (uint8_t i) | 
| const uint8_t * | BSSID (uint8_t i) | 
| int32_t | channel (uint8_t i) | 
Protected Member Functions | |
| virtual void * | _getScanInfoByIndex (uint8_t i)=0 | 
| virtual void | _scanDone ()=0 | 
Protected Attributes | |
| bool | _persistent | 
| mode_t | _forceSleepLastMode | 
| status_t | _status = STATUS_STOP | 
| bool | _autoReconnect = true | 
| bool | _useStaticIp = false | 
| bool | _scanAsync = false | 
| bool | _scanStarted = false | 
| bool | _scanComplete = false | 
| uint16_t | _scanCount = 0 | 
| void * | _scanResult = NULL | 
| bool | _dns_busy = false | 
WiFi 장치를 제어하기 위한 클래스
| enum WiFiClass::mode_t | 
      
  | 
  virtual | 
callback for WiFi events
| arg | 
      
  | 
  pure virtual | 
Start Wifi connection if passphrase is set the most secure supported mode will be automatically selected
| ssid | const char* Pointer to the SSID string. | 
| passphrase | const char * Optional. Passphrase. Valid characters in a passphrase must be between ASCII 32-126 (decimal). | 
| bssid | uint8_t[6] Optional. BSSID / MAC of AP | 
| channel | Optional. Channel of AP | 
| connect | Optional. call connect | 
      
  | 
  pure virtual | 
Start Wifi connection if passphrase is set the most secure supported mode will be automatically selected
| ssid | const char* Pointer to the SSID string. | 
| passphrase | const char * Optional. Passphrase. Valid characters in a passphrase must be between ASCII 32-126 (decimal). | 
| bssid | uint8_t[6] Optional. BSSID / MAC of AP | 
| channel | Optional. Channel of AP | 
| connect | Optional. call connect | 
      
  | 
  pure virtual | 
Return the current bssid / mac associated with the network if configured
| const uint8_t* WiFiClass::BSSID | ( | uint8_t | i | ) | 
return MAC / BSSID of scanned wifi
| i | specify from which network item index want to get the information | 
| int32_t WiFiClass::channel | ( | uint8_t | i | ) | 
Return the primary channel number of the networks discovered during the scanNetworks
| i | specify from which network item want to get the information | 
      
  | 
  pure virtual | 
Return the current channel associated with the network
      
  | 
  pure virtual | 
Change IP configuration settings disabling the dhcp client
| local_ip | Static ip configuration | 
| gateway | Static gateway configuration | 
| subnet | Static Subnet mask | 
| dns1 | Static DNS server 1 | 
| dns2 | Static DNS server 2 | 
      
  | 
  pure virtual | 
Disconnect from the network
| wifioff | 
      
  | 
  pure virtual | 
      
  | 
  virtual | 
control AP mode
| enable | bool | 
      
  | 
  pure virtual | 
Enable IPv6 on the station interface.
      
  | 
  virtual | 
control STA mode
| enable | bool | 
| auth_mode_t WiFiClass::encryptionType | ( | uint8_t | i | ) | 
Return the encryption type of the networks discovered during the scanNetworks
| i | specify from which network item index want to get the information | 
      
  | 
  pure virtual | 
Get the gateway ip address.
      
  | 
  pure virtual | 
Checks if the WiFi station mode will connect to AP automatically or not when it is powered on.
      
  | 
  pure virtual | 
Get the station interface Host name.
      
  | 
  pure virtual | 
get WiFi mode
      
  | 
  pure virtual | 
loads all infos from a scanned wifi in to the ptr parameters
| i | uint8_t | 
| ssid | const char** | 
| encryptionType | uint8_t * | 
| RSSI | int32_t * | 
| BSSID | uint8_t ** | 
| channel | int32_t * | 
      
  | 
  pure virtual | 
Resolve the given hostname to an IP address.
| aHostname | Name to be resolved | 
| aResult | IPAddress structure to store the returned IP address | 
      
  | 
  virtual | 
is STA interface connected?
      
  | 
  pure virtual | 
Get the station interface IP address.
      
  | 
  pure virtual | 
Get the station interface IPv6 address.
      
  | 
  pure virtual | 
Get the station interface MAC address.
| mac | pointer to uint8_t array with length WL_MAC_ADDR_LENGTH | 
      
  | 
  pure virtual | 
set new mode
| m | WiFiMode_t | 
      
  | 
  virtual | 
set callback function
| cbEvent | WiFiEventCb | 
| event | optional filter (WIFI_EVENT_MAX is all events) | 
      
  | 
  virtual | 
set callback function
| cbEvent | WiFiEventCb | 
| event | optional filter (WIFI_EVENT_MAX is all events) | 
      
  | 
  virtual | 
store WiFi config in SDK flash area
| persistent | 
      
  | 
  pure virtual | 
Return the current pre shared key associated with the network
      
  | 
  pure virtual | 
will force a disconnect an then start reconnecting to AP
      
  | 
  pure virtual | 
Return the current network RSSI.
| int16_t WiFiClass::RSSI | ( | uint8_t | i | ) | 
Return the RSSI of the networks discovered during the scanNetworks
| i | specify from which network item index want to get the information | 
      
  | 
  virtual | 
called to get the scan state in Async mode
      
  | 
  pure virtual | 
delete last scan result from RAM
      
  | 
  pure virtual | 
Start scan WiFi networks available
| async | run in async mode | 
| show_hidden | show hidden networks | 
      
  | 
  pure virtual | 
Setting the WiFi station to connect to the AP (which is recorded) automatically or not when powered on. Enable auto-connect by default.
| autoConnect | bool | 
      
  | 
  pure virtual | 
Set the station interface Host name.
| hostname | pointer to const string | 
      
  | 
  pure virtual | 
Return the current SSID associated with the network
| const char* WiFiClass::SSID | ( | uint8_t | i | ) | 
Return the SSID discovered during the network scan.
| i | specify from which network item want to get the information | 
| status_t WiFiClass::status | ( | ) | 
Return Connection status.
      
  | 
  pure virtual | 
Get the interface subnet mask address.
      
  | 
  virtual | 
Wait for WiFi connection to reach a result returns the status reached or disconnect if STA is off