After some tests i just realize that difference between my esp8266 and esp32 setup is only in hardware and position.
So a removed esp32 with bme280 more close to a door ( wifi router is on stairs). And it partially solves a problem.
This log is before i moved esp32. I see problems with wifi and exceptions in mqtt.
Code: Select all
field1=80.15&field2=18.45
MQTT connect exception
field1=81.15&field2=18.43
MQTT connect exception
field1=81.19&field2=18.44
MQTT connect exception
field1=81.17&field2=18.44
field1=81.10&field2=18.47
MQTT connect exception
field1=77.23&field2=17.82
MQTT connect exception
field1=77.12&field2=17.81
I (1731214) wifi: bcn_timout,ap_probe_send_start
I (1733714) wifi: ap_probe_send over, resett wifi status to disassoc
I (1733714) wifi: state: run -> init (c800)
I (1733714) wifi: pm stop, total sleep time: 505496430 us / 1728010995 us
I (1733714) wifi: new:<13,0>, old:<13,2>, ap:<255,255>, sta:<13,2>, prof:1
[0;32mI (1733724) wifi: STA_DISCONNECTED, reason:200
beacon timeout[0m
I (1734094) wifi: new:<13,2>, old:<13,0>, ap:<255,255>, sta:<13,2>, prof:1
I (1734094) wifi: state: init -> auth (b0)
I (1734094) wifi: state: auth -> assoc (0)
I (1734114) wifi: state: assoc -> run (10)
I (1741214) wifi: bcn_timout,ap_probe_send_start
I (1743714) wifi: ap_probe_send over, resett wifi status to disassoc
I (1743714) wifi: state: run -> init (c800)
I (1743714) wifi: new:<13,0>, old:<13,2>, ap:<255,255>, sta:<13,2>, prof:1
[0;32mI (1743724) wifi: STA_DISCONNECTED, reason:200
beacon timeout[0m
[0;32mI (1746144) wifi: STA_DISCONNECTED, reason:201
no AP found[0m
[0;32mI (1748554) wifi: STA_DISCONNECTED, reason:201
no AP found[0m
[0;32mI (1750964) wifi: STA_DISCONNECTED, reason:201
no AP found[0m
[0;32mI (1753374) wifi: STA_DISCONNECTED, reason:201
no AP found[0m
[0;32mI (1755794) wifi: STA_DISCONNECTED, reason:201
no AP found[0m
I (1756154) wifi: new:<13,2>, old:<13,0>, ap:<255,255>, sta:<13,2>, prof:1
I (1756154) wifi: state: init -> auth (b0)
I (1757154) wifi: state: auth -> init (200)
I (1757154) wifi: new:<13,0>, old:<13,2>, ap:<255,255>, sta:<13,2>, prof:1
[0;32mI (1757154) wifi: STA_DISCONNECTED, reason:2[0m
[0;32mI (1759574) wifi: STA_DISCONNECTED, reason:201
no AP found[0m
I (1759934) wifi: new:<13,2>, old:<13,0>, ap:<255,255>, sta:<13,2>, prof:1
I (1759934) wifi: state: init -> auth (b0)
I (1759944) wifi: state: auth -> assoc (0)
I (1760944) wifi: state: assoc -> init (400)
I (1760954) wifi: new:<13,0>, old:<13,2>, ap:<255,255>, sta:<13,2>, prof:1
[0;32mI (1760954) wifi: STA_DISCONNECTED, reason:4[0m
[0;32mI (1763364) wifi: STA_DISCONNECTED, reason:201
no AP found[0m
[0;32mI (1765774) wifi: STA_DISCONNECTED, reason:201
no AP found[0m
[0;32mI (1768194) wifi: STA_DISCONNECTED, reason:201
no AP found[0m
I (1768554) wifi: new:<13,2>, old:<13,0>, ap:<255,255>, sta:<13,2>, prof:1
I (1768554) wifi: state: init -> auth (b0)
I (1768574) wifi: state: auth -> assoc (0)
I (1769574) wifi: state: assoc -> init (400)
I (1769574) wifi: new:<13,0>, old:<13,2>, ap:<255,255>, sta:<13,2>, prof:1
[0;32mI (1769574) wifi: STA_DISCONNECTED, reason:4[0m
[0;32mI (1771994) wifi: STA_DISCONNECTED, reason:201
no AP found[0m
I (1772354) wifi: new:<13,2>, old:<13,0>, ap:<255,255>, sta:<13,2>, prof:1
I (1772354) wifi: state: init -> auth (b0)
I (1773354) wifi: state: auth -> init (200)
I (1773354) wifi: new:<13,0>, old:<13,2>, ap:<255,255>, sta:<13,2>, prof:1
[0;32mI (1773354) wifi: STA_DISCONNECTED, reason:2[0m
[0;32mI (1775774) wifi: STA_DISCONNECTED, reason:201
no AP found[0m
I (1776134) wifi: new:<13,2>, old:<13,0>, ap:<255,255>, sta:<13,2>, prof:1
I (1776134) wifi: state: init -> auth (b0)
I (1776134) wifi: state: auth -> assoc (0)
I (1776144) wifi: state: assoc -> run (10)
I (1776294) wifi: connected with 55507, channel 13
I (1776294) wifi: pm start, type: 1
[0;32mI (1776294) network: CONNECTED[0m
[0;32mI (1779764) event: sta ip: 192.168.1.113, mask: 255.255.255.0, gw: 192.168.1.1[0m
[0;32mI (1779764) network: GOT_IP[0m
I (1788114) wifi: bcn_timout,ap_probe_send_start
field1=69.75&field2=21.18
field1=74.73&field2=18.82
MQTT connect exception
field1=79.64&field2=18.13
MQTT connect exception
field1=79.72&field2=18.14
MQTT connect exception
field1=79.83&field2=18.14
MQTT connect exception
field1=79.90&field2=18.14
MQTT connect exception
field1=79.95&field2=18.18
MQTT connect exception
field1=79.95&field2=18.18
MQTT connect exception
field1=79.96&field2=18.24
MQTT connect exception
field1=79.96&field2=18.24
MQTT connect exception
field1=79.93&field2=18.29
MQTT connect exception
field1=79.93&field2=18.29
MQTT connect exception
field1=79.93&field2=18.32
MQTT connect exception
field1=79.93&field2=18.32
MQTT connect exception
field1=80.00&field2=18.34
MQTT connect exception
field1=80.00&field2=18.34
MQTT connect exception
field1=79.91&field2=18.36
MQTT connect exception
field1=79.91&field2=18.36
MQTT connect exception
0. It was a bunch of problems: bad code, bad wire connections, difference in hardware, position and wifi connection.
1. As Peter said, problems with wifi will occur. And i saw it.
2. mqtt.simple suck on connection problems.
3. WiFi module on esp8266 is more powerful than esp32 (i mean specifically my own 2 pcb)
4. WDT and exceptions are rulz
Next step is to rewrite code on mqttresilent lib.