Skip to content

WPA2 Enterprise PEAP-MSCHAPv2 not connect with static IP #1489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
andrefilipin opened this issue Jun 12, 2018 · 5 comments
Closed

WPA2 Enterprise PEAP-MSCHAPv2 not connect with static IP #1489

andrefilipin opened this issue Jun 12, 2018 · 5 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@andrefilipin
Copy link

Hardware:

Board: ESP32 Dev Module
Core Installation/update date: 20180612
IDE name: Arduino IDE
Flash Frequency: 80Mhz
Upload Speed: 921600

Description:

WPA2 Enterprise PEAP-MSCHAPv2 not connect with static IP(my AP doesn't have DHCP enabled), I Have other AP with same auth type and DHCP enabled, and it works normaly, please help

Sketch:

#include "esp_wpa2.h"
#include <WiFi.h>

const char *ssid = "***";
#define EAP_ID "user"
#define EAP_USERNAME "user"
#define EAP_PASSWORD "password"

void setup() {
    Serial.begin(115200);
    delay(10);

    
    IPAddress ip(10,21,123,142);   
    IPAddress gateway(10,21,122,1);   
    IPAddress subnet(255,255,254,0);
    IPAddress dns(10,21,71,19);
    
    WiFi.config(ip, gateway, subnet, dns);

    Serial.print("Connecting to ");
    Serial.println(ssid);

    WiFi.disconnect(true);

    esp_wifi_sta_wpa2_ent_set_identity((uint8_t *)EAP_ID, strlen(EAP_ID));
    esp_wifi_sta_wpa2_ent_set_username((uint8_t *)EAP_USERNAME, strlen(EAP_USERNAME));
    esp_wifi_sta_wpa2_ent_set_password((uint8_t *)EAP_PASSWORD, strlen(EAP_PASSWORD));
    esp_wpa2_config_t config = WPA2_CONFIG_INIT_DEFAULT();
    esp_wifi_sta_wpa2_ent_enable(&config);
    
    WiFi.begin(ssid);    

    while (WiFi.status() != WL_CONNECTED) {
        delay(2000);
        Serial.print(".");        
    }

    Serial.println("");
    Serial.println("WiFi connected");
    Serial.println("IP address: ");
    Serial.println(WiFi.localIP());
}

void loop() {
    // Your code here.
}

Debug Messages:

rst:0x1 (POWERON_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:956
load:0x40078000,len:0
load:0x40078000,len:13256
entry 0x40078a90
[D][WiFiGeneric.cpp:304] _eventCallback(): Event: 2 - STA_START

Connecting to ****
.........................

nothing happen more

@lbernstone
Copy link
Contributor

Take a look at #1262

@andrefilipin
Copy link
Author

andrefilipin commented Jun 13, 2018

@lbernstone I removed the comment referenced in #1262 and doesn't work, results:
Connecting to **** .........................

@stale
Copy link

stale bot commented Aug 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Aug 1, 2019
@stale
Copy link

stale bot commented Aug 15, 2019

This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Aug 15, 2019
@bkrajendra
Copy link

@andrefilipin any update on this.
Im also working on ESP WPA2-Enterprise connectivity but no success.
I tried a lot with ESP-8266 also but getting error for static IP. Not sure about DHCP.
tzapu/WiFiManager#309 (comment)_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

3 participants