News for hackers. Stuff that matters.
Re:How Android knows it's on an expensive connection by PeterisP on Sunday August 04, 2013 @11:50AM (#6155956)
Why should my phone send out strange flags (that disable sync features) just because it's used as a hotspot?

At least for me, phone traffic is free, and if some device needs to sync some photos the software shouldn't disturb it because somewhere (USA?) has nonfunctioning competition in mobile connectivity.

For example, for my Android tablet the usual network connection is my phone hotspot - how would I even know if some feature is waiting for "nonexpensive connection" that is not going to come any time soon?

Re:How Android knows it's on an expensive connection by kllrnohj on Sunday August 04, 2013 @05:17PM (#6157132)
> At least for me, phone traffic is free

What magical land do you live in that has truly unlimited cell data? And how much does it cost?

> how would I even know if some feature is waiting for "nonexpensive connection" that is not going to come any time soon?

The feature is typical used for things like when you enable "only do this on WiFi" type options, it knows that although it is connected to a wifi hotspot, that hotspot itself is using cell data so don't do that expensive thing that you said to only do on wifi.

Typically the worst thing that'll happen is you will get a few "are you sure?" style dialogs when you go to install a large game or similar.

Re:How Android knows it's on an expensive connection by buro9 on Sunday August 04, 2013 @06:44PM (#6157394)
> What magical land do you live in that has truly unlimited cell data? And how much does it cost?

Three in the UK. GBP 15 per month for an unlimited data plan.

It's only 3G, but they've committed to provide 4G for no price bump once they've finished their rollout later this year.

What else? Hmm... I used 7GB last month. Spotify mostly, some Ted talks too. No-one's complaining, it really is unlimited cell data.

Re:How Android knows it's on an expensive connection by tadfisher on Sunday August 04, 2013 @06:21PM (#6157329)
T-Mobile (US) has never gotten rid of their unlimited data option. Up until recently, they had a 5GB cap whereafter they would throttle the connection to EDGE speeds; they have since replaced this with a generic "don't abuse the network" policy, which I have yet to trigger (some months I have gone over 10GB of usage).
Re:How Android knows it's on an expensive connection by MacsHeadroom on Sunday August 04, 2013 @10:42PM (#6158123)
This unlimited LTE and HSPDA+ 4G plan by T-Mobile is $30/month, for those interested. But only if you buy the start up kit from Walmart. The plan is $70/month otherwise.
Re:How Android knows it's on an expensive connection by PeterisP on Monday August 05, 2013 @07:48AM (#6159558)
I'm in Europe, my monthly cell bill is ~20usd - it's not truly unlimited as it's slightly speedcapped after 2gb, but there is no risk of unexpected costs. True unlimited would be probably twice that.
Re:How Android knows it's on an expensive connection by ori_b on Sunday August 04, 2013 @11:59AM (#6155981)
Because the alternative is burning through someone's very expensive data, and costing them thousands of dollars. It causes less harm to avoid automatically burning bandwidth.
Re:How Android knows it's on an expensive connection by JangoSteve on Sunday August 04, 2013 @12:32PM (#6156060)
That's not true. The alternative is to have the Android request the data from the DHCP and only then have the tethering DHCP respond with the flag. Keep in mind that, if you're the one programming the tethered device to obey this flag, then you have the ability to make the tethered device request the flag in the first place.

Also, once it's on a request-only basis, it shouldn't be a stretch to make it possible to disable via a configuration setting.

The above two points I believe were the point of the OP.

Re:How Android knows it's on an expensive connection by remosi on Sunday August 04, 2013 @12:42PM (#6156096)
Having written the document that this links to, my goal of pointing out the surprising behaviour with android not requesting an attribute it cared about was to avoid other people banging their heads against this problem when they tried to implement this solution.

This is obviously an incomplete feature: The TODO shows that they intended to actually plumb through the "metered" bit from the upstream interface, but never implemented it.

And this is a default, I suspect you can override this, either in the individual applications, or by disabling the "hotspot" option in the buried menu.

