The use of the ESP8266 in the world of IoT

User avatar
By kenn
#85810 No you can't access a new AP from the HTML or its JS code. That would be a massive security hole. So you should expect to do that manually before accessing the ESPs web server from a browser.

If your tablet is android or IOS, it would be possible to write an app to do that.

btw the most efficient way to operate is to have the ESP simply output data as a json, and web page (or an application) is on the tablet.
User avatar
By quackmore
#85819
Code: Select allNo you can't access a new AP from the HTML or its JS code. ...


and from the original question:

Code: Select all... 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. ...


@kenn ... guess you should read the question before answering ...

and yes, you can copy your HTML and JS files to an Android device
open them with Chrome (file:///sdcard/... or wherever they are...)
and have them redirecting queries to an external device...
it's called CORS, "Cross-origin resource sharing", not "massive security hole"
you will have to properly take are of it in your code

just saying...