Cell tower location based on InControl device API

I am trying a little project for fun. I track the location of a ship and display it on a Google map. All works great. Then I thought about plotting the tower to which the ship was connected, perhaps even drawing a line between the two.

I fired up the InControl API for the first time, and found I can get detail on the tower:

"cell_tower": {
                        "cellId": 44777,
                        "cellPlmn": 302610,
                        "cellUtranId": 230993641,
                        "lac": 45006
                    },

From another thread, I learned that on the first call to the API, the tower location is not present. But that call will trigger a request to the Peplink router to push up the information. Sometime in the next couple of minutes a subsequant API call will return the tower details.

The site https://opencellid.org/ looked like it had an API call which would return the tower location. However, it wants the following details in the API call:

image

The cellPlmn from Peplink I found is the Public Land Mobile Network (PLMN), which is a conjunction of the MCC (Mobile Country Code) and MNC (Mobile Network Code). So we now have:

image

And I get back the tower location!

image

Or via the API:

C:\Users\ayates>curl "https://opencellid.org/cell/get?key=xxxx&mcc=302&mnc=610&lac=45006&cellid=44777"
<?xml version="1.0"?>
<rsp stat="ok"><cell lat="42.6828" lon="-81.0943" mcc="302" mnc="610" lac="45006" cellid="44777" averageSignalStrength="0" range="2068" samples="1" changeable="1" radio="" rnc="0" cid="0" tac="0" sid="0" nid="0" bid="0" message=""/></rsp>

Allan.

P.S. I did find these threads, and Cell Mapper looked interesting, but I could not get it to work.

1 Like

This is great Allan!