wifi sleeps after 30 mins and restarts itself.

Trialblazer47
Posts: 60
Joined: Mon Jun 26, 2017 5:36 am

wifi sleeps after 30 mins and restarts itself.

Postby Trialblazer47 » Thu Aug 24, 2017 11:35 am

I am testing a example code for MQTT https://github.com/tuanpmt/esp32-mqtt and it works fine for a while but after every 30mins the devices does something that is not in the code. here is the debug message.

Code: Select all

[MQTT INFO] MQTT_MSG_TYPE_PINGRESP
[MQTT INFO] Sending pingreq
[MQTT INFO] Read len 2
[MQTT INFO] MQTT_MSG_TYPE_PINGRESP   <----------till here working fine
I (5433042) wifi: state: run -> auth (2c0)
I (5433043) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (5433044) wifi: pm stop, total sleep time: 0/1800035415

[MQTT INFO] Read len 0
[MQTT INFO] Read error 128
[MQTT INFO] Closing client socket
[MQTT INFO] Client destroyed
I (5433169) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (5433169) wifi: state: auth -> auth (b0)
I (5433172) wifi: state: auth -> assoc (0)
I (5433177) wifi: state: assoc -> run (10)
I (5433191) wifi: connected with Jarvis, channel 1
.[0;32mI (5433764) event: ip: 192.168.x.x, mask: 255.255.255.0, gw: 192.168.1.1.[0m
[MQTT INFO] Starting mqtt task
[MQTT INFO] Resolve dns for domain: broker.hivemq.com
[MQTT INFO] Connecting to server 35.158.148.112:1883,23303
[MQTT INFO] Connected!
[MQTT INFO] Connected to server broker.hivemq.com:1883
[MQTT INFO] Sending MQTT CONNECT message, type: 1, id: 0000
[MQTT INFO] Reading MQTT CONNECT response message
I (5443178) wifi: pm start, type:0

I am not sure if its okay to have this behavior.
Thanks.

Who is online

Users browsing this forum: Google [Bot] and 99 guests