jasoncoon / esp8266-fastled-webserver

GNU General Public License v3.0
713 stars 359 forks source link

AP refuse connection after a while #151

Closed GitCode2019 closed 3 years ago

GitCode2019 commented 4 years ago

Hi,

at first absolut great work you have done. Its very easy and helps me very much on working on several projects with my pupils in school.

I have setup the webserver as Access Point and got connetion to my WEMOS D1 Mini. I can control my LEDs and the patterns work.

Serial Monitor reports: Connect to Wi-Fi access point: LED Lampe D6C and open http://192.168.4.1 in your browser HTTP web server started add 1 aid 1 station: 8c:77:16:e2:79:7b join, AID = 1

After a view minutes the webserver refuses my request on 192.168.4.1 (former worked) and dont show the webinterface anymore.

On my serial Monitor I get the error: Fatal exception 28(LoadProhibitedCause): epc1=0x4020f663, epc2=0x00000000, epc3=0x00000000, excvaddr=0x003d271c, depc=0x00000000

Exception (28): epc1=0x4020f663 epc2=0x00000000 epc3=0x00000000 excvaddr=0x003d271c depc=0x00000000

ctx: cont sp: 3ffffc10 end: 3fffffd0 offset: 01a0

stack>>> 3ffffdb0: 00000000 00000000 00000000 00000000
3ffffdc0: 00000000 00000000 00000000 00000000
3ffffdd0: 00000000 40212fd7 3ffffe10 40213055
3ffffde0: 00000000 3fff0588 3ffffe10 402130a2
3ffffdf0: 3ffe9b98 3ffffe50 3ffffe50 000000c8
3ffffe00: 3fff3ebc 3fff0588 3ffffe50 4020f65f
3ffffe10: 3fff44ac 0000007f 00000073 40213055
3ffffe20: 00000000 3fff0588 3ffffe50 00000001
3ffffe30: 00000000 3fff0588 3ffffebc 4020f6a4
3ffffe40: 3fff3954 0000000b 3ffffebc 4020f91b
3ffffe50: 3fff19e4 0000000f 00000000 40213055
3ffffe60: 3fff0588 3fff386c 00000000 00000000
3ffffe70: 00000000 00000000 3fff3864 4021553c
3ffffe80: 3fff0588 3fff386c 000008e7 4020fbdd
3ffffe90: 40215a60 00000000 000003e8 40211489
3ffffea0: 3fff393c 3fff397c 00000000 4020fa20
3ffffeb0: 3fff3994 0000000f 0000000b 3fff3ebc
3ffffec0: 0000000f 00000009 3fff3ea4 0000000f
3ffffed0: 0000000b 00000050 3fffff10 40213055
3ffffee0: 00000000 40249323 7fffffff 40213158
3ffffef0: 00000000 00000000 3fff0588 4020fa20
3fffff00: 3fff3864 3fff05cc 3fff0588 4020fda9
3fffff10: 3fff3e8c 0000000f 0000000b 00000000
3fffff20: 00000000 4bc6a7f0 00050d1e 3fff091c
3fffff30: 3fff05cc 00000001 4bc6a7f0 00000000
3fffff40: 00000001 00000000 4020e2dc 00000010
3fffff50: 00000000 3fff3f1c 3fff0588 3fff091c
3fffff60: 00000001 3fff05b0 3fff0588 4020ffa0
3fffff70: 40215958 00000000 00001388 40213c02
3fffff80: 00000000 3fff3f1c 3fff06b8 4020c760
3fffff90: 3fffdad0 00000000 3fff0915 4020b9e6
3fffffa0: 00000000 00000000 00000001 40213b69
3fffffb0: 3fffdad0 00000000 3fff0915 40213bd4
3fffffc0: feefeffe feefeffe 3ffe85f4 40100739
<<<stack<<<

or sometimes: Fatal exception 9(LoadStoreAlignmentCause): epc1=0x4020f663, epc2=0x00000000, epc3=0x00000000, excvaddr=0x27c10043, depc=0x00000000

Exception (9): epc1=0x4020f663 epc2=0x00000000 epc3=0x00000000 excvaddr=0x27c10043 depc=0x00000000

ctx: cont sp: 3ffffc10 end: 3fffffd0 offset: 01a0

