Comments (9)
I simply check befoure every publication if Wifi is connected and if Broker is connected.
- if i stop wifi (restart my router), the ESP reboot whit a WDT error. After that when the router reboot the connection automatically reconnect OK
- If i stop mosquitto daemon on my broker, when I restart it, the connection automatically reconnect OK whithout WDT problem.
BUT:
if i stop mosquitto daemon on my broker, and after i stop also the wifi connection, the ESP8266 freeze, no WDT error, only freeze whithout any activity. I must reset manually the ESP.
May you try this scenario also ? this is worst that the auto WDT reboot, because you must reset or remove power to the module.
I will try whit fixed IP on ESP
from pubsubclient.
@Testato Confirmed partially.
Looks like there is wifi error. My ESP resets with 'beacon timeout' and by WDT. BUT! It freezes after wdt reset, not starting my code. Also I have constantly rebooting ESP while wifi router is off using arduino git build 61d9b1f4 . There is no reboots on older arduino version (git from May 28)
Log 1 (conditions same as yours):
* MQTT Publish sensors 2015.06.22 09:55:50.9
debug on
setDebugOutput to on
OK
esp-9e82d0>
beacon timeout
rm 0
pm close 7 0 0/3921100541
Fatal exception (28):
epc1=0x4020918a, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
ets Jan 8 2013,rst cause:2, boot mode:(1,6)
ets Jan 8 2013,rst cause:4, boot mode:(1,6)
wdt reset
After hardware reset:
scandone
Fatal exception (28):
epc1=0x402090ce, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
ets Jan 8 2013,rst cause:2, boot mode:(1,6)
ets Jan 8 2013,rst cause:4, boot mode:(1,6)
wdt reset
from pubsubclient.
Latest version should have a stack trace printed to console — can you please post that and your .elf file as well? Thanks.
from pubsubclient.
Using version 1.6.4-835-g77d77e8 seems to have the problem solved.
Now the sketch uses DHCP and I can switch off the router without the WDT messing up.
After restoring the WiFi the ESP gets it's IP again and connects to the broker again to continue publishing
I can't post .elf files here, but here is the console
Publishing...
Publishing...
Publishing...
rm 0
pm close 7 0 0/74277806
reconnect
f -240, scandone
no Zonder_draad found, reconnect after 1s
reconnect
f 0, scandone
no Zonder_draad found, reconnect after 1s
reconnect
f -240, scandone
no Zonder_draad found, reconnect after 1s
reconnect
f 0, scandone
no Zonder_draad found, reconnect after 1s
reconnect
f -240, scandone
no Zonder_draad found, reconnect after 1s
reconnect
f 0, scandone
no Zonder_draad found, reconnect after 1s
reconnect
f -240, scandone
no Zonder_draad found, reconnect after 1s
reconnect
f 0, scandone
add 0
aid 3
pm open phy_2,type:2 0 0
cnt
connected with Zonder_draad, channel 3
dhcp client start...
ip:192.168.12.106,mask:255.255.255.0,gw:192.168.12.254
Connecting to MQTT broker (192.168.12.3) as 18:FE:34:A0:C5:77
Connected to 192.168.12.3
Publishing...
Publishing...
Publishing...
from pubsubclient.
here also solved whit 1.6.4-835-g77d77e8
- No wdt reboot after wifi router switch off
- No freeze if i stop brocker and after switch off the wifi router
Thanks @igrr
from pubsubclient.
The same problem! Version is 1.6.5-804-g2d340c7 - lastest...
from pubsubclient.
nope,
your version is 1.6.4, 1.6.5 do not exist (it is a tag error)
For use the g77d77e8 build you must use the development .json link
from pubsubclient.
No error, in file http://arduino.esp8266.com/staging/package_esp8266com_index.json -we see
"url":"http://arduino.esp8266.com/staging//esp8266-1.6.5-804-g2d340c7.zip",
"archiveFileName":"esp8266-1.6.5-804-g2d340c7.zip",
and this version is istal from internet for all at this time...(
from pubsubclient.
g2d340c7 is the actual developmen version (the 1.6.5 number become from arduino repository, it is not important here, @igrr can clear this point)
On g2d340c7 i do not have problem
Are you removed oldest version from C:\Users\win7\AppData\Roaming\arduino15 directory ?
from pubsubclient.
Related Issues (20)
- Subscribe to two topics?
- Compatibility broken with original knolleary/pubsubclient lib HOT 1
- Wrong password HOT 3
- lib update installs the knolleary lib HOT 4
- Message published multiple times HOT 1
- MAX transfer size is not found
- more than one Nodemcu clients can't able to get published message at a time HOT 1
- Multiple unsubscribe or publish with QoS 1 in callback HOT 1
- How to set the callback from a c++ class? HOT 1
- wrong hostname used
- esp12F heating issue HOT 1
- Unable to ascertain if received message is 'retained'. HOT 15
- socket error
- ESP32 HOT 1
- Memory leak on loop() HOT 1
- can this library subscribe to mqtt topic ? HOT 1
- error "MQTT' does not name a type" when compiling ESP8266-OTA example HOT 1
- PubSubClient.connect with userName/password ? HOT 1
- control reaches end of non-void function HOT 1
- beebotte.com - retain vs write API (weird persistance, possible to add) - not a bug I think
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pubsubclient.