A few updates:
– ran some power tests
– got the GPS time hack straightened out (Thanks JD!)
– configured Kismet to use 2 adapters, and split the channels for faster acquisition
– set up wired ethernet to use static IP so you can access directly from your network/laptop
– running on Pi3 (will add separate post)
Power was tested using a PortPilot between the battery source and the War Pi 2.0. It was used in the 2 basic configurations, and power peaked around 1.1A on startup, and then settled in to the below:
Power draw with the GPS and TP-Link adapter was around 700mA.
Power draw with the GPS and dual band Alfa card was around 1.1A.
As you can see, the Alfa card uses a bit more power, and so I have purchased a TP-Link T2UH dual band adapter to try out.
I also purchased a thin 4000mAh battery on sale for $7. I should have bought the whole bin full of them. With the War Pi 2.0 using the TP-Link adapter, I managed to get 4 hours of runtime. They worked really well for short engagements.
Another user reported getting >12 hours on a 10,000 mAh supply with about 50% to spare.
GPS Time Hack
The War Pi 2.0 was not getting system time from the network when it is running in standalone mode. As a result, the log files were getting written with old dates and time. To fix this, I used a script from a fellow wardriver (JD) and made a tweak or two. The script is in a file I created called GPSTimeUpdate.
# sudo vi GPSTimeUpdate
#!/bin/bash #extracts time from GPS GPSLINE=`gpspipe -w | head -10 | grep TPV | head -1` #pull date and time from valid TPV line GPSDATE=`echo $GPSLINE | sed -r 's/.*"time":"([^"]*).*/\1/'` #set system time to GPS time date -s "$GPSDATE"
This script is then modified as an executable, and copied into the /usr/bin directory.
# sudo chmod +x GPSTimeUpdate
# sudo cp GPSTimeUpdate /usr/bin/.
To execute the command on startup, I added it to the /etc/rc.local file. This startup file is the last to execute on startup, for all run levels.
# sudo vi /etc/rc.local
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. # Print the IP address _IP=$(hostname -I) || true if [ "$_IP" ]; then printf "My IP address is %s\n" "$_IP" fi /usr/bin/GPSTimeUpdate exit 0
Using Multiple Adapters
In order to cover more channels quicker, I added another TP-Link adapter to my War Pi 2.0. Kismet comes preconfigured to spend a little more time on channels 1,6, and 11 as those are the most popular. I decided that with 2 adapters, I will split the channels in half, all with equal time. The only exception would be channel 6 – both adapters will hit channel 6.
To enable a 2nd adapter in Kismet and configure the channel hopping, you need to edit the kismet.conf file in /usr/local/etc/.
# sudo vi /usr/local/etc/kismet.conf
Find and modify the sources list as shown:
Scroll down further until you find the channel list section. DO NOT MODIFY THE DEFAULTS. We are going to add our own channel lists, labeled ‘first’ and second’.
# added to split channels between 2 adapters channellist=first:1,2,3,4,5,6 channellist=second:6,7,8,9,10,11
These channels are for 802.11bgn as the adapters only support that. Save the file, restart, and be ready to process more data. 🙂
Static IP (eth0)
One of the challenges with accessing the War Pi while out and about, or even at home has been figuring out which IP address to SSH into. With a few more quick changes, we can set a static IP address that can match your addressing scheme on your home network, or even better – use a straight Ethernet cable from your War Pi to your laptop. This gives you the freedom to shutdown the War Pi gracefully, and avoids file corruption from removing power. Most modern Ethernet devices support this use without a crossover cable. No more lugging around a switch!
First, determine what IP address you want to use. I selected one that is outside my DHCP range on my home network, and one I was confident would not conflict with other static addresses.
# sudo vi /etc/dhcpcd.conf <- make sure to type the exact file name
Add the following lines to the bottom of the file (using your own IP addressing scheme):
interface eth0 static ip_address=192.168.0.98/24 static routers=192.168.0.1 static domain_name_servers=192.168.0.1
Save the file and reboot. You should now be able to SSH into the static IP address every time you are connected via Ethernet. On my Windows laptop, I added an ‘alternate’ IPv4 configuration. This gives me the flexibility to use DHCP on the wired interface, and also address my War Pi when *directly* connected with Ethernet.
Stay tuned as a build using the Raspberry Pi3 will be forthcoming, in War Pi 2.1.