B4R Question [MOVING TO B4R FORUM] ESP access point password and html question

giggetto71

Active Member
Licensed User
Longtime User
Hi,
following this great @Erel 's post : https://www.b4x.com/android/forum/threads/esp-configurator-based-on-b4rserializator.81452/4 I can easily set an esp to start as access point and then configure it to connect to user wifi using the B4J application . so far, so good. two questions:

1- if I start the AP with password (i.e instead of using Main.WiFi.StartAccessPoint("esp_APx") I use Main.WiFi.StartAccessPoint("esp_APx","password")), how do I connect from the B4J app ? if I sock.Connect(), returns "connection refused" I guess because I am not trying to access providing the pw.

2- I have seen an esp8266 based product that once you connect to it in AP mode with the phone and from there you (under the ap wifi) select "manage router" it load an html page where you can set the wifi password and then press a button in the html gui to save it (I guess in the flash similar to @Erel's B4J app. Any idea?

thanks
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. You are confusing different network layers. It is the PC (OS) itself that needs to connect to the access point. It is not something that is done from the B4J app.

2. It is called captive portal: https://en.wikipedia.org/wiki/Captive_portal
I've never studied this protocol so can't say more. You will need to do some reading.
 
Upvote 0
Top