The use of the ESP8266 in the world of IoT

User avatar
By MikeDB
#85780 I'm using an ESP8266 which is situated in a field well away from any WiFi network so I have configured it as an Access Point. But I don't want the ESP8266 to serve the webpage as it's hard to update as it's not on any WiFi network. Instead I'd like to download the webpage from a larger server into local storage on a tablet, then walk to the ESP8266, switch the tablet WiFi over to the ESP WiFi, open the downloaded webpage and have it initiate communication with the ESP8266 on the usual 192.168.4.1.
But I can't work out how to do this. Is it possible ?
User avatar
By quackmore
#85786 that's the way I test my webpages before downloading into the esp8266

you can find a example on my github https://github.com/quackmore/esp_thermostat/tree/master/web
it's a bit rough but a working one

checkout the esp_queries.js file:
when the files are served by the esp you don't have to specify neither an IP address into the url, nor enabling the cross domain
when you open the files with a browser on your PC, and you want the queries to direct to the esp, you will have to specify the IP address into the url and enabling the cross domain (or the browser will block the query)
User avatar
By MikeDB
#85788
quackmore wrote:that's the way I test my webpages before downloading into the esp8266

you can find a example on my github https://github.com/quackmore/esp_thermostat/tree/master/web
it's a bit rough but a working one

checkout the esp_queries.js file:
when the files are served by the esp you don't have to specify neither an IP address into the url, nor enabling the cross domain
when you open the files with a browser on your PC, and you want the queries to direct to the esp, you will have to specify the IP address into the url and enabling the cross domain (or the browser will block the query)


So in your example does the ESP just serve the index.html and the JS files are already present on the other device ?