RTOS SDK SOFTAP password changed after Android 7 connect
RTOS SDK SOFTAP password changed after Android 7 connect
Postby Chris_123 » Mon Jun 26, 2017 11:16 pm
Hello,
i currently observed a strange behavior i don't understand.
I'm using the ESP8266 wifi in "SOFTAP_MODE". It works fine with a lot of different smartphones (Andorid different versions & iOS).
But when I try connecting with an Android 7 Smartphone the ESP8266 changes the wifi password to "ction: Keep-".
Has anybody observed similar behavior?
Ist there a known problem? (I searched but did not find anything)
Does anybody know where to get support (also paid)?
Additional details:
-Used official RTOS SDK 1.4 & 1.5 (same behavior)
-Code snipped for setting the Wifi password:
#define WiFi_AP_SSID "Test_Wifi"
#define WiFi_AP_PASSWORD "12345678"
....
....
....
void ICACHE_FLASH_ATTR setDefaultPassword(struct softap_config *config){
sprintf(config->ssid, WiFi_AP_SSID);
sprintf(config->password,WiFi_AP_PASSWORD);
config->authmode = AUTH_WPA_WPA2_PSK;
config->ssid_len = 0;
config->max_connection = 1;
wifi_softap_set_config(config);
free(config);
printf("Wifi password was set to DEFAULT!!!\n");
}
....
....
....
void user_init(void)
{
....
....
....
wifi_set_opmode(SOFTAP_MODE);
struct softap_config *config = (struct softap_config *)zalloc(sizeof(struct softap_config));
wifi_softap_get_config(config);
....
....
....
//only called after first startup after flashing
setDefaultPassword(config);
....
....
....
}
Hope for your support!
Best Regards
i currently observed a strange behavior i don't understand.
I'm using the ESP8266 wifi in "SOFTAP_MODE". It works fine with a lot of different smartphones (Andorid different versions & iOS).
But when I try connecting with an Android 7 Smartphone the ESP8266 changes the wifi password to "ction: Keep-".
Has anybody observed similar behavior?
Ist there a known problem? (I searched but did not find anything)
Does anybody know where to get support (also paid)?
Additional details:
-Used official RTOS SDK 1.4 & 1.5 (same behavior)
-Code snipped for setting the Wifi password:
#define WiFi_AP_SSID "Test_Wifi"
#define WiFi_AP_PASSWORD "12345678"
....
....
....
void ICACHE_FLASH_ATTR setDefaultPassword(struct softap_config *config){
sprintf(config->ssid, WiFi_AP_SSID);
sprintf(config->password,WiFi_AP_PASSWORD);
config->authmode = AUTH_WPA_WPA2_PSK;
config->ssid_len = 0;
config->max_connection = 1;
wifi_softap_set_config(config);
free(config);
printf("Wifi password was set to DEFAULT!!!\n");
}
....
....
....
void user_init(void)
{
....
....
....
wifi_set_opmode(SOFTAP_MODE);
struct softap_config *config = (struct softap_config *)zalloc(sizeof(struct softap_config));
wifi_softap_get_config(config);
....
....
....
//only called after first startup after flashing
setDefaultPassword(config);
....
....
....
}
Hope for your support!
Best Regards
Re: RTOS SDK SOFTAP password changed after Android 7 connect
Postby Her Mary » Wed Jun 28, 2017 2:58 pm
"ction: Keep-" seems like a part of the TCP packets "Connection: Keep-alive".
Will your application write anything into flash?
If power off and power on to restart the ESP8266 board, what the password will be?
Will your application write anything into flash?
If power off and power on to restart the ESP8266 board, what the password will be?
Re: RTOS SDK SOFTAP password changed after Android 7 connect
Postby Chris_123 » Thu Jun 29, 2017 1:47 am
Thank you for your fast post.
After cold start of the ESP8266 the password is still “ction: Keep-“.
I do not write anything to flash directly. But I change the password if I receive an “p” character via socket.
In this case i use the next 12 character as password. This password is set via wifi_softap_set_config();
But when listening via socket i should not receive a "Connection: Keep-alive" as string?
I use the following functions to listen to the connection:
...
struct sockaddr_in clientAddress;
socklen_t clientAddressLength = sizeof(clientAddress);
...
int clientSocket = accept(serverSocket, (struct sockaddr *)&clientAddress, &clientAddressLength);
...
//set socket to nonblocking
fcntl(clientSocket, F_SETFL, O_NONBLOCK);
...
I Read from this socket via:
...
*recevedBytesLength = read(clientSocket , &recv_buf, 16);
...
After cold start of the ESP8266 the password is still “ction: Keep-“.
I do not write anything to flash directly. But I change the password if I receive an “p” character via socket.
In this case i use the next 12 character as password. This password is set via wifi_softap_set_config();
But when listening via socket i should not receive a "Connection: Keep-alive" as string?
I use the following functions to listen to the connection:
...
struct sockaddr_in clientAddress;
socklen_t clientAddressLength = sizeof(clientAddress);
...
int clientSocket = accept(serverSocket, (struct sockaddr *)&clientAddress, &clientAddressLength);
...
//set socket to nonblocking
fcntl(clientSocket, F_SETFL, O_NONBLOCK);
...
I Read from this socket via:
...
*recevedBytesLength = read(clientSocket , &recv_buf, 16);
...
Re: RTOS SDK SOFTAP password changed after Android 7 connect
Postby Her Mary » Thu Jun 29, 2017 10:30 am
"Connection: Keep-alive" is a part of the HTTP header. Of course you will get it from the socket.
It seems to be your application that set this wrong password.
You should add some log to check that part you mentioned above.
It seems to be your application that set this wrong password.
You should add some log to check that part you mentioned above.
But I change the password if I receive an “p” character via socket.
In this case i use the next 12 character as password. This password is set via wifi_softap_set_config();
Who is online
Users browsing this forum: No registered users and 301 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.