-->
Page 1 of 1

Access Webserver fails

PostPosted: Fri Dec 14, 2018 12:24 am
by aczento
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

Re: Access Webserver fails

PostPosted: Sun Dec 16, 2018 2:35 am
by aczento
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