WiFiManager icon indicating copy to clipboard operation
WiFiManager copied to clipboard

Feature request : connect through ip

Open kamikazem opened this issue 8 months ago • 7 comments

In the projects that connect to the internet but at the same time offer some kind of web page for control, Retrieving ip and connecting to the device control panel is cumbersome for non technical users mostly because they cannot find the ip address easily.

So When a device is connected to a wifi with sta , it might be useful to keep the ap mode and show list of wifis. But also show info of the connected wifi and a link to the user.

when this link , for example http://192.168.200.12@theSsid gets clicked the following set of commands get executed: 1.add this address to favorites with a custom name 2.execute the wifi credentials links 3.deauth the current user that is connected through ap 4.lower ap transmission power lower than that wifi with TheSsid 5.redirect to that link (without the @TheSsid) with a 10 second delay

I think In this manner The ip address finding issue would be easily solved for non technical users I don't know if you can set the transmission power of the device separately for ap and sta mode, if you could the hotspot could be always run with a very low transmission power for next possible interactions.

kamikazem avatar Oct 12 '23 10:10 kamikazem

You could always use mdns. Also how can you connect to an ip you don't know? Not sure I understand

tablatronix avatar Oct 12 '23 12:10 tablatronix

According to my experience, mdns does not always work, for example when the user is also connected to a vpn. And also older android phones do not support mdns, explaining this to a end user would be quite a headache.

In my earlier post i meant that The user doesn't know the ip address , because he is not tech savvy and the ip is assigned by dhcp of the router.

But esp32 knows it because it's connected to the network in station mode through that ip address.

kamikazem avatar Oct 13 '23 09:10 kamikazem

hmm, I think this can all be done already in code. Let me test and make an example

tablatronix avatar Oct 13 '23 11:10 tablatronix

This already exists Screenshot 2023-11-17 at 10 30 01 PM

Also you do realize you cannot do anything inside a captiveportal browser right? You cannot do any of that stuff, but you could instruct to copy and paste the ip into a browser 192.168.4.1 etc then add special functionality there.

tablatronix avatar Nov 18 '23 04:11 tablatronix

Hi @tablatronix , Can you provide short guidelines on how did you achieve that? I have this same task now - provide IP address to the user after connecting to WiFi network. As I understand, after connecting to WiFi network, AP of WiFiManager is no longer running, or am I wrong?

Miceuz avatar Nov 29 '23 09:11 Miceuz

Hi @tablatronix I guess steps that i mentioned are doable in a captive portal, however since English is my second language i might not be able to communicate it well , but Step 1,2 and 5 are doable with JavaScript at the client side and 3 and 4 should be doable on the arduino side.

By the way thanks for your response and sorry for my late reply, i missed my email notification.

kamikazem avatar Dec 12 '23 09:12 kamikazem

You can start the configportal and stay connected to wifi at the same time. It sometimes is unstable. But if you start configportal ondemand when connected to wifi it will still be online

tablatronix avatar Dec 12 '23 18:12 tablatronix