WPS Password
Posted:
Wed Apr 24, 2019 8:04 am
by lucasromeiro
Hello!
I am developing a system that needs to connect using WPS.
(Yes, I know WPS is not necessarily secure. But that's not the point.)
I've read that ESP8266 can do that, I've already done some testing.
But I could not access the Password so I can save.
I only had access to the SSID.
When I am connected by WPS and request the password, it always returns blank.
Can someone tell me how I can access the password?
I need to save to recover at certain times.
Thank you everyone's attention.
Re: WPS Password
Posted:
Thu Apr 25, 2019 8:01 am
by lucasromeiro
it do not work...
#include <ESP8266WiFi.h>
WiFi.mode(WIFI_STA);
WiFi.beginWPSConfig();
WiFi.SSID().c_str()
WiFi.psk().c_str()
Re: WPS Password
Posted:
Thu Apr 25, 2019 12:35 pm
by jankop
I use WPS quite often and absolutely without problems
Code: Select allvoid setup() {
Serial.begin(9600);
WiFi.begin();
...
}
void loop() {
...
}
/* Service Wi-Fi Protected Setup with Push Button Configuration */
void StartWpsWaiting(void) {
WiFi.persistent(false);
WiFi.mode(WIFI_STA);
bool RafHo = false;
String HowDelka = "";
/* Wait for access point WPS */
do {
RafHo = WiFi.beginWPSConfig();
HowDelka = WiFi.SSID();
}
while (RafHo == false || HowDelka.length() == 0);
//Serial.println (WiFi.SSID());
//Serial.println (WiFi.psk());
delay(500);
ESP.restart();
}
http://esp8266.fancon.cz/esp8266-web-barometer-arduino/esp8266-bmp280-barometer-thermometer.html
Re: WPS Password
Posted:
Thu Apr 25, 2019 12:51 pm
by lucasromeiro
jankop wrote:I use WPS quite often and absolutely without problems
Code: Select allvoid setup() {
Serial.begin(9600);
WiFi.begin();
...
}
void loop() {
...
}
/* Service Wi-Fi Protected Setup with Push Button Configuration */
void StartWpsWaiting(void) {
WiFi.persistent(false);
WiFi.mode(WIFI_STA);
bool RafHo = false;
String HowDelka = "";
/* Wait for access point WPS */
do {
RafHo = WiFi.beginWPSConfig();
HowDelka = WiFi.SSID();
}
while (RafHo == false || HowDelka.length() == 0);
//Serial.println (WiFi.SSID());
//Serial.println (WiFi.psk());
delay(500);
ESP.restart();
}
http://esp8266.fancon.cz/esp8266-web-barometer-arduino/esp8266-bmp280-barometer-thermometer.html
Cool, I'll take a look!
Do these lines work?
For me the password command always returns blank.
Serial.println (WiFi.psk());