I've got this curious case which I'm trying to make sense of. I use ESP8266 boards in a particular project of mine. There are smaller boards and larger boards, with other modules on them, purchased from different vendors. I don't think this plays much of a role, but fyi.
Now, the project itself involves the usage of ESP's softAP capabilities. A PC app of mine is built to connect and interact with the ESP when it is in softAP mode. I use the ESP8266 Arduino core on both board types, and I assume that the underlying Espressif SDK used is also the same. However, when I launch softAP on one board type, it uses AES encryption, whereas the other board type uses TKIP encryption. I know this because I have connected to both via Windows and then taken a peek at their Wi-Fi profiles. Sure enough, the ESP chip on one uses AES, while the other uses TKIP.
What I'm trying to determine is:
What options are there to change the behavior of the TKIP boards and force them to use AES when setting up a soft AP? Any suggestions or pointers (pun not intended) would be greatly appreciated!
Edit 1:
A day of tinkering later has allowed me to narrow the problem down. I am now using only one board. However, compiling and uploading different projects with identical configurations and Arduino core still causes different encryption types to be used by the softAP. Briefly, there are 2 projects:
#include <Arduino.h>
#include <ESP8266WiFi.h>
void setup()
{
unsigned long softApFlag = 0;
IPAddress localIP(0x0201A8C0), gatewayIP(0x0101A8C0), subnet(0x00FFFFFF);
Serial.begin(115200);
delay(10000);
Serial.printf("\nBEGIN***************");
if ((WiFi.softAPConfig(localIP, gatewayIP, subnet)) == true) {
softApFlag = 1;
if ((WiFi.softAP((char*)"Big_SoftAP_Test", (char*)"1234567890")) == true)
{
softApFlag = 2;
}
}
Mloop:
printf("softAP flag = %d\x0d\x0a", softApFlag);
delay(3000);
goto Mloop;
return;
}
void loop(){
}
3 scenarios have been observed:
It really is a messy case and my descriptions probably make little sense, but that's the long and the short of it.
Edit 2:
The problem still persists, but a couple of additional observations: on rare occasions, I do manage to connect to the softAP, if the Event Viewer is to be trusted. This only lasts a few seconds before the PC automatically disconnects.
Also, for some reason, my Android smartphone is much more reliable at locating the network and staying connected to it...
So, after a short while, it seems like the most satisfying conclusion that I could come up with is that there is simply something faulty about the board in question and attempts at pinpointing what it is were not really successful. After acquiring exactly the same board from a different vendor (which was also of visibly better quality), all of my tests/software worked smoothly from the get-go, and none of the issues I described above ever appeared, so it seems like there was something wrong with the hardware of the original board.