since “metered connection detection” does not seem to be a standard across platforms, I’ve tried to collect the best settings to tell devices not to perform massive downloads while connected to our open wifi hotspot.
Microsoft, iOS and Android all do it a little bit differently, and so far the only show stopper to satisfy all my requirements is the limited implementation of coova chilli which doesn’t seem to (currently) support DHCP Options.
MS-NCT - Microsoft Network Cost Transfer Protocol:
The way Microsoft does it is explained in OpenWRT Docs here: https://openwrt.org/docs/guide-user/network/wifi/ms-meteredconnection
This can be configured in the CLI like this:
uci delete wireless.radio0.hostapd_options uci add_list wireless.radio0.hostapd_options='vendor_elements=DD080050F21102000200' uci commit
Unfortunately iOS doesn’t care much about the MS-NCT … or at least I couldn’t verify that it cares.
Mimicking an iOS hotspot
iOS uses a quite similar approach but a different payload, fortunately Microsoft recognizes this too (at least Outlook spits out the message, that’s how I verified it).
uci delete wireless.radio0.hostapd_options uci add_list wireless.radio0.hostapd_options='vendor_elements=DD0A0017F206010103010000' uci commit
After that the hotspot is shown with a iOS hotspot symbol in the wifi connection menu of iOS.
The Android way
sadly none of those settings result in my Android 14 to recognize a metered connection so I had to add DHCP Option 43 “ANDROID_METERED” to make this work. This can be done in the advanced DHCP options of the network settings in the gui.
Network > Interfaces > Edit > DHCP Server > Advanced Settings > DHCP Options
Sadly as mentioned above, this is (to my knowledge) not compatible with hotspot (1.0) mode because coova chilli has it’s own DHCP server and those settings can’t be configured in detail. See my other topic for a possible future solution:
Bandwidth and Quota Limits
Initially, I’ve only limited the daily download bandwidth (to 1 Mbit) and volume (to 1 GB) to keep costs in check, but without the other settings clients would complain that the quota is too low which was the original reason I investigated other options.
*Limiting large downloads
The next idea I came across was to limit larger downloads with iptables as per this topic, but I haven’t looked into this:
hope this is helpful for others!