SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By idir930
#197225
Dear guys,
I have an ESP8266 that is powered by an STM32 ( it provides 3.3v power supply). I load a sketch for creating a soft AP using the Arduino IDE.
I check with my phone if the Wifi AP is created and I find it, a few seconds later it disappears, and then it keeps coming on and off.
I used a scope to check if there are any sudden voltage drops, but none are detected, I used another ESP8266 module and still, it gives the same outcome.
The attached are the scope signal + a WiFi monitor app to show the signal strength ( Normally it should be continuous).
In case that The issue is with the code, here it is:
Code: Select all
#include <ESP8266WiFi.h>

IPAddress local_IP(192,168,4,22);
IPAddress gateway(192,168,4,9);
IPAddress subnet(255,255,255,0);

void setup()
{
  Serial.begin(115200);
  WiFi.softAPConfig(local_IP, gateway, subnet);
  WiFi.softAP("MT-SERVER_STM32", "AB000000", 6, false);

}

void loop() {}
Thank you guys!
You do not have the required permissions to view the files attached to this post.
By paulvha
#197226
Maybe that is because you don't have gateway connection on the address 192.168.4.9 and your Wifi- monitor tries to connect to Internet over this gateway address, which is of course failing and maybe causing a reset. Make IP and gateway address the same.

Start even simpler and take it from there : Do NOT setup a static addresses at all. Just do the WiFi.softAP("MT-SERVER_STM32") call to create an open network and check your address with
Serial.print("Soft-AP IP address = ");
Serial.println(WiFi.softAPIP());

Next to that you could include in the loop to see how many devices are connected:
Serial.print("number connected = ");
Serial.println(WiFi.softAPgetStationNum());
delay(3000);

maybe it works better and once it does, you can take it from there..