LibreTasks icon indicating copy to clipboard operation
LibreTasks copied to clipboard

Enhancement request: action on enter/leave WiFi or mobile base station

Open GoogleCodeExporter opened this issue 9 years ago • 2 comments

Hi!

I'd like to use omnidroid as an indicator for when I leave my home and arrive 
at work and vice versa. I rarely use GPS as it drains my battery additionally 
but have WiFi on most of the time.
Maybe it also is possible, if a set of mobile base stations come into/get out 
of reach.

In these events, I'd like to send an email via my corporate exchange access 
with some information like date/time (email sending may be delayed) and the 
name (or alias?) of the WiFi network / mobile base station.

Cheers,
Alex.
P.S.: Thanks for the open source. Highly appreciated! Found the app on F-Droid 
app store.

Original issue reported on code.google.com by [email protected] on 13 Jan 2014 at 7:47

GoogleCodeExporter avatar Apr 05 '16 23:04 GoogleCodeExporter

oh, sorry for the duplicate. I searched for WiFi, not Wi-Fi ... %-}

Original comment by [email protected] on 13 Jan 2014 at 7:50

GoogleCodeExporter avatar Apr 05 '16 23:04 GoogleCodeExporter

For wifi see #188.

Mobile base stations are a bit trickier as phones occasionally move to a different base station even when they are stationary (the carrier may initiate this to prevent overload of a particular cell). Also, the base station may change if the phone switches between 2G/3G/4G, which may happen when entering buildings.

To make matters worse: 3G/4G don’t ever give you the full address of any other cell than the one you’re currently connected to (neighboring cells are identified by a scrambling code, which is unique only in its immediate neighborhood). With 2G you might get neighboring cells, but not all phones expose that information through their API (Samsung phones are notorious for not doing so).

My concern is that it’s difficult to get an exhaustive list of all base stations serving a particular location, (in addition to UI design being really tricky) and an incomplete list will mean the event will not fire reliably.

Looking at the cell ID format, GSM-like networks (EDGE, UMTS and LTE) have roughly the following address format:

  • MCC (country code)
  • MNC (network code), identifies the carrier
  • Location code
  • Cell ID
  • Scrambling code (3G/4G only), an alternative identification which is unique only within the immediate neighborhood

An alternative would be to use just the country-network-location triplet, sans the cell ID. That has fewer options IDs to track, but has the following implications:

  • If you live just two blocks away from your office, you are likely to stay within the same location code and the app won’t even notice you went to the office or back home.
  • If not, the event may fire a few km before you reach your destination or, respectively, not until you are a few km away from it.
  • If you switch between 2G/3G/4G, the location code may change (depends on how the carrier has designed them), which may again confuse the app.
  • Same if you are roaming between multiple carriers (or your carrier has recently merged with another and allows its customers to use both networks)
  • If your destination is just in the border zone between two location codes, similar problems as with the cell ID arise.

Conclusion: Cell ID is hard to get right (for the user); location code is less granular (down to a city or part of a larger city) and still not trivial to get right.

mvglasow avatar Feb 26 '17 00:02 mvglasow