stack>>> 3ffffdb0: 00000000 00000000 00000000 00000000
3ffffdc0: 00000000 00000000 00000000 00000000
3ffffdd0: 00000000 40212fd7 3ffffe10 40213055
3ffffde0: 00000000 3fff0588 3ffffe10 402130a2
3ffffdf0: 3ffe9b98 3ffffe50 3ffffe50 000000c8
3ffffe00: 3fff3ebc 3fff0588 3ffffe50 4020f65f
3ffffe10: 3fff44ac 0000007f 00000073 40213055
3ffffe20: 00000000 3fff0588 3ffffe50 00000001
3ffffe30: 00000000 3fff0588 3ffffebc 4020f6a4
3ffffe40: 3fff3954 0000000b 3ffffebc 4020f91b
3ffffe50: 3fff19e4 0000000f 00000000 40213055
3ffffe60: 3fff0588 3fff386c 00000000 00000000
3ffffe70: 00000000 00000000 3fff3864 4021553c
3ffffe80: 3fff0588 3fff386c 000008e7 4020fbdd
3ffffe90: 40215a60 00000000 000003e8 40211489
3ffffea0: 3fff393c 3fff397c 00000000 4020fa20
3ffffeb0: 3fff3994 0000000f 0000000b 3fff3ebc
3ffffec0: 0000000f 00000009 3fff3ea4 0000000f
3ffffed0: 0000000b 00000050 3fffff10 40213055
3ffffee0: 00000000 40249323 7fffffff 40213158
3ffffef0: 00000000 00000000 3fff0588 4020fa20
3fffff00: 3fff3864 3fff05cc 3fff0588 4020fda9
3fffff10: 3fff3e8c 0000000f 0000000b 00000000
3fffff20: 00000000 4bc6a7f0 000087bf 3fff091c
3fffff30: 3fff05cc 00000001 4bc6a7f0 00000000
3fffff40: 00000001 00000000 4020e2dc 00000010
3fffff50: 00000000 3fff3f1c 3fff0588 3fff091c
3fffff60: 00000001 3fff05b0 3fff0588 4020ffa0
3fffff70: 40215958 00000000 00001388 40213c02
3fffff80: 00000000 3fff3f1c 3fff06b8 4020c760
3fffff90: 3fffdad0 00000000 3fff0915 4020b9e6
3fffffa0: 00000000 00000000 00000001 40213b69
3fffffb0: 3fffdad0 00000000 3fff0915 40213bd4
3fffffc0: feefeffe feefeffe 3ffe85f4 40100739
<<<stack<<<

Can you help me? Thanks Mathew

jasoncoon commented 4 years ago

Can you try the ESP Exception Stack Trace Decoder on those? https://github.com/me-no-dev/EspExceptionDecoder

I tried it, but you must have a different version of Arduino, a different board selected, etc, because I'm unable to decode those stacks.

GitCode2019 commented 4 years ago

Hi, I installed the stack deckoder, and copied stack>>> 3ffffdb0: 00000000 00000000 00000000 00000000 3ffffdc0: 00000000 00000000 00000000 00000000 3ffffdd0: 00000000 40212fd7 3ffffe10 40213055 3ffffde0: 00000000 3fff0588 3ffffe10 402130a2 3ffffdf0: 3ffe9b98 3ffffe50 3ffffe50 000000c8 3ffffe00: 3fff3ebc 3fff0588 3ffffe50 4020f65f 3ffffe10: 3fff44ac 0000007f 00000073 40213055 3ffffe20: 00000000 3fff0588 3ffffe50 00000001 3ffffe30: 00000000 3fff0588 3ffffebc 4020f6a4 3ffffe40: 3fff3954 0000000b 3ffffebc 4020f91b 3ffffe50: 3fff19e4 0000000f 00000000 40213055 3ffffe60: 3fff0588 3fff386c 00000000 00000000 3ffffe70: 00000000 00000000 3fff3864 4021553c 3ffffe80: 3fff0588 3fff386c 000008e7 4020fbdd 3ffffe90: 40215a60 00000000 000003e8 40211489 3ffffea0: 3fff393c 3fff397c 00000000 4020fa20 3ffffeb0: 3fff3994 0000000f 0000000b 3fff3ebc 3ffffec0: 0000000f 00000009 3fff3ea4 0000000f 3ffffed0: 0000000b 00000050 3fffff10 40213055 3ffffee0: 00000000 40249323 7fffffff 40213158 3ffffef0: 00000000 00000000 3fff0588 4020fa20 3fffff00: 3fff3864 3fff05cc 3fff0588 4020fda9 3fffff10: 3fff3e8c 0000000f 0000000b 00000000 3fffff20: 00000000 4bc6a7f0 000087bf 3fff091c 3fffff30: 3fff05cc 00000001 4bc6a7f0 00000000 3fffff40: 00000001 00000000 4020e2dc 00000010 3fffff50: 00000000 3fff3f1c 3fff0588 3fff091c 3fffff60: 00000001 3fff05b0 3fff0588 4020ffa0 3fffff70: 40215958 00000000 00001388 40213c02 3fffff80: 00000000 3fff3f1c 3fff06b8 4020c760 3fffff90: 3fffdad0 00000000 3fff0915 4020b9e6 3fffffa0: 00000000 00000000 00000001 40213b69 3fffffb0: 3fffdad0 00000000 3fff0915 40213bd4 3fffffc0: feefeffe feefeffe 3ffe85f4 40100739 <<<stack<<<

in the top window of the stack decode, but in the bottem result window nothing would be shown.

I had the Problem the last 2 Weeks with every WEMOS D1 I used. If the problem appieard I changed to a new wemos it works for a view hours and then the same ERROR.

By the way, at the top bevor the "stack" this error is shown:

