{"action":"created","issue":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/2595","repository_url":"https://api.github.com/repos/esp8266/Arduino","labels_url":"https://api.github.com/repos/esp8266/Arduino/issues/2595/labels{/name}","comments_url":"https://api.github.com/repos/esp8266/Arduino/issues/2595/comments","events_url":"https://api.github.com/repos/esp8266/Arduino/issues/2595/events","html_url":"https://github.com/esp8266/Arduino/issues/2595","id":182254281,"number":2595,"title":"WPA2 Enterprise authorization fail","user":{"login":"Gidrix","id":11461523,"avatar_url":"https://avatars.githubusercontent.com/u/11461523?v=3","gravatar_id":"","url":"https://api.github.com/users/Gidrix","html_url":"https://github.com/Gidrix","followers_url":"https://api.github.com/users/Gidrix/followers","following_url":"https://api.github.com/users/Gidrix/following{/other_user}","gists_url":"https://api.github.com/users/Gidrix/gists{/gist_id}","starred_url":"https://api.github.com/users/Gidrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gidrix/subscriptions","organizations_url":"https://api.github.com/users/Gidrix/orgs","repos_url":"https://api.github.com/users/Gidrix/repos","events_url":"https://api.github.com/users/Gidrix/events{/privacy}","received_events_url":"https://api.github.com/users/Gidrix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-11T12:46:20Z","updated_at":"2016-11-20T18:43:57Z","closed_at":null,"body":"### Basic Infos\n#### Hardware\n\nHardware:           ESP-12\nCore Version:       using git branch update_sdk_2.0.0\n### Description\n\nI have AP with configured PEAP WPA2 Enterprise, it only asks log/pass, certificates not required. Authorization work properly, I can connect with my android phone.\nWhen esp tries to connect to AP, in AP log esp status is only \"associated\", which means esp actually connected to AP. BUT esp never get an ip (status will be \"authorized\"). Basically wpa2 enterprise part of code dont do anything.\nSame code in NONOS SDK  2.0.0 works fine, but I already have pretty big project on arduino, so it would be hard to transfer to sdk.\n### Settings in IDE\n\nModule:             Generic ESP8266 Module\nFlash Size:         4MB\nCPU Frequency:      80Mhz\nFlash Mode:         qio\nFlash Frequency:    40Mhz\nUpload Using:        SERIAL\nReset Method:       ck\n### Sketch\n\n``` cpp\n\n#include <Arduino.h>\n#include <ESP8266WiFi.h>\n#ifdef ESP8266\nextern \"C\" {\n#include \"user_interface.h\"\n#include \"wpa2_enterprise.h\"\n}\n#endif\n\nstatic u8 ent_username[] = \"test\";\nstatic u8 ent_password[] = \"test\";\n\nvoid setup(){\n  char a[100];\n  ip_info info;\n  wifi_get_ip_info(0, &info);\n\n  Serial.begin(115200);\n\n  wifi_station_disconnect();\n  wifi_set_opmode(STATION_MODE);\n\n  char ssid[32] = \"my_enterprise_ap\";\n  char password[64] = {0x00};\n  struct station_config stationConf;\n  stationConf.bssid_set = 0;  //need not check MAC address of AP\n  memcpy(&stationConf.ssid, ssid, 32);\n  memcpy(&stationConf.password, password, 64);\n\n  if(!wifi_station_set_config(&stationConf)){\n    Serial.print(\"\\r\\nset config fail\\r\\n\");\n  }\n\n  // switch to WPA2 Enterprise \n  wifi_station_set_wpa2_enterprise_auth(1); \n\n  if(wifi_station_set_enterprise_username (ent_username, sizeof(ent_username))){\n    Serial.print(\"\\r\\nusername set fail\\r\\n\");\n  }\n  if(wifi_station_set_enterprise_password (ent_password, sizeof(ent_password))){\n    Serial.print(\"\\r\\npassword set fail\\r\\n\");\n  }\n\n  if(!wifi_station_connect()){\n    Serial.print(\"\\r\\nconnect fail\\r\\n\");\n  }\n\n  Serial.print(\"\\r\\ntrying to connect...\");\n\n  while(info.ip.addr == 0){\n    ESP.wdtFeed();\n    Serial.print(\".\");\n    delay(1000);\n    wifi_get_ip_info(0, &info);\n  }\n\n  sprintf(a, \"%\"PRIu32,info.ip.addr);\n  Serial.print(\"\\r\\nip addr: \");\n  Serial.print(a);\n  Serial.print(\"\\r\\n\");\n}\n\n\nvoid loop()\n{ \n}\n```\n"},"comment":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/comments/261796387","html_url":"https://github.com/esp8266/Arduino/issues/2595#issuecomment-261796387","issue_url":"https://api.github.com/repos/esp8266/Arduino/issues/2595","id":261796387,"user":{"login":"rbmb","id":23515170,"avatar_url":"https://avatars.githubusercontent.com/u/23515170?v=3","gravatar_id":"","url":"https://api.github.com/users/rbmb","html_url":"https://github.com/rbmb","followers_url":"https://api.github.com/users/rbmb/followers","following_url":"https://api.github.com/users/rbmb/following{/other_user}","gists_url":"https://api.github.com/users/rbmb/gists{/gist_id}","starred_url":"https://api.github.com/users/rbmb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbmb/subscriptions","organizations_url":"https://api.github.com/users/rbmb/orgs","repos_url":"https://api.github.com/users/rbmb/repos","events_url":"https://api.github.com/users/rbmb/events{/privacy}","received_events_url":"https://api.github.com/users/rbmb/received_events","type":"User","site_admin":false},"created_at":"2016-11-20T18:43:57Z","updated_at":"2016-11-20T18:43:57Z","body":"The file libwpa2.a is exactly the same, \r\nthe header file wpa2_entreprise.h is also the same except the comments at the beginning \r\nbetween Arduino and NONOS SDK. \r\n\r\nHow can we progress in this issue ? Where should we look ?\r\nCan it be the linking order in platform.txt (compiler.c.elf.libs)?"}}
{"actor":{"display_login":"rbmb"}}