WiFiScanClass::encryptionType()

名称

WiFiScanClass::encryptionType()

説明

指定したネットワークの暗号化方式を取得する。

書式

#include <WiFi.h>

wifi_auth_mode_t WiFiScanClass::encryptionType(uint8_t i);

引数

i WiFi.scanNetworks()で取得したネットワーク番号。

戻り値

指定したネットワークの暗号化方式。

返却されるのは、以下のenum型。

typedef enum {
    WIFI_AUTH_OPEN = 0,         /**< authenticate mode : open */
    WIFI_AUTH_WEP,              /**< authenticate mode : WEP */
    WIFI_AUTH_WPA_PSK,          /**< authenticate mode : WPA_PSK */
    WIFI_AUTH_WPA2_PSK,         /**< authenticate mode : WPA2_PSK */
    WIFI_AUTH_WPA_WPA2_PSK,     /**< authenticate mode : WPA_WPA2_PSK */
    WIFI_AUTH_WPA2_ENTERPRISE,  /**< authenticate mode : WPA2_ENTERPRISE */
    WIFI_AUTH_MAX
} wifi_auth_mode_t;

注意

WiFiというWiFiClassのオブジェクトが事前に定義されており、このオブジェクトを利用して操作する。

WiFiClassは、WiFiGenericClass、WiFiSTAClass、WiFiScanClass、WiFiAPClassWiFiを継承したクラスである。

使用例

バージョン

Hardware:ESP-WROOM-32
Software:Arduino core for the ESP32 2.0.4

最終更新日

September 4, 2022

inserted by FC2 system