Chat freely about anything...
User avatar
By morcillo
#64524 Hello,

I have a discovery board running an application and I want to be able to access a web page hosted within it and display data. I have checked and tested programms using AT+ commands for websockets and HTTP and they work properly.

But the thing is that I want to be able to execute this anywhere, not just my network, so I ant to implement something like WifiManager (Arduino) but using AT+ commands.

From what I've seen I can set ESP8266 to be a dns server, but I don't have further control over it, I can't redirect those that connected to its softAP to a configuration website (am I wrong?). Before starting to implement this by hand using a UDP connection I wanted to check if there wasn't an easier way for me to do this using already available AT+ commands.

So...should I further study the AT+ commands or should I get started in implementing it using a simple UDP?
User avatar
By MHeys
#65081 Bit of a long shot as I haven't done much with the AT command set since getting my first ESP quite a while ago and switching over to the Arduino IDE once it was available.

I'm not sure if it will fully work as I don't know if you will be able to send all the bytes needed for a DNS response over Serial but for now I will assume you can.

In essence you will have to create a UDP socket server (not websocket) on the DNS port 53 and reply to any request with the IP of your device.

I think this is the right command to start the UDP server: AT+CIPSTART=0,"UDP","",53,53,2

And this is essentially the code that WifiManager uses for it's Captive portal, it just sets the domain name to * ... Server.cpp

Hope that's a start anyway