Being close to the airport, setting up an ADS-B receiver for flight tracking was always on my agenda. I eventually got to it earlier this year by getting the RTL-SDR kit. However, it was plainly an on-and-off affair as I had no inclination of keeping my laptop on 24/7 just for flight tracking.
A bit later, I came to know of PiAware that basically feeds the data to FlightAware and in return, you get an Enterprise account for your troubles. The catch though was that I did not have a Pi and FlightAware officially only releases images for the Pi. A Pi Zero would have been apt for the purpose, if only it did not have zero availability (not sure that is what the Pi foundation was aiming for with the name).
It thus came down to making the most of what I already have. What I did have was my 8-year old, trusty Dell Venue Pro 7140. For a period of time, I did have a Pi 4, until I realised I could do everything that I was intending to do with a Pi on the 7140 itself. So, the Pi found a new home and the 7140 became the media server, scraper, downloader, time/news/waether dashboard with remote access and VPN.
The challenge though was that unofficial support for PiAware extends only to Linux and the first order of business was to try out Linux on this tablet. While all the distros I tried on it did work very well, the only aspect that I couldn’t replicate on Windows was the dashboard as I use Rainmeter for that and there is no like-for-like equivalent on Linux that does the job (though conky comes close). Thus, it was back to the drawing board.
Having decided that I had to stick to Windows (after trying out Linux), the first thing I did was to update the tablet to Windows 11. If you are wondering how a 8-year old tablet can officially run Windows 11, well it cannot. However, it doesn’t stop one from doing what Microsoft doesn’t want you to and what do you know, the Rufus Beta which fixes a lot of Windows 11 annoyances, had a timely release for my purpose. Spoiler alert, Windows 11 works fine even on a dual-core 5th gen Core M processor with 4 GB RAM.
Linux on Windows is not an alien concept anymore and most would recommend using the Windows Subsystem for Linux (WSL) to get “Linux things” done on Windows. Unfortunately, in this case, it does not support USB devices connected to the host system (Windows) which meant it was not an option. Thus, it came down to using virtualisation. The problem with virtualisation though was that it is resource intensive, and I was apprehensive of it handling virtualisation in addition to all the other stuff I have been running on it 24/7. Well, I didn’t really have a reason to worry.
The first thing to do was to select a distro that could run virtualised on the tablet without taxing it out. While, it may not be a choice of hardcore users, I chose Ubuntu Server due to its support, which makes troubleshooting a lot easier. All one has to do is to boot off the ISO and then complete the setup in the virtualisation software, which in my case was VMWare.
After installing Linux on VMWare, there were a few challenges:
- Installing PiAware on Ubuntu
- Logging in automatically so that PiAware runs on boot
- Running the Virtual Machine on boot unattended
This took some time to sort out and thus I lay my final solution before you for each of the above items:
1. For setting up PiAware on Ubuntu, I recommend this guide as it sets everything up in a jiffy
2. Logging automatically into Ubuntu Server was a bit more involved process and goes as follows:
a. The first part involves editing the logind.conf file as follows:
sudo nano /etc/systemd/logind.conf
and change
#NAutoVTs=6 to NAutoVTs=1
b. Then, it is about setting up systemd:
sudo mkdir -p /etc/systemd/system/getty@tty1.service.d
sudo nano /etc/systemd/system/getty@tty1.service.d/override.conf
c. The override.conf file has to contain the following:
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin <username> --noclear %I 38400 linux
d. And then, it is about loading and enabling the service:
systemctl daemon-reload
systemctl enable getty@tty1.service
reboot
3. The final part is having the Ubuntu VM running unattended at boot. In my case, since I was using VMware Workstation, it can be done simply through a batch file that is to be executed at boot.
The batch file is simple to set up. It is simply a text file saved with the .bat extension on Windows and needs to contain the path to vmrun.exe along with the start command pointing to the .vmx file corresponding to the virtual machine. The ‘nogui’ option ensures that the execution occurs silently in the background.
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" start "<path to VMware Virtual Machine folder>\Ubuntu.vmx" nogui
This batch file can be executed at login using the reliable Task Scheduler. In this case, it can be setup as a program that needs to executed on user login. Depending on the horsepower of the device, this may take a bit of time. Hence, it is recommended to also probably delay this action a bit in Task Scheduler if there are too many things running at boot.
And that’s it! PiAware will start with the Windows device and run silently in the background. A great use of an existing Windows device, if you happen to have one lying around.
How well your site works will depend on your location. Using an existing tablet does limit where the antenna can be placed and in case of my site, it limits the data collection, but that is still better than blowing a fortune on a Pi in the current scenario, provided you can find one.