Hello! I have created an Android app that logs cell phone signal data. I used the app as part of a personal project to locate cell phone towers in the town that I am living in.
I came across this post discussing utilizing the Kalman filter for locating an device near Wifi signal. After briefly seeing if something similair can be done where I’m living I determined it wasn’t given the space and tools present. Full of hope, I wanted to check if it possible to do something similar for cell signals. This provided the perfect excuse to create my very first android application that can be used to log the cell signal strength at your location along with the GPS location. Here are the two relevant app files:
AndroidManifest.xml
MainActivity.java
The application when run on your phone(tested on Android 6.0) immediately prompts to save a file to a directory(the default file name is to be left unmodified). After creating the file the app displays the text being appended every single second to the created file. The app has no real UI - I wanted to get to analysis ASAP and this stackoverflow assisted creation was sufficient for that objective. A sample logged line is below:
The first number is the timestamp and second number signifies that this line is the 258th logged entry (approximately 258 seconds after starting the app). LAT and LON are place holders for the GPS location which have been anonymized (along with mCI) and the rest of the line is information on the cell signal. The relevant stuff are the CellSignalStrength and specifically ss measured in dB. The signal strength will be primarily used for finding the tower. Sometimes the cell phone will pick up multiple signals and so the there will be multiple CellInfoLte entries within the square brackets. Based on this some of the CellIdentityLte are identified as
These codes are used to identify the tower. The CellSignalStrengthLte is broken down here:
I used a python script (parseCellData.py) to analyze the text files
Useful posts for tracking cell phone towers based on cell signal strength:
Engineering stack exchange was one of the first discovered. It was discouraging to say the least. It looked like I needed to read a lot more and discover more parameters in order to find the cell tower. (related: link)
Stack overflow discusses computing computing distances in the wifi context. The formulas looked simple enough, but wasn’t sure how to extend it to my context.
Stack overflow Discussed computing an individual’s location given that the cell tower locations and signal strengths are known. This gave inspiration for using the computer cell tower locations later on.
Stack overflow,Stack overflow discovered the cell tower locations by looking them up in a public database (given that they are even available). This seemed like a cop out. There were already resources listing displaying cell tower locations across Canada - I wanted to derive it myself.
Free-space path loss concept was mentioned in previous posts. The wikipedia article like the engineering stack exchange post left me with more questions than answers.
Paper 1, Paper 2 gave more insight into using towers to locate cell phone location as well as signal strength maps(something that I am trying to recreate with my walks and car ride - could I reverse engineer somehow?)
Paper 3 provided break through. The paper described creating a positioning system based on cell towers. Since they did not have access to cell tower locations had to locate themselves. To collect data, they drove over 4000km - covering a 25km by 18km. A lot more than I plan to do since I am stationed in a small town, but still daunting. They did not know the cell phone tower locations to begin with and ended up estimating their location based on “averaging the places where the highest signal strengths in each cell was observed”. This adhoc approach provided average error of 56m and maximum 76m. The error for positioning using the calculated cell towers was significant and for GPS would be unacceptable.
Paper 4. The previous paper was dated 2006 - looking at authors who have cited the paper a 2010 entry was found. This described the process of recording data around town as wardriving!!! Lots of useful information to consider. There are two algorithms considered and compared - the average approach (from previous point) and another. The conclusion was “blindly applying these algorithms to estimate cell tower positions results in very large errors”. They introduced approach to avoid the errors, but for the small town I’m in, I hope it will be unnecessary.
Paper 5 from 2013 provided another approach but it was not for me.
Stack overflow The new approach mentioning using TA parameter (time advance), but due to (apparent) tower difference this value was always zero for me and therefore not useful. link mentioned Google building their database of cell tower locations via “crowdsourcing”.
Hata model free-space path loss led me here. Models are used by telecom companies to predict areas where coverage is low/high in order to optimize tower placement. This led me to the idea that by matching these models to the data, I can estimate the tower locations based on signal decay rate.
Model comparison - compared different models including Hata. I was unfamiliar with some of the terms so I sought an easier explanation: a thesis on the topic (great source!!!).