Access Point not stable/robust
Posted: Wed Sep 16, 2015 9:56 pm
Hello,
I have attached a simple Access Point sketch that is giving me issues.
I am using version 1.6.5-947-g39819f0.
Each time that the simple web page is served, a message is sent giving the heap size and the uptime, in milliseconds:
Configuring Access Point...
AP IP address: 192.168.4.1
HTTP server started
Page: Root, Heap: 25608, UpTime: 56773
Page: Root, Heap: 25456, UpTime: 63588
Page: Root, Heap: 25608, UpTime: 65598
Page: Root, Heap: 25456, UpTime: 68781
Page: Root, Heap: 25304, UpTime: 71612
Page: Root, Heap: 25144, UpTime: 72212
Page: Root, Heap: 25608, UpTime: 76228
Page: Root, Heap: 25456, UpTime: 76995
Page: Root, Heap: 25608, UpTime: 134406
Page: Root, Heap: 25456, UpTime: 139721
Page: Root, Heap: 25608, UpTime: 141777
Page: Root, Heap: 25456, UpTime: 142364
Page: Root, Heap: 25304, UpTime: 142897
Page: Root, Heap: 25144, UpTime: 145445
Page: Root, Heap: 25136, UpTime: 146002
Page: Root, Heap: 25136, UpTime: 146539
Page: Root, Heap: 25136, UpTime: 148748
I have added serial commands so that system information and uptime(mS) from the ESP8266 is available.
sys and uptime commands give:
Free Heap: 25912
Boot Version: 31
CPU (MHz): 80
SDK Version: 1.2.0
Chip ID: 16047500
Flash Size(chip): 1048576
Flash Size(IDE): 524288
Flash Speed: 40000000
UpTime: 221394
I can start the AP, and connect two devices (Nexus 7, iTouch) to the access point without issue.
I can go to the address of 192.168.4.1 and load the webpage on each device, see the heap size decrease on each refresh.
If I continue to refresh about every second, the heap size will decrease to about 22k, then crash.
Once I reset the ESP, I can again connect the devices to the SimpleAP Wifi access point, and serve the static webpage without issue. If I let the devices go to sleep for several minutes, they usually stay connected to the AP. However, it seems that the longer that devices are asleep, the higher the chance that I'll have to select the SimpleAP WiFi again, before reloading the page in the browser.
After about 60 to 90 minutes, things deteriorate to the point that the SimpleAP access point no longer shows up in the list of available networks on either device.
According to the serial information, the ESP8266 has not crashed or reset. The ESP8266 still responds to serial commands, shows stack >24k, and has an uptime that is accurate.
Tonight, I reset the board, and it crashed on the 4th reload request with the following information:
Configuring Access Point...
AP IP address: 192.168.4.1
HTTP server started
Page: Root, Heap: 25368, UpTime: 30174
Page: Not Found
Page: Root, Heap: 24664, UpTime: 33548
Page: Root, Heap: 24752, UpTime: 34897
Exception (9):
epc1=0x40101802 epc2=0x00000000 epc3=0x00000000 excvaddr=0x0c57a293 depc=0x00000000
ctx: sys
sp: 3ffffd50 end: 3fffffb0 offset: 01a0
>>>stack>>>
3ffffef0: 00000046 3fff1f10 40210d60 3fff5ab8
3fffff00: 3fff5ab8 3fff4d70 3fff5f68 00000000
3fffff10: 3fff0001 4020ad04 00000003 00000003
3fffff20: 3fff5ab8 00000000 40210d3d 00000000
3fffff30: 4020e125 3ffebb80 00000011 0000002d
3fffff40: 00000000 000000c0 0204a8c0 3ffedd3c
3fffff50: 4020a7d9 3fff5ab8 3fff4d70 3ffedd3c
3fffff60: 3ffebb80 3ffedd50 3ffedd34 402105d3
3fffff70: 3fff4d70 00000014 40210b72 3fff5ab8
3fffff80: 3fff4d70 3fffdc90 3fff4e00 00000001
3fffff90: 402114d7 3fff5ab8 00000000 3fffdcc0
3fffffa0: 40000f49 3fffdab0 3fffdab0 40000f49
Configuring Access Point...
AP IP address: 192.168.4.1
HTTP server started
Page: Root, Heap: 25608, UpTime: 56773
Page: Root, Heap: 25456, UpTime: 63588
Page: Root, Heap: 25608, UpTime: 65598
Page: Root, Heap: 25456, UpTime: 68781
Page: Root, Heap: 25304, UpTime: 71612
Page: Root, Heap: 25144, UpTime: 72212
Page: Root, Heap: 25608, UpTime: 76228
Page: Root, Heap: 25456, UpTime: 76995
I have a project configured as a station that has been running for over 300 hours, but my experience with an AP is not so good.
If the AP does not have any clients, does it go to sleep? Can it be kept from doing this?
What can I do to have a more stable and robust access point?
Thanks in advance for your help.
Greg
I have attached a simple Access Point sketch that is giving me issues.
I am using version 1.6.5-947-g39819f0.
Each time that the simple web page is served, a message is sent giving the heap size and the uptime, in milliseconds:
Configuring Access Point...
AP IP address: 192.168.4.1
HTTP server started
Page: Root, Heap: 25608, UpTime: 56773
Page: Root, Heap: 25456, UpTime: 63588
Page: Root, Heap: 25608, UpTime: 65598
Page: Root, Heap: 25456, UpTime: 68781
Page: Root, Heap: 25304, UpTime: 71612
Page: Root, Heap: 25144, UpTime: 72212
Page: Root, Heap: 25608, UpTime: 76228
Page: Root, Heap: 25456, UpTime: 76995
Page: Root, Heap: 25608, UpTime: 134406
Page: Root, Heap: 25456, UpTime: 139721
Page: Root, Heap: 25608, UpTime: 141777
Page: Root, Heap: 25456, UpTime: 142364
Page: Root, Heap: 25304, UpTime: 142897
Page: Root, Heap: 25144, UpTime: 145445
Page: Root, Heap: 25136, UpTime: 146002
Page: Root, Heap: 25136, UpTime: 146539
Page: Root, Heap: 25136, UpTime: 148748
I have added serial commands so that system information and uptime(mS) from the ESP8266 is available.
sys and uptime commands give:
Free Heap: 25912
Boot Version: 31
CPU (MHz): 80
SDK Version: 1.2.0
Chip ID: 16047500
Flash Size(chip): 1048576
Flash Size(IDE): 524288
Flash Speed: 40000000
UpTime: 221394
I can start the AP, and connect two devices (Nexus 7, iTouch) to the access point without issue.
I can go to the address of 192.168.4.1 and load the webpage on each device, see the heap size decrease on each refresh.
If I continue to refresh about every second, the heap size will decrease to about 22k, then crash.
Once I reset the ESP, I can again connect the devices to the SimpleAP Wifi access point, and serve the static webpage without issue. If I let the devices go to sleep for several minutes, they usually stay connected to the AP. However, it seems that the longer that devices are asleep, the higher the chance that I'll have to select the SimpleAP WiFi again, before reloading the page in the browser.
After about 60 to 90 minutes, things deteriorate to the point that the SimpleAP access point no longer shows up in the list of available networks on either device.
According to the serial information, the ESP8266 has not crashed or reset. The ESP8266 still responds to serial commands, shows stack >24k, and has an uptime that is accurate.
Tonight, I reset the board, and it crashed on the 4th reload request with the following information:
Configuring Access Point...
AP IP address: 192.168.4.1
HTTP server started
Page: Root, Heap: 25368, UpTime: 30174
Page: Not Found
Page: Root, Heap: 24664, UpTime: 33548
Page: Root, Heap: 24752, UpTime: 34897
Exception (9):
epc1=0x40101802 epc2=0x00000000 epc3=0x00000000 excvaddr=0x0c57a293 depc=0x00000000
ctx: sys
sp: 3ffffd50 end: 3fffffb0 offset: 01a0
>>>stack>>>
3ffffef0: 00000046 3fff1f10 40210d60 3fff5ab8
3fffff00: 3fff5ab8 3fff4d70 3fff5f68 00000000
3fffff10: 3fff0001 4020ad04 00000003 00000003
3fffff20: 3fff5ab8 00000000 40210d3d 00000000
3fffff30: 4020e125 3ffebb80 00000011 0000002d
3fffff40: 00000000 000000c0 0204a8c0 3ffedd3c
3fffff50: 4020a7d9 3fff5ab8 3fff4d70 3ffedd3c
3fffff60: 3ffebb80 3ffedd50 3ffedd34 402105d3
3fffff70: 3fff4d70 00000014 40210b72 3fff5ab8
3fffff80: 3fff4d70 3fffdc90 3fff4e00 00000001
3fffff90: 402114d7 3fff5ab8 00000000 3fffdcc0
3fffffa0: 40000f49 3fffdab0 3fffdab0 40000f49
Configuring Access Point...
AP IP address: 192.168.4.1
HTTP server started
Page: Root, Heap: 25608, UpTime: 56773
Page: Root, Heap: 25456, UpTime: 63588
Page: Root, Heap: 25608, UpTime: 65598
Page: Root, Heap: 25456, UpTime: 68781
Page: Root, Heap: 25304, UpTime: 71612
Page: Root, Heap: 25144, UpTime: 72212
Page: Root, Heap: 25608, UpTime: 76228
Page: Root, Heap: 25456, UpTime: 76995
I have a project configured as a station that has been running for over 300 hours, but my experience with an AP is not so good.
If the AP does not have any clients, does it go to sleep? Can it be kept from doing this?
What can I do to have a more stable and robust access point?
Thanks in advance for your help.
Greg