Captive portal for ESP-32

I am trying to create a captive portal for and ESP-32. I am starting with

I can’t compile the cut and pasted event handler.

Is there a library I need to include? Is there a better approach?



That tutorial is for the mongoose network library, not for Mongoose OS.
Mongoose OS uses this branch of the mongoose network library.

Hi nliviu,

Thanks for your help. I got it working with Firefox, Chrome, Edge and Safari using DNS port 53.

I think this tutorial is a little out of date. I had to change to the 4 parameter connection and evhandler to get it to work, as follows:

static void ev_handler(struct mg_connection *nc, int ev, void *ev_data, void *ud)
nc = mg_bind(&mgr, s_listening_addr, ev_handler, NULL))


Mongoose is one thing, Mongoose-OS is another thing. Mongoose-OS is based on one mature version of Mongoose.
The tutorial has been written for Mongoose, not for the particular version that Mongoose-OS uses (the one whose branch Liviu referred you to).
If you are using the latest version of Mongoose (outside of Mongoose-OS, of course) and found an actual problem with the tutorial, please report it at the Mongoose website, not here.