1# WPA2 Enterprise Example 2 3This example shows how ESP32 connects to AP with Wi-Fi enterprise encryption using the EAP-FAST method. The example does the following steps: 4 51. Install CA certificate which is optional. 62. Set user name and password and identity. 73. Set the PAC file which may be empty. 84. Enable wpa2 enterprise. 95. Connect to AP. 10 11*Note:* 1. EAP-FAST is not supported with `CONFIG_WPA_MBEDTLS_CRYPTO` and so is disabled by default. 12 2. Setting the config `fast_provisioning` to methods 0 and 1 do not support saving the PAC credentials in case of a restart or loss of power. 13 3. The certificates present in the `examples/wifi/wifi_eap_fast/main` folder contain server certificates which have the corresponding CA as well. These can be used for server validation which is opptional. 14 4. The expiration date of these certificates is 2027/06/05. 15 16### Configuration 17 18``` 19idf.py menuconfig 20``` 21* Set SSID of Access Point to connect in Example Configuration. 22* Enter EAP-ID. 23* Enter Username and Password. 24* Enable or disable Validate Server option. 25 26### Build and Flash the project. 27 28``` 29idf.py -p PORT flash monitor 30``` 31 32### Example output 33 34Here is an example of wpa2 enterprise (FAST method) console output. 35``` 36I (690) example: Setting WiFi configuration SSID wpa2_test... 37I (690) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07 38I (800) wifi:mode : sta (24:6f:28:80:41:78) 39I (800) wifi:enable tsf 40I (1410) wifi:new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1 41I (2410) wifi:state: init -> auth (b0) 42I (2420) wifi:state: auth -> assoc (0) 43E (2420) wifi:Association refused temporarily, comeback time 3072 mSec 44I (5500) wifi:state: assoc -> assoc (0) 45I (5500) wifi:state: assoc -> init (6c0) 46I (5500) wifi:new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1 47I (7560) wifi:new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1 48I (7560) wifi:state: init -> auth (b0) 49I (7560) wifi:state: auth -> assoc (0) 50I (7570) wifi:state: assoc -> run (10) 51I (7770) wifi:connected with wpa2_test, aid = 1, channel 6, BW20, bssid = 24:4b:fe:ab:be:99 52I (7770) wifi:security: WPA2-ENT, phy: bg, rssi: -80 53I (7780) wifi:pm start, type: 1 54 55I (7800) example: ~~~~~~~~~~~ 56I (7800) example: IP:0.0.0.0 57I (7800) example: MASK:0.0.0.0 58I (7800) example: GW:0.0.0.0 59I (7800) example: ~~~~~~~~~~~ 60I (7870) wifi:AP's beacon interval = 102400 us, DTIM period = 1 61I (8580) esp_netif_handlers: sta ip: 192.168.5.3, mask: 255.255.255.0, gw: 192.168.5.1 62I (12800) example: ~~~~~~~~~~~ 63I (12800) example: IP:192.168.5.3 64I (12800) example: MASK:255.255.255.0 65I (12800) example: GW:192.168.5.1 66I (12800) example: ~~~~~~~~~~~ 67``` 68