Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By aczento
#79560 Hello there,

I would like to discuss with you an issue I came across yesterday.

Setup is like this:
o Netgear Router as Wireless Access Point
o PC connected to this AP
o ESP8266 connected to this AP
o Smartphone connected to this AP

Goal:
o Transfer an updated sketch to the ESP module via the Webserver-Method as described here https://arduino-esp8266.readthedocs.io/en/latest/ota_updates/readme.html#web-browser
o The webserver is running on the PC. It is working. I can access it and download the update file from the Smartphone

Problem:
o The ESP can´t access the webserver on the PC. Error Code is "Connection Refused".

Background:
o I have several other connections in this setup wich are working and some are not. Let me describe them:
oo Send Ping from PC to ESP --> working
oo Send Ping from Smartphone to ESP --> working
oo Send Ping from ESP to PC --> NOT WORKING
oo Send UDP-Packets from PC to ESP --> working
oo Send UDP-Packtes from ESP to PC --> working
oo Access Webserver from ESP --> NOT WORKING

o I tried several different options on how to connect from ESP to PC Update Server:
oo ESPhttpUpdate.update("192.168.124.134", 6456, "/update.bin")
oo ESPhttpUpdate.update("192.168.124.134", 6456, "update.bin")
oo ESPhttpUpdate.update("http://192.168.124.134:6456/update.bin")
o Using the last line from the smartphone downloads the update file to the smartphone.
o Firewalls are disabled

Any suggestions where to look next?

Thanks!
Alex
User avatar
By aczento
#79587 Hi all,

solved it myelf already.
The problem was that I was calling the update-functions from within a timer callback.
After just setting a flag in there and executing the update from the main loop, everything started working.

BR,
Alex