-->
Page 1 of 1

softAP disappears

PostPosted: Wed Nov 08, 2017 12:41 am
by Amin_Abdiyan
Hardware

Hardware: ESP-12f
Core Version: 2.3.0

Description

ESP8266 access point disappears after a while. Can I check that access point exists in loop? I use WiFi.getMode() ,WiFi.softAPIP() but not changed after disappearing AP.

Settings in IDE

Module: Generic ESP8266 Module
Flash Size: 1MB
CPU Frequency: 80Mhz //I also checked 160Mhz
Flash Mode: qio //I also checked dio
Flash Frequency: 80Mhz
Upload Using: SERIAL
Reset Method: ck

I choose different IDE settings(Node mcu,Adafruit Huzzah ESP8266) but problem persist.

Sketch(summary)

#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <FS.h>
#include "EEPROM.h"
#include "_74HC595.h"
#include "MD5.h"
#include "RemoteReceiver2.h"
#include <ESP8266mDNS.h> //I don't use this library in AP mode
extern "C" {
#include "user_interface.h"
}
ESP8266WebServer* server;
void setup() {
...
IPAddress apIP(192, 168, 3, 1);
WiFi.mode(WIFI_AP);
WiFi.persistent(true);
WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0));
WiFi.softAP(SSIDName,WiFiAPPSK,6); // I checked WiFi.softAP(SSIDName,WiFiAPPSK) too.
server=new ESP8266WebServer(80);
server->on("/r", HTTP_POST, {
...
});
server->onNotFound( {
if (!handleFileRead(server->uri()))
server->send(404, "text/plain", "FileNotFound");
});
server->begin();
Udp.begin(2390);
...
}
void loop() {
...
server->handleClient();
packetSize = Udp.parsePacket();
if (packetSize)
{
packetBuffer[0] = 0; //buffer to hold incoming packet
packetBuffer[1] = 0;
Udp.beginPacket(Udp.remoteIP(), Udp.remotePort());
Udp.write("h");
}
...
}

Debug Messages

I delete board esp8266 and reinstall it today after that when I enable debug on Serial WDT resets(I don't know why)

there is no poison after the block. Expected poison address: 0x3fff2ab4, actual data: 0xaf 0x0 0xa5 0xa5
block start: 3fff2a04

Panic C:\Users\amin_\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\umm_malloc\umm_malloc.c:853 check_poison_block

ctx: sys
sp: 3ffffd40 end: 3fffffb0 offset: 01b0

>>>stack>>>
3ffffef0: 5ffffe00 5ffffe00 3ffefb28 40100334
3fffff00: 4a00361f 00000ca0 3fff29f8 4010044f
3fffff10: 4f4cbf71 ffffffff 3fff0420 4010054f
3fffff20: ffffffff 3fff1a38 3fff1dfc 401008d9
3fffff30: ffffffff ffffffff 00007bc6 40106f8c
3fffff40: 40105246 00007bc4 ffffffff 402331e5
3fffff50: 401060b4 00000000 00007bc4 00000000
3fffff60: 40228d0c 3ffefae8 3ffefb10 60000600
3fffff70: 021040fa 3ffefb10 3ffefae8 40228d19
3fffff80: 40228d5e 3fffdab0 00000000 3fffdcb0
3fffff90: 3ffefb30 3fffdad0 3fff0500 40211253
3fffffa0: 40000f49 97b9bbff 3fffdab0 40000f49
<<<stack<<<

ets Jan 8 2013,rst cause:1, boot mode:(1,6)


ets Jan 8 2013,rst cause:4, boot mode:(1,6)

wdt reset

thanks in advance
sorry for my English

Re: softAP disappears

PostPosted: Fri Nov 10, 2017 9:24 pm
by rudy
It is good to remove as much out of the code, as you can as long as what you post compiles, can still run, and also has the same problem behaviour as the full code. If those conditions are not met then it often is just a waste of everyone's time.

Re: softAP disappears

PostPosted: Sat Nov 11, 2017 8:52 am
by rudy
Yes, that's good too - a lot more work though!


True. My thought was if the original code might have dependencies, libraries, that someone else doesn't have if they are to try the code. If someone has a problem with their code, and they post it here, I will give it a try and see what I can figure out.

But if there are a bunch of libraries that I don't have (mainly for attached hardware) then I can't run it as is. With some modifications I might be able to get around that problem. Or my other solutions is to buy more hardware so I can run the code as is. I have bought a number of different items for this reason only.

My other reason for suggesting the simplification of the code (and still retain the problem) is that often will find the problem. Or find that the problems was really with code that got removed.