[EDIT] it seems like this has to do with my laptop's firewall settings rather than anything wrong with the ESP8266 [/EDIT]

I have a webserver on my laptop. When I do this on my ESP8266 (after the wifi has been connected)

while(!client.connect(laptop,port)) {

It loops forever. However, if I manually ping my ESP from my laptop, I initially get this

Pinging with 32 bytes of data:
Request timed out.
Reply from bytes=32 time=4ms TTL=255

And as soon as this happens, the ESP gets connected to the laptop, and all works fine.

So it seems to me like the client.connect is preventing the ESP from even registering to the network, and the pinging is somehow waking it up.

  • 3
    what if you ping something else instead? – Jaromanda X Mar 26 '19 at 1:55
  • 1
    tried that - it doesn't do anything – joelhoro Mar 26 '19 at 1:58
  • 4
    Just tried running the server from a raspberry PI, the ESP connects without trouble. There must be some firewall thing or something going on my laptop. Will check and revert – joelhoro Mar 26 '19 at 2:07
  • 1
    could not find the source of the issue - firewall is definitely off. I should try to get hold of another laptop (as opposed to PI) to check – joelhoro Mar 26 '19 at 13:04
  • 1
    Hmm, have you tried using a port above 1024? I once had trouble with that, but it's just an idea... – Sim Son Mar 26 '19 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.