5 ms·
On a related note, this same mechanism can be used as a fallback for GPS to determine device location. I have worked on an IoT device with builtin SIM in the p
by vbsteven 5y ago
On a related note, this same mechanism can be used as a fallback for GPS to determine device location.
I have worked on an IoT device with builtin SIM in the personal alarm space. Often when a device is indoors no GPS fix can be found, but the GSM module can report all celltower ids in range with signal strengths. These can be used to triangulate the device location. Google has an API for this where you can pass celtower ids and signal strengths.
edit: and of course similar triangulation fallbacks/methods can be applied to WiFi AP's or Bluetooth Beacons, if you have a database with APs or beacons and their location. This database can be externally sourced but also built automatically by sending celltower ids/aps/beacons along with GPS fixes. I assume this is one of the many things Google is doing with their fleet of Streetview cars.
- deleted 5y ago[deleted]
- masklinn 5y agoI believe iOS may not bother involving the GPS if the application requests (or is only granted in iOS 14) approximate location, and there are enough towers in-range to triangulate. Not having to enable the GPS subsystems and get a fix saves a fair amount of battery.
- franga2000 5y agoIt's the same on Android - there's an "eco" mode of the location subsystem which will only use "passive" location indicators like WiFi and cell towers. In the "high accuracy" mode, GPS* will be activated, but until it lock onto enough satellites, passive location is used as a fallback/best guess.
- grishka 5y agoPassive isn't that. My understanding is that it's piggybacking on other apps' location requests if there are any.
- franga2000 5y agoI might be wrong, but I think it's used for both. *EDIT:* I've looked around and I must've been misremembering - the term "passive" is only used in the official docs when talking about passive location updates (there called the passive "provider", since to the app, it looks like one). The non-GPS category of providers (wifi, bt, cell) is just called "network". ~~Passive location requests are, as you say, when an app wants location updates, but doesn't care when and how often - when one makes an active request, all the passive listeners get called. Passive location sources are methods of getting your location with the data already available - so WiFi if it's on and cellular if the modem is on.~~
- rurban 5y agoI'm doing same right now. My cheap soc has no gps module, which would need too much power also, but I can trivially get the tac+cellid from the AT+CEREG command, which have to do anyway to check network connection (I have no roaming with NB-IoT). And from this you can externally get the lat/long gps values via the OpenCellID database. They protected queries, but you can get the source also as csv. Didn't know about the Google API, but it's trivial to build something like this by yourself. In my case I don't even need the gps coords, the cellid is enough, as my devices travel on fixed lines through various countries. For cars or buses you would need it though.
- franga2000 5y agoIsn't there a specific GSM command or whatever they're called to request location from the provider? I remember seeing it in a GSM module datasheet at some point, but I never tried it.
- rurban 5y agoModem specific. In my case AT+CEREG? in modes higher than 1 will tell you the connection status, tac and ci
- kqr 5y ago> I assume this is one of the many things Google is doing with their fleet of Streetview cars. ...and Google services-enabled Android smartphones. Source: I have used a single access points in many locations across the country in a relatively short period of time. When there's no GPS fix, Google always thinks I'm where I just was. (And there are no Streetview cars in some of these locations.)
- londons_explore 5y agoIf an access point moves more than a few times per year, it will be blacklisted from Googles location database as unreliable.
- kqr 5y agoThis AP definitely moved a few times per year, so it must have skirted just below that threshold, then.
- rjmunro 5y agoI wish they would do that a bit more preemptively. Maybe things have improve, but sometimes when I went to an event where the WiFi was temporarily installed I was instantaneously transported hundreds of miles, presumably to the WiFi providing companies last job. It should have been able to figure out that this was nonsense based on the unfeasible speed of travel, or from the fact that the area covered by the cell I was in did not contain the WiFi location, or probably from other WiFi networks in the area that hadn't moved.
- Zenst 5y agoOr your Wifi MAC gets tagged by a streetcar at one location, you move and google still things your at the old location. Had that, they even have way to feed that back iirc and was able to get that updated without a driveby of a streetcar. Note this was over ten years ago and WiFi density has increased.
- vbsteven 5y agoIt can still easily happen in 2021 simply by moving an existing WiFi AP to a new location where the WiFi space isn’t crowded.
- philo23 5y agoThis is also how the original iPhone + iPod Touch got your location without any GPS hardware, so you could see your rough current location on the map after one of the early updates.
- gtsop 5y ago> I have worked on an IoT device with builtin SIM in the personal alarm space Are there any resources to that project? Comercial or free?
- vbsteven 5y agoIt was a commercial project for a client I cannot link. Nothing exotic though. Just a little smartwatch-type device with soc/mcu/gsm/gps, 1 button and a led display. It only had 2G which is already retired in some countries and I don’t know if they’re doing an 3/4/5G refresh. A fun space to work in though. A space where a small bit of tech can save lives and where tracking is actually helpful. Edit: but stressful as well. As bugs in the code or platform can lead to people in distress not getting the help they need.
- grishka 5y agoOriginally, that's what the distinction between the two location permissions on Android was about. ACCESS_COARSE_LOCATION was based on cell ids and wifi networks, and ACCESS_FINE_LOCATION used GPS. In modern Android versions I believe this is no longer true as it uses all the sources either way but intentionally degrades accuracy for apps that only have ACCESS_COARSE_LOCATION.