Debaucus
Published on

Pokemon Go Scanning Data

activelinuxraspberry-pidockerpythonreact

Pokemon Go - Mapping the World

I've always been a fan of the Pokemon games, from a young age I grew up with them. So with the release of Pokemon Go, a version on mobile that lets you go find them in the real world, it was a fantastic opportunity to go out and exercise while playing the game!

At the launch of Pokemon Go in 2017, map websites were formed in which you could filter out the local Pokemon nearby to you. This was amazing as you could go catch that perfect Dragonite or a sweet Charizard without having to watch the game 24/7.

Mapping blocked

At some point a few months after launch, the maps where blocked by Niantic, the company running the game. What used to be done by simply requesting from the games API was now blocked, workarounds where found and blocked again. This continued for a few months till a hashing method was used to block maps permanently. It was around this time I stopped playing the game.

Pokevision stops working

Return to the addiction

On a trip to Portsmouth, where I went to university, at a local park I saw a large group of people walking around and some people I recognised from playing I believe 2 years later. I quickly downloaded the game and noticed MewTwo raids were around! I didn't even know what a raid was at the time but got the jist and joined.

I started to play casually again here and there, and during one of my trips to my local town I saw a lure placed on a Pokestop with a name I recognised and contacted them. It was pulling me back into this world socially and I couldn't help but play more and more. Meeting new people and enjoying the game more and more. But one thing was still missing.. scans.

Test my skills

In 2020, I learned that in my local area a group used to do scans with mobile phones. Between the time of the map scanning being closed down and 2020 users had donated old mobile phones to be used for scanning purposes. I will explain the details of this later but the phones were required to be plugged in and run all the time, slowly the batteries died on these phones and this led to scans slowly dying. Additional issues within the group meant no one was leading the recovery and they slowly died out.

I had a spare phone at the time, a OnePlus 3, and knew of rooting android as I had previously customised my phone. So I began the process, setting up my spare phone to be able to scan the area around my house as a proof of concept in order to see if I could do it. I managed it over a weekend of trial and error, but wanted more.

Now with a group of friends, and proof that it was possible, I continued research and learned that the current 'meta' as it were was to use Android TV (ATV) boxes running a custom ROM and having those boxes run Pokemon and walk around the game collecting the data. A huge advantage of this was that these ATV's are designed to be plugged into the mains and run for many hours at a time and be passively cooled. This meant there were no long term issues like a mobile phone from previous years. Additionally a standardised platform meant development from the community was expanded.

Android TV time

I found a community which created a ROM specifically for the task of scanning Pokemon Go running an Android TV, at the time specifically an A95X F1. The goal was to flash over the previous software saved onto the ATV and use the custom ROM. Here are some pictures from that time:

Here is the first Android TV box, you can see the name on the device, and it comes with a plug adapter in order to power it.

The First ATV Box

Bugs, bugs, bugs. This was caused by a flash failing to complete. HDMI could be used for an output to a screen.

Output of failed flash

After a few more debugs, and connecting it up to the main software... SUCCESS! Here is a picture of the ATV when it first began scanning quests locally to me.

ATV Playing Pokemon Go

Expand and Conquer

With this success I set up a local Discord channel for people who wanted to join and support the process to congregate. With a proof of concept now completed the plan was to offer up a deal to the members of the community, if you want scans to expand to where you live, provide the box and we can do that! I was loving the project and was happy to expand and grow the concept.. little did I expect just how bad everyone wanted scans to return. It got pretty nuts pretty fast!

Within 2 weeks, 3 more ATV's had arrived and were now set up to scan, the issue is they had European plugs (my error in ordering) so I needed to get a power strip that supported those plugs. These ATV's were the more powerful TX9s and I needed a stand to get things moving along. A basic switch was purchased in order to network everything up.

Make it work, make it better later

As the number of boxes grew to 10, then 12, it became clear fast that a better large-scale solution needed to be sorted out. I was loving the challenge of each box arriving as it became clear to me I had to think on my feet and be agile in improving the project. Each day more and more Pokemon would be scanned, a larger area could be covered, everything about the project was exactly what I looked for.

A friend in the group, who really came in clutch with the timing, was able to provide a 1U network switch with 24 Ports! This solved my networking problem, next was to solve the power issue. Having 1 wall plug dedicated to each ATV is fine when you have 2 or 3 but as the numbers grew this was unsustainable, the Discord community for the Pokemon Go Scanning software said that USB power was the best quick solution to grow. So that was the next step.

First stand with Networking

Now space is becoming a problem! The ATV's keep coming, so let's keep growing! The goal now is to remove the cases of the A95X F1's and create a tower, and add active cooling in order to keep the scanning running at maximum efficiency.

Second stand with Networking

I only show this step because of the nickname it got. Crafted from old warped skirting boards, with a growing amount of boards and needing more cooling, the Tower of Power was born.

Tower of Power

Forming Friendships, Automation

During this time, I informed the group who previously scanned the area that I was beginning to scan the local area with success and wasn't trying to step on anyone's toes, just making it work and if people join that is up to them. After some back and forth it was decided the best plan would be to partner up for the long term stability success of the scans:

  • They had a massive community of several thousand, all who had previously had scans and wanted them back.
  • The owner of the group was more than willing to join in with the process of hosting multiple ATV's, massively increasing capacity.
  • Many of my friends were already in this group, this meant not spliting any communities.

As months passed, the goal was now automation. I wanted to create a setup that allowed me to 'set and forget' the ATV's and allow scans to run flawlessly, or as close too, without human requirement. This is where a new setup came about.

A 1U 48 Cisco POE switch was purchased, this can be used in combination with management from a Raspberry Pi to flick power to a specific port on and off. Basically power cycling without human requirement. Plugins for the scanning software had already been created, it was just a case of converting ATV's to PoE power.

Additionally, half of the cabling is removed as power cables are combined with networking, this reduces the weight and bloat with the only need being a Raspberry Pi to manage the software. A fair amount of setup is required to begin doing it this way, but in retrospect I would have started with manual restarts with PoE plugs still as this would have been a better plan long term regardless.

Third Stand with PoE Networking and Power

And of course, dark mode.

Dark Mode ATV's

Final thoughts

This current setup now resides in the house attic as it doesn't need any manual intervention for several months at a time (nothing is perfect). The fans inside the network switch have been switched out for silent type ones, a few PoE power adapters have broke and needed to be swapped, but its honestly awesome having made this project.

The friends I have made, the skills I have learned, the communities I am now a part of! I am always aiming for impovements and you may well see an update soon on this project, it continues to grow and I am keen to aim for maximum scanning power.