ESP8266 12E: how to setting WPA2 AES and 802.11n in AP mode? #8286
Unanswered
nguyenlequangthai2021
asked this question in
Q&A
Replies: 1 comment 1 reply
-
please help me, thank you. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello friends.
If this topic has been covered and resolved before, then I apologize.
Since I have read many threads and tried to find a solution but haven't found it yet, so I have to create this thread.
In Windows and iOS 14, WPA2 TKIP mode is warned of risks. So I want to install WPA2 AES or WPA3 mode ut i didn't find the solution.
And, I want to change Radio Type from 802.11g to 802.11n.
(I have used the code below but still not working. )
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
#include <ESP8266HTTPUpdateServer.h>
#include <EEPROM.h>
const char* ssid = "HIEUVAITHANH";
const char* password = "123456789";
const char* host = "WifiReperater2";
const char* updatePath = "/update";
const char* updateUsername = "admin";
const char* updatePassword = "admin";
// Your ESP Wifi
const char* ssid_soft_ap = "SMARTSWITCH 2021 3CH";
const char* password_soft_ap = "switch2021"; // My preference is same as my home ssid password.
int Wifi_SoftAP_Channel = 11;
// ESP 8266 Local Network Configuration
IPAddress local_IP(192,168,4,1);
IPAddress gateway(192,168,4,1);
IPAddress subnet(255,255,255,0);
ESP8266WebServer webServer(80);
<title>SMARTSWITCH</title> <style> body{ text-align: center; } </style>ESP8266HTTPUpdateServer httpUpdater;
//-----------------------------------------//
const char MainPage[] PROGMEM = R"=====(
EEPROM.begin(512);
// write a 0 to all 512 bytes of the EEPROM
for (int i = 0; i < 512; i++) {
EEPROM.write(i, 0);
}
// turn the LED on when we're done
pinMode(13, OUTPUT);
digitalWrite(13, HIGH);
EEPROM.end();
WiFi.mode(WIFI_AP_STA);
WiFi.begin(ssid, password);
while(WiFi.waitForConnectResult() != WL_CONNECTED){
WiFi.begin(ssid, password);
Serial.println("WiFi failed, retrying.");
}
Serial.println(" kết nối internet voi");
Serial.println(ssid);
Serial.print("PASS ");
Serial.println(password);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
WiFi.softAPConfig(local_IP, gateway, subnet);
WiFi.softAP(ssid_soft_ap, password_soft_ap, Wifi_SoftAP_Channel);
MDNS.begin(host);
MDNS.addService("http", "tcp", 80);
httpUpdater.setup(&webServer, updatePath, updateUsername, updatePassword);
webServer.on("/",[]{
String s = MainPage;
webServer.send(200,"text/html",s);
});
webServer.begin();
Serial.println("Web Server is started!");
//=========Chương trình Chính=====//
pinMode(D4,OUTPUT);
//============End=================//
}
void loop(void){
MDNS.update();
webServer.handleClient();
//====Chương trình Chính==========//
digitalWrite(D4,!digitalRead(D4));
delay(500);
//=========End====================//
}
Therefore, I hope you can help me fix the above 2 problems.
I sincerely thank you.
Beta Was this translation helpful? Give feedback.
All reactions