0

I have an ESP12F WiFi module and I need it to work in access point mode. I burned the example code to it using Arduino IDE and it worked at first. I could connect to the WiFi provided by it using my laptop. But when I removed it from power and connected it again it was not working. I couldn't even see its hotspot in my laptop WiFi. What happened to it? Can you please help trouble shoot it?

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#ifndef APSSID
#define APSSID "ESPap"
#define APPSK  "thereisnospoon"
#endif
const char *ssid = "ESPap";
const char *password = "thereisnospoon";

ESP8266WebServer server(80);


void handleRoot() {
server.send(200, "text/html", "<h1>You are connected</h1>");
}

void setup() {
delay(1000);
Serial.begin(115200);
Serial.println();
Serial.print("Configuring access point...");

WiFi.softAP(ssid, password);

IPAddress myIP = WiFi.softAPIP();
Serial.print("AP IP address: ");
Serial.println(myIP);
server.on("/", handleRoot);
server.begin();
Serial.println("HTTP server started");
}

void loop() {
server.handleClient();
}
  • it broke and you've got all the pieces ... try adding some debugging Serial.print statements in your code ... see if/where it breaks – Jaromanda X Jan 10 at 7:09
  • Post your code. – leoc7 Jan 10 at 8:18
  • i tried. I got connected to it and again I lost connection. this happened two or three times. its getting connected, then it loses connection and again it gets connected. – Jackie Jan 10 at 11:51
  • wrong RF parameters. let it on so it can calibrate. if it doesn't help, clear the flash with esptool and then upload some simple STA sketch and let it for some minutes to calibrate RF – Juraj Jan 10 at 13:18
  • Can you please explain what are RF parameters? – Jackie Jan 11 at 4:44

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.