kclejeune / TMobile-ISP-Client

mobile friendly, self hosted status dashboard for T-Mobile ISP routers
MIT License
33 stars 4 forks source link

Feature: link to CellMapper #7

Open kclejeune opened 2 years ago

kclejeune commented 2 years ago

https://reddit.com/r/tmobileisp/comments/r6vhl6/_/hmxzbj7/?context=1

Calculate the actual tower id (from what is shown in the API), and create a link that will do a search on cellmapper.

mlb_fan_ · 15h

In the home internet app go to the Cell Metrics section and check the number in the CGI field.Note the first 6 digits of the CGI for later, then drop them from the number.Divide the new number by 256. The result is your tower ID. (if it's not a whole number ignore the decimal part)On cellmapper, set the proper Provider field in the sidebar using the CGI prefix from before.If it was 310260 select T-Mobile USAIf it was 312250 select SprintIn the Tower Search box enter the ID you calculated and press enter to run the search.Click on the tower in the results box that appears to center the map on it.

According to mlb_fan, this is the logic you need.

highvolt-dev commented 2 years ago

You can't directly link to an eNodeB with Cellmapper.net

Their search field does an API request the response to which contains JSON that warns against unauthorized use and provides a lat/lng for its geolocation; the link in the results modal/dialog centers the cellmapper map on the coordinates of the given tower.

I addressed this in https://github.com/highvolt-dev/tmo-live-graph/commit/1f970f799cfb6007370831952bc3c7bef639eae4#diff-25a6634263c1b1f6fc4697a04e2b9904ea4b042a89af59dc93ec1f5d44848a26 by looking up the MCC/MNC and crafting a link to center the map at the geographic center of the US with the zoom level adjusted to a national level. I then display the eNB ID alongside the link so the user can copy/paste it in the search field on cellmapper.net.

You could improve this by attempting to use the HTML5 Geolocation API which could be useful for users on mobile devices.

Either way, there's no direct/deeplinking strategy for pulling up a given tower and showing its details on cellmapper.net.