Introduction
Wardriving in extreme environmental conditions serves several important purposes and offers unique advantages such as assessing the coverage and reliability of wireless networks in areas that may not have reliable infrastructure. Also, wardriving allows for the identification of existing wireless networks and potential alternative communication channels that can be utilized for emergency communication and response efforts. With the proliferation of IoT devices, there is a growing need for connectivity in various environments, including extreme ones such as rural areas, wilderness, or industrial sites. Wardriving helps in identifying suitable locations for deploying IoT devices and assessing the feasibility of wireless connectivity in these environments.
Goal
I aim to investigate the feasibility and effectiveness of wardriving in extreme environmental conditions with a focus on the unpredictable weather patterns of my city in Germany, where frequent rain and snow pose challenges to wireless networks. Wardriving is the practice of surveying and mapping wireless networks while in motion (usually in a car and that is the reason it is called wardriving).
During this project I will develop an extreme environment proof wardriving system capable of operating effectively in Germany's unpredictable weather conditions. The system will consist of PI4 Compute Module, RF antenna, alphanumeric display, and IP68-rated enclosures to ensure resilience against moisture, dust, and impacts. By integrating advanced sensor technology and wireless communication capabilities, the system should scan and map wireless networks, including WiFi, Bluetooth, Zigbee, and other protocols. It should also collect environmental data such as temperature, humidity, and precipitation with sensors got from other Element14’s giveaway.
I will conduct field experiments in various area around my city and outside to evaluate the system's performance under different weather conditions. I will use my bike since I don’t have a car (so it is important the system is shock resistant). Also, I can test it while taking the public transportation. I will analyze the data to identify patterns, trends, and potential areas for network optimization or infrastructure improvement. There are already existing projects to convert a Raspberry Pi into a wardriving unit. I will follow the instructions in this GitHub repository and I will try to add the function to collect other data like temperature and humidity. I like the idea I can connect the RP4 module to my smartphone via SSH and read data from there as well.
https://github.com/evilbyt3/warpi
Materials
- Pi 4 Compute Module I/O Board
- Raspberry Pi4 8Gb (for comparison)
- IP68 Enclosure
- Antenna
- USB GPS Dongle (for method 2) https://www.amazon.de/dp/B07MY2VD3H?psc=1&ref=ppx_yo2ov_dt_b_product_details
- GPS Module (for method 1) https://www.amazon.de/dp/B08R5ZQX4L?psc=1&ref=ppx_yo2ov_dt_b_product_details
- USB to DC cable
Method #1
I tried to follow the instructions for manually installing the setup to convert the raspberry pi into a wardriving machine like in the Github but there were several problems. I will explain how I fixed them rather than explaining step by step how to install it to not repeat the Github. First of all, the custom image didn’t work so I had to manually install it.
For this method, I used Raspberry Pi OS 64 bit from the Raspberry Pi Imager.I suggest you to use nano to edit the files since it is easier than vim and you don’t need to install it.
I am not sure why but the schematic to connect the GPS module is completely wrong in the Github. The Rx pin of the GPS module should be connected to the Tx module of the Raspberry Pi4. I found this guide very good. This tutorial mentions to read data from ttyS0 but for me ttyAMA0 was working.
https://defcon007.medium.com/using-a-gps-module-neo-7m-with-raspberry-pi-3-45100bc0bb41
For installing Kismet, I was having troubles with the tutorial since some dependencies were not installed and I didn’t know how to install them. I was successful installing Kismet by using the Kali linux packages from the Kismet website. https://www.kismetwireless.net/packages/
wget -O - https://www.kismetwireless.net/repos/kismet-release.gpg.key --quiet | gpg --dearmor | sudo tee /usr/share/keyrings/kismet-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kismet-archive-keyring.gpg] https://www.kismetwireless.net/repos/apt/release/kali kali main' | sudo tee /etc/apt/sources.list.d/kismet.list >/dev/null
sudo apt update
sudo apt install kismet
Once Kismet was running, I tried collecting some wifi data but the NexmonFirmware Patches were not installed so I couldn’t use the antenna to get data. I tried following this tutorial:
https://pimylifeup.com/raspberry-pi-nexmon/
The only problem was that the kernel version was 6+ and not 4.9, 4.14, or 4.19. I found this tutorial to downgrade the kernel version of the Raspberry Pi OS but every time after restart the raspberry pi couldn’t detect the SD card so I had to restart from 0. Access the github link in the forum and scroll until you find the kernel version you want.
https://forums.raspberrypi.com/viewtopic.php?t=275321
I tried installing the drivers to use a wifi dongle. I followed this tutorial.
https://raspberrypi.stackexchange.com/questions/111359/how-to-install-tp-link-tl-wn823n-v2-on-rasperry-pi-2
The Kismet could detect the doggle but I still had the same problem of the nexmon patches.
Method #2
Since I couldn’t fix the problem of the nexmon patches, I decided to use Kali linux. I installed Kali linux through the Raspberry Pi Imager. Kali linux didn’t work on the Pi 4 module, it was always freezing at the log in so for this method I used my Raspberry Pi4 with 8Gb. Remember that Kali linux has pre-built an username and password which are “kali”.
Kismet is pre-built on Kali so no need for installation. You also don’t need to run as admin so you can just type
kismet -t <title>
This time I could read data from Kismet. The only problem I couldn’t read the GPS data from the module like before. There were not any tutorials online to use the module but only a dongle so I decided to buy one. Even though I made sure it was compatible to linux and raspberry pi, I still couldn’t read any GPS data from it. To make things worst, for the past weeks my wifi wasn’t working at all and I couldn’t do any work. My powerbank that used to supply 2A stopped working properly and column’t supply anymore 2A since my phone wasn’t charging at full speed and the raspberry pi4 wouldn’t turn on no more from the powerbank. I had that powerbank for almost a decade and it just decided to give up on me.
This method seemed to work more but I wasn’t able to combine kismet data with GPS data so the device could be used only stationary and not on the go.
Future work
I will try to find if there are libraries to connect the GPS dongle to the raspberry pi running Kali both for the module and dongle. Once I figured that out, I will buy a new powerbank to supply 2A so the Raspberry Pi will turn on. I will create a case for the Raspberry Pi4 to stay in place inside the enclosure so while I am moving around it will not bounce around. Finally, I will go around the city to collect data and analyze it.