Panic /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/libraries/ESP8266WiFi/src/include/DataSource.h:93 const uint8_t* BufferedStreamDataSource::get_buffer(size_t) [with TStream = Stream; uint8_t = unsigned char; size_t = unsigned int]: Assertion 'cb == stream_rem' failed.

maby you could help me or say more with the error above. Thank you

GitCode2019 commented 4 years ago

I forgot, that I have to select for the Exeptiondecoder a ".elf"-File. Where can this be found on OS X?

GitCode2019 commented 4 years ago

OK, some more informations. It has to be a problem with the SPIFFS. I an other topic I found hints like .streamFile(file,contentType) got not the estimated size or so, but I'm a beginner. Another hint was if the is a file in sthe SPIFFS no more readable.

After I tried to upload the Server-Content in the Spiffs (some times it failed) the server worked again for some time.

By the way what settings do you recommend for the WEMOS D1?

Thank you very much.

GitCode2019 commented 4 years ago

Ok, here again.

I another case the SPIFFS upload did not fix the problem.

GitCode2019 commented 4 years ago

no I got the error-code after some trial:

Exception 9: LoadStoreAlignmentCause: Load or store to an unaligned address PC: 0x4020f66f: ESP8266WebServer::_prepareHeader(String&, int, char const*, unsigned int) at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 385 EXCVADDR: 0x05000621

Decoding stack results 0x40212fe3: random(long) at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/WMath.cpp line 40 0x40213061: String::invalidate() at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/WString.cpp line 141 0x402130ae: String::changeBuffer(unsigned int) at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/WString.cpp line 161 0x4020f66b: ESP8266WebServer::_prepareHeader(String&, int, char const, unsigned int) at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 385 0x40213061: String::invalidate() at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/WString.cpp line 141 0x4020f6b0: ESP8266WebServer::_prepareHeader(String&, int, char const, unsigned int) at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 391 0x4020f927: ESP8266WebServer::_streamFileCore(unsigned int, String const&, String const&) at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 485 0x40213061: String::invalidate() at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/WString.cpp line 141 0x40215548: fs::File::flush() at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/FS.cpp line 83 0x4020fbe9: StaticRequestHandler::handle(ESP8266WebServer&, HTTPMethod, String) at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/WString.h line 266 0x40211495: ESP8266WebServer::_parseRequest(WiFiClient&) at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/libraries/ESP8266WebServer/src/Parsing.cpp line 249 0x4020fa2c: ESP8266WebServer::send_P(int, char const, char const) at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 416 0x40213061: String::invalidate() at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/WString.cpp line 141 0x40213164: String::String(char const) at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/WString.cpp line 35 0x4020fa2c: ESP8266WebServer::send_P(int, char const, char const) at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 416 0x4020fdb5: FunctionRequestHandler::handle(ESP8266WebServer&, HTTPMethod, String) at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h line 39 0x4020c714: CFastLED::show(unsigned char) at /Users/normal/Documents/Arduino/libraries/FastLED/FastLED.cpp line 45 0x4020e2e8: FunctionRequestHandler::~FunctionRequestHandler() at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h line 10 0x4020ffac: ESP8266WebServer::~ESP8266WebServer() at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp line 91 0x40213c0e: esp_yield() at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/core_esp8266_main.cpp line 89 0x4020c76c: CFastLED::show(unsigned char) at /Users/normal/Documents/Arduino/libraries/FastLED/controller.h line 90 0x4020ba02: setup() at /Users/normal/Documents/Arduino/Lampe_AP/Lampe_AP/Lampe_AP.ino line 463 0x40213b75: __cxa_pure_virtual() at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/abi.cpp line 66 0x40213be0: loop_task(ETSEvent) at /Users/normal/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/core_esp8266_main.cpp line 134

GitCode2019 commented 4 years ago

Hi, I posted to code you expected. Please can you take a look on it. I have the problem with eryery Wemos D1 after a while. I can not be the only one with this Problem. Thank you Mathias

Am 16.12.2019 um 16:30 schrieb Jason Coon notifications@github.com:

Can you try the ESP Exception Stack Trace Decoder on those? https://github.com/me-no-dev/EspExceptionDecoder https://github.com/me-no-dev/EspExceptionDecoder I tried it, but you must have a different version of Arduino, a different board selected, etc, because I'm unable to decode those stacks.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jasoncoon/esp8266-fastled-webserver/issues/151?email_source=notifications&email_token=ANM5WJ5BJYXB7LEY2D6XVHDQY6NILA5CNFSM4JTGYXMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG7CQUY#issuecomment-566110291, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANM5WJ63A5WJVERNT6GWHGLQY6NILANCNFSM4JTGYXMA.

ChiyoDragon commented 4 years ago

Hi there,

I'm facing the same issue for Wemos D1. It worked in the beginning, but then there is no possibility to connect to the webinterface anymore. All the messages are same like from the issue creator.

jasoncoon commented 3 years ago

Sorry for the severely delayed response. And sorry, I really have no idea what might cause this. If you're still having this problem, and haven't already, you might try with the latest versions of the ESP8266 core and FastLED.

I'm closing this issue, but feel free to reopen it if needed.