Have questions about FETS, transistors, measurement, power supplies, or anything else electrical?

User avatar
By dustystew
#79733 I've just been writing a web server for the ESP8266. Its been done a lot of course. I soon realized that my Mac could only connect to one Wifi AP at a time, and so I had to disconnect my internet connection to be able to access the ESP. Now if I had another Wifi device, or used Ethernet for web, then I suppose I could keep my internet connection and also connect to the ESP. But this is not likely to happen.

After spending some hours making the server work, it took about 5 minutes until I concluded that an ESP web server was more-or-less useless. It was a toy, not practical for daily use.

I'm curious to hear what others think of this. Does anyone have a good practical application for the ESP as a web server? I'm not knocking the device, not being a naysayer. I'm just thinking that practically speaking, the server/AP mode is not that useful, and perhaps not worth investing a lot more time in this effort.
User avatar
By ian
#79738 If I understand you correctly, the simple answer is that any device 'out of the box' has no awareness of which network to connect to, or what password to use.

Using AP mode you can generate a web page which solicits a connection to 'seen' networks. Following user input, the device will connect in station (STA) mode.

You need to think of a bigger picture. You can create a web server at home & HARD CODE it to your network.
Suppose you want to take your device to a friends house. Not easy unless you rewrite your code.

If you want to sell your device how would it work? Easy - it starts in AP mode, the user submits their credentials to a (local) web page & then your device connects to their network as a station.

I think the WiFiManager library will do all of this for you. I don't use it but you might have a look.

Ian
User avatar
By rudy
#79742
dustystew wrote:After spending some hours making the server work, it took about 5 minutes until I concluded that an ESP web server was more-or-less useless. It was a toy, not practical for daily use.

I'm curious to hear what others think of this. Does anyone have a good practical application for the ESP as a web server?


The ESP should be on your network. AP mode allows you to connect it to your network. Once it is on your network you would have convenient access to whatever web page you want to make available.

Yes you need to connect to the ESP AP to be able to tell it the network to use and the password. Just like you had to do with the internet connection you have with your router. It didn't happen automatically. Any device on your local network had to be configured. The ESP is no different.
User avatar
By torntrousers
#79761
dustystew wrote:... I soon realized that my Mac could only connect to one Wifi AP at a time... I concluded that an ESP web server was more-or-less useless...practically speaking, the server/AP mode is not that useful...


The ESP web server/AP mode might not be so useful for your use case but you can also run the ESP web server in STA mode, so then the the ESP can be on the same Wifi AP as your Mac and you can access the ESP web server from your Mac without disconnecting.