Xiaomi 4C Simple Hotspot Help for newbie

Hello everyone! New on the forum and new on the OpenWrt world as well... have done some simple home server projects with raspberry pi and what not before, but always wanted to make a custom hotspot router. Found Mi 4C Router is able to run OpenWrt so here I am.

My Project Idea
We barely use Wifi on my business, yet we have to pay it, so I want to share it with customers and people walking by for free, add some restrictions and make it a marketing strategy.

Wanted Features
-Something like a Captive Portal without password, possibly asking people to write their email (And store them so I can do email marketing with the list later) and click on "Connect" but I would really like it to redirect them to my website after that.
-Limit bandwidth.
-Limit Maximum number of users connected.
-Possibly add some websites to a blocklist preventing common porn sites.
-Add time restrictions to prevent connections outside business hours.
-Allow each user to stay connected only for 5min then having to reconnect and go to Captive Portal again.

My question is: Is it even possible? perhaps something close to what I want, I know Mi 4C isn´t that powerful so yeah. By my research seems like CoovaChilli would be what I need but I'm kinda lost.

Thanks in advance to everyone! :smile:

Make sure you are on OpenWrt 22.03.3.
The 4C is ok for flash (16MB) but a bit short on ram (64MB) but should be ok.
For the captive portal, just install openNDS:

opkg update
opkg install opennds

openNDS should start in a totally self contained mode.
Connect to the WiFi with a mobile and you should be redirected to the splash page sequence.
This is a simple click to continue process but serves to test all is working.

You can then switch to username/email mode with a simple config change.
After that you can do all sorts of customisation if you wish.

See the documentation here:

You can ask for more detailed help on Github at:

1 Like

Thanks a lot! So bandwidth and usage limiting is also done from OpenDNS Configs?

OpenNDS is the captive portal. OpenDNS is something else entirely.

Yes, upload and download volumes and rates are set in the config and can also be overridden on a client by client basis.