Gateway ESP8266 Wifi resets after connecting to router
-
@mfalkvidd I would like to try with eliminating the possible power supply issue. In case this is the issue the firmware downgrade will also not work I guess.
When not connected to the computer, how can I monitor if it's working? I can't use the Serial Monitor in that case, can I.@Petjepet it can be done. The easiest way is if you have a powered usb hub. The hub can delver more power than the computer, but still allows communication with the computer.
Another solution is a Y-cable, which draws power from two usb ports. They were common when 2.5" usb harddrives first arrived.
A third solution is to use serial over wifi. But I don't think it will start early enough, since it only starts when the sketch is running. I can't find the link now but I think it was a github project.
You could also try to connect it to a powerful usb adapter and see if the issue goes away. You won't be able to use the serial monitor, but if the node suddenly works the problem is likely power related.
-
@mfalkvidd Thanks for all the info.
I followed the link you sent and the 'cause:4' indicates watchdog timer related. How to get by that one :).You power suggestions I will have a look at. I don't think I have a powered USB hub.
I guess I will need to have Controller software and a new node to test this (current nodes are operational with a MySensors serial gateway with Pimatic). Another question: can I run two gateways (the wifi one I'm only testing while my serial one is operational) when nodes are already operational? Will they not get confused about what gateway to work with?
-
@mfalkvidd Thanks for all the info.
I followed the link you sent and the 'cause:4' indicates watchdog timer related. How to get by that one :).You power suggestions I will have a look at. I don't think I have a powered USB hub.
I guess I will need to have Controller software and a new node to test this (current nodes are operational with a MySensors serial gateway with Pimatic). Another question: can I run two gateways (the wifi one I'm only testing while my serial one is operational) when nodes are already operational? Will they not get confused about what gateway to work with?
the watchdog timer kicks in if your code is busy for too long. If you have any delaysor long-running loops, remove them and see if it helps.
Another question: can I run two gateways (the wifi one I'm only testing while my serial one is operational) when nodes are already operational? Will they not get confused about what gateway to work with?
Change the nrf radio channel in MyConfig.h when uploading the sketches for your new network. Wih different channels the two networks will not interfere with eachother.
-
@mfalkvidd said:
the watchdog timer kicks in if your code is busy for too long. If you have any delaysor long-running loops, remove them and see if it helps.
I have the basic sketch for the gateway from MySensors so I think there are no delay nor long-running loops in there.
Another question: can I run two gateways (the wifi one I'm only testing while my serial one is operational) when nodes are already operational? Will they not get confused about what gateway to work with?
Change the nrf radio channel in MyConfig.h when uploading the sketches for your new network. Wih different channels the two networks will not interfere with eachother.
Ok. Good suggestion. In that case I need to build a standard node on that channel as well.
What happens when running on the same channel. Will existing nodes at all communicate with the new gateway when also the serial gateway is operational? -
@mfalkvidd said:
the watchdog timer kicks in if your code is busy for too long. If you have any delaysor long-running loops, remove them and see if it helps.
I have the basic sketch for the gateway from MySensors so I think there are no delay nor long-running loops in there.
Another question: can I run two gateways (the wifi one I'm only testing while my serial one is operational) when nodes are already operational? Will they not get confused about what gateway to work with?
Change the nrf radio channel in MyConfig.h when uploading the sketches for your new network. Wih different channels the two networks will not interfere with eachother.
Ok. Good suggestion. In that case I need to build a standard node on that channel as well.
What happens when running on the same channel. Will existing nodes at all communicate with the new gateway when also the serial gateway is operational?What happens when running on the same channel. Will existing nodes at all communicate with the new gateway when also the serial gateway is operational?
Both gateways will answer "find parent" requests. Both gateways will try to send hardware ack for messages. This will lead to undefined behavior.
-
@mfalkvidd Thanks.
I now loaded a sketch using a different frequency and a simple Dallas Temperature node.
The gateway powered by a direct USB power source (to avoid the power issue). The node is trying to find the parent and gets stuck there.
The gateway is not available and I guess rebooting (blue leds lights up in I assume reboot sequence).So the watchdog timer issue to investigate.
Maybe try to get firmware v2.0 for the ESP. -
@mfalkvidd I have found someone with the same issue, using a different board version 0.9 vs 1.0.
WIFI Gateway NodeMCU 0.9 always reset
@bigjimjeedom was using firmware 2.0.0 ending up with the same error. Not solved in this thread.
-
This may sound very stupid and might not help you at all, but I have a mixed set of 0.9 and 1.0 Nodemcu boards. I had some issues not related with mysensors, but with a 1.0 board flashed as 1.0 and used for ESPEasy (self compiled version).
Just as a test I recompiled for 0.9 (to my 1.0 board) and then it worked fine. Since then I compile/flash all my 0.9 and 1.0 Esps as 0.9.
no matter whether it is for EspEasy, "my" mysensors gateway with pimatic rest-API, or the standard mysensors esp8266 mqtt gateway.I did not even check whether there are code differences or not between 0.9 and 1.0. For me 0.9 binaries work OK.
-
@Harry-van-der-Wolf thank you for this suggestion.
I will try that one.
It is only selecting the board 'NodeMCU 0.9 (ESP-12 Module)' instead of 'NodeMCU 1.0 (ESP-12E Module)' as board to upload to, isn't it? -
Yes, only that. It helped in my somewhat different situation with an unstable ESPEasy.
-
@Harry-van-der-Wolf I tried but I'm still getting the same reset message: Cause:4, boot mode:(3,4).
I'm stuck here. I also tried another NRF with the same result. -
@Harry-van-der-Wolf and @mfalkvidd . I'm now on Mysensors 2 trying to get my WFI Gateway to run.
Used new sketch (tried both 0.9 and 1.0 board setting but no luck.
Serial Monitor now:ets Jan 8 2013,rst cause:4, boot mode:(3,6) wdt reset load 0x4010f000, len 1384, room 16 tail 8 chksum 0x2d csum 0x2d v3de0c112 ~ldrepeating
-
A long-shot but i had some resets due to I didnt set the right flash size.
I ran the sketch https://github.com/esp8266/Arduino/blob/master/libraries/esp8266/examples/CheckFlashConfig/CheckFlashConfig.ino and found it it was wrong.Also I had alot of resets due to what @mfalkvidd said - POWER! I have the ESP 07 and tried to power it with a 3.3v regulator that couldnt provide enough mA.
-
@sundberg84 I powered my NodeMCU 1.0 (ESP-12E Module) via USB from my PC. That should not give a powerissue.
How does your linked sketch work: load it to the NodeMCU and then check the Serial Monitor? -
@sundberg84 I powered my NodeMCU 1.0 (ESP-12E Module) via USB from my PC. That should not give a powerissue.
How does your linked sketch work: load it to the NodeMCU and then check the Serial Monitor?@Petjepet - Sorry, dont even know if it works with nodeMCU... this is ArdinoESP. My misstake...
-
@Petjepet - Sorry, I don't have a clue. It is simply working for me. I did quite some tries with different versions but either it worked or it didn't. I didn't see this error before. Are you sure you have connected the NRF24L01 correctly?
-
When using MySensors 1.5, I had this output in the Serial Monitor:
ESP8266 MySensors Gateway Connecting to Vierkenshof_G ..Connected! IP: 192.168.1.76 ets Jan 8 2013,rst cause:4, boot mode:(3,4) wdt reset load 0x4010f000, len 1264, room 16 tail 0 chksum 0x42 csum 0x42 ~ldWhere now using MySensors 2.0, I end up with:
ets Jan 8 2013,rst cause:4, boot mode:(3,6) wdt reset load 0x4010f000, len 1384, room 16 tail 8 chksum 0x2d csum 0x2d v3de0c112 ~ldSo I don't see the connect to my network anymore (?) and having different boot mode for the reset cause.
Tried a different radio, no change.
Powered with my iPhone power plug I also do not see the MCU connect to my router.
I guess my Amica NodeMCU isn't compatible/has hardware failure.I now ordered the one as presented in the shop.
See if that will work.
-
I have had the same problem - the ESP8266 MQTT gateway device just "WDT resets" when a sensor device tries to send a message.
*EDIT 081016
In my case, I was using a yellow 0.9 dev board which has a known "screen print" error for pins GPIO4 and GPIO5 - I just swapped these pins over and all was OK - no crashes anymore.
https://twitter.com/bdcatalin/status/663434209265078272 -
This post is deleted!
-
@Petjepet
Please see this specific post on pimatic: https://forum.pimatic.org/topic/2234/external-selfmade-pimatic-max-thermostat-control-with-esp8266/17 for an EspEasy esp8266This guy has the exact same crash and he set the spiffs-flash-size to 1M, and then it functioned.