connornishijima / AlertMe

Arduino library for sending email and SMS from nothing but the ESP8266!
GNU General Public License v3.0
68 stars 17 forks source link

Constant resets after second upload. #2

Open chadmeby opened 6 years ago

chadmeby commented 6 years ago

Arduino IDE 1.8.4 on a Wemos D1 R2

Library compiles and works as expected, configuration via 'AlertMe Configuration' AP with scanning is smooth (and is a fantastic feature!) and I am receiving the emails/texts just fine. The issue comes if I modify the Arduino sketch and re-upload...this causes the board to go into a (seemingly) endless cycle of resets. Power cycling doesn't fix it, nor does uploading the example sketch, nor does shorting the config_pin (which I defined as D6 on the Wemos).

What does reliably work is to upload an empty SPIFFS image and then re-upload the sketch.

Once things go pear-shaped, this is what I see in the serial monitor:

⸮⸮HP⸮⸮`M,⸮⸮lCd⸮⸮Hh⸮⸮⸮⸮⸮ѥ⸮⸮⸮to WIFI/SMTP...
Exception (28):
epc1=0x4000bf3c epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont 
sp: 3fff2390 end: 3fff2610 offset: 01a0

>>>stack>>>
3fff2530:  3fff2568 3fff4008 3fff3f5c 4020831d  
3fff2540:  3ffea0d8 00000000 000003e8 00000100  
3fff2550:  3fff3f1c 3fff2ff4 3fff2568 3fff3ff6  
3fff2560:  3fff3fc2 feefef0a 3ffe98d8 3fff15e4  
3fff2570:  3fff3ffc 00000200 3fff34ac 4021102b  
3fff2580:  3ffe90e0 00000000 3fff1118 3fff15e4  
3fff2590:  3fffdad0 00000000 3fff1118 40208d1e  
3fff25a0:  3fffdad0 3fff1118 3fff1528 40206afc  
3fff25b0:  feefeffe feefeffe feefeffe feefeffe  
3fff25c0:  feefeffe feefeffe feefeffe feefeffe  
3fff25d0:  feefeffe feefeffe feefeffe feefeffe  
3fff25e0:  feefeffe feefeffe feefeffe 3fff15e4  
3fff25f0:  3fffdad0 00000000 3fff15dd 40210514  
3fff2600:  feefeffe feefeffe 3fff15f0 40100718  
<<<stack<<<
R⸮⸮Lv⸮0UHh⸮⸮⸮⸮⸮ѥ⸮⸮⸮to WIFI/SMTP...
Exception (28):
epc1=0x4000bf3c epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont 
sp: 3fff2390 end: 3fff2610 offset: 01a0

>>>stack>>>
3fff2530:  3fff2568 3fff4008 3fff3f5c 4020831d  
3fff2540:  3ffea0d8 00000000 000003e8 00000100  
3fff2550:  3fff3f1c 3fff2ff4 3fff2568 3fff3ff6  
3fff2560:  3fff3fc2 feefef0a 3ffe98d8 3fff15e4  
3fff2570:  3fff3ffc 00000200 3fff34ac 4021102b  
3fff2580:  3ffe90e0 00000000 3fff1118 3fff15e4  
3fff2590:  3fffdad0 00000000 3fff1118 40208d1e  
3fff25a0:  3fffdad0 3fff1118 3fff1528 40206afc  
3fff25b0:  feefeffe feefeffe feefeffe feefeffe  
3fff25c0:  feefeffe feefeffe feefeffe feefeffe  
3fff25d0:  feefeffe feefeffe feefeffe feefeffe  
3fff25e0:  feefeffe feefeffe feefeffe 3fff15e4  
3fff25f0:  3fffdad0 00000000 3fff15dd 40210514  
3fff2600:  feefeffe feefeffe 3fff15f0 40100718  
<<<stack<<<

(lather, rinse, repeat)

I will have a different ESP8266 board soon to test against. I'll let you know if it produces different results.

fredringwald commented 6 years ago

I had the same issue. When I installed ESP8266FS from:

https://github.com/esp8266/arduino-esp8266fs-plugin

and overwrote my ESP8266 SPIFFS, I was then able to re-upload my AlertMe sketch and start over with the configuration of AlertMe. Apparently there is something about the way that AlertMe writes data to the SPIFFS that causes this reset loop which seems to make the ESP8266 unusable in some circumstances.