General area when it fits no where else

Moderator: Mmiscool

User avatar
By ardhuru
#49163 Electroguard, thank you so much for the detailed explanation.

This is my first practical, real world ESP project and I learnt a lot in these exchanges. The final working code will act as a template for my future projects too.

The code you have given starts off working very well. But again, very mysteriously, it stops echoing UDP inputs after (usually) about 35 to 40 cycles, or even sooner. From some further research I have been able to determine that when this happens, the ESP is still receiving data, its just not re-transmitting it. At the same time, it has no problems transmitting the switch status, even in this 'hung' state.

At this point, as earlier, the module still transmits the switch status when it changes, and the LED also is flashing happily the way its supposed to.

I tried another ESP8266 01 (1MB) as also an ESP8266 07; no joy.

Lastly, tried powering the setup from another, more robust supply, just to eliminate possibilities.

Again, no luck.

Absolutely stumped by this issue. Can you think of a cause for this?

Anand.
User avatar
By Electroguard
#49170 I've still got that script running and echoing back udp replies every time without fail even after 2 hours and hundreds of udp msgs, but I don't have your hardware, so I am unable to reproduce your failure symtoms after so many 'cycles' - presumably that's cycles of your timer interrupt, but mine doesn't fail, so that suggests it may be a problem with your gpio03 input pin that you are reading.

What esp are you using?

Why use gpio03 for input? Does it have a pullup resistor? could you change that to the normal gpio00 flashing button?


ESP's use gpio00 as a flashing button and gpio01 as blue led indicator, so why not stick with that to start with, cos you know they both work ok.

If possible, I would try using the gpio00 flashing button as input (rather than 3) and ensure it does have a hardware pullup resistor, use the internal gpio01 blue led (instead of 2), and use gpio02 for the relay. See if that makes any difference... once you know what works you can alway change things later if needs be.