Yeah, it's a bit annoying if it's your default way of getting to the internet, but it's at least not going to cost you a massive pile of money as it sync's everything before you have a chance to turn off all the syncing. This way you can at least turn the syncing on again later if you're ok with it.

[Edit: speling]

Re:How Android knows it's on an expensive connection by sbierwagen on Sunday August 04, 2013 @04:36PM (#6156994)
It'd be nice if there was a programmatic way for the upstream bandwidth provider to communicate cost-per-gigabyte. That way the client wouldn't have to use hackish workarounds to guess if it's on metered bandwidth-- it'd know so.

If cell networks communicated cost-per-gigabyte, then a dual-SIM phone could automatically switch to the cheaper data. This would cause a crash in bandwidth prices, which is why the phone companies would have to be forced into it, probably by the FCC.

After thinking about it for more than three seconds, there's actually two figures of merit: cost-per-gigabyte and width of the desired network connection in bits/s. A gigabyte transfered at a kilobit per second is a lot cheaper than one sent at a megabit/s. Sending a text message from a phone is cheaper than a voice call, which is cheaper than watching a 720p video. So you'd have to have some kind of sliding scale, adjusted by how many other clients there are in the cell, and how much bandwidth they're using...

This seems all very obvious. Has this scheme been described in an RFC from the 80s that I've just never heard of?

Re:How Android knows it's on an expensive connection by remosi on Sunday August 04, 2013 @05:54PM (#6157243)
There are complications, some IP's might be free, some might be cheap (caches, local peering), some might be expensive (transit). The price might vary on time of day (a lot of eyeball networks are near idle when everyone's asleep). The price might vary on the DiffServ bits. Then there's the question of what is it billed in (what if one connection is billed in GBP and one is billed in USD?). Maybe one connection has the first 1G free. Should you advertise the entire connection as being free until you hit that 1G, then advertise it as the overage? Or should you do something to try and make sure that the 1G lasts the entire billing period? If it's a peering connection, maybe it's free so long as the in:out byte ratios are within 10%, so how do you represent the price of that?

But for the simple version, I think RSVP is supposed to kinda support this, but it would probably be difficult to shoehorn in, even ignoring all the stuff I mentioned above.

Re:How Android knows it's on an expensive connection by kennywinker on Sunday August 04, 2013 @04:44PM (#6157018)
If I understand the article correctly, the disabling of sync etc. is done by the device CONNECTING to the hotspot, not the device providing the hotspot. The hotspot just notifies downstream users "hey, I'm on a metered connection". If you connect with your laptop, it ignores the flag and sucks up as much data as you want it to.

The only point about your android phone PUSHING the flag, is that it's not a non-standard implementation of the protocol. If you want to disable this on your phone, you have to tell it to ignore that flag, rather than tell it to not request it.

Re:How Android knows it's on an expensive connection by PeterisP on Monday August 05, 2013 @07:58AM (#6159584)
The whole concept of putting 'mobile data' and 'thousands of dollars' in the same sentence is an abomination that needs to be fixed - unless you're in Antarctica or on the ISS. Even maximum theoretical 4g speeds sustained at 24/7 (which would mean dedicated hardware/cell channel just for you) don't justify thousands of dollars per month - in countries where mobile competition works, companies can buy a service just like that far cheaper.
Re:How Android knows it's on an expensive connection by remosi on Sunday August 04, 2013 @11:58AM (#6155976)
I assume because it's "metered" (ie, billed by byte). The TODO suggests that this should be figured out rather than always enabled.

You can go to "Settings > Data usage > ⋮ > Mobile Hotspots" and maybe that's related? I've not checked/experimented. But it's possible you can go there and disable the feature for that AP.

Re:How Android knows it's on an expensive connection by jevinskie on Sunday August 04, 2013 @01:34PM (#6156292)
Because an engineering decision (probably US-centric) was made to do it in a quick, hackish way. I'd say "patches welcome" but I'm not sure how easy it is to contribute to AOSP.