Best "metered connection" settings for public mobile hotspot? (in public transport setting) - RUTX12

Hi,

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.
Source:

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
Source: https://www.lorier.net/docs/android-metered.html

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: https://community.teltonika.lt/t/force-send-dhcp-option-43-in-hotspot-with-rutx12/2821

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:
https://unix.stackexchange com/questions/229403/rate-limit-network-but-allow-bursting-per-tcp-connection-before-limiting

hope this is helpful for others!
Cheers!

1 Like

Good finding. Having done a lot of various hotspot systems, using coova, users complaining about 1GB/day limitation I would have simply ignored. OR offered a payed hotspot subscription. For public transport, I integrated some kind of media server into the hotspot, using extensive local storage for movies, games, ebooks, music, to avoid too much free mobile internet usage.

thanks for your suggestions. I’m kind of aiming to provide the minimum requirements dictated by our client (regional public transport association) while keeping the costs as low as possible. I don’t think anyone would pay for a premium hotspot, nor do I want to deal with licensing or curating of locally stored content.

I’m hoping that force-sending DHCP option 43 will be implemented in coova chilli and subsequently in Teltonika GUI, that would be the ideal solution for me.

This topic was automatically closed after 15 days. New replies are no longer allowed.