In addition to that I will show you how to configure your Pi to autorun kismet at startup with systemd.
The final configuration will boot on my Class10 card in under 17 seconds.
Download ArchLinux ImageGrab the latest ArchLinux ARM image for your Raspberry Pi and flash it to your SD card!
SSH connect to RaspberryMaybe you are not able to connect via hostname, so you have to connect through IP address. You can either ping it, or look the IP up on your router. If you got your Raspberry on a monitor you can config it with your keyboard as well.
In this case skip this step.
# Password: root ssh root@alarmpi
Update your systemAfter updating your system which lasts quite a while, we start installing dependencies of kismet to work properly.
# Synchronizes the repository databases and updates packages pacman -Syyu
Installing DependenciesYou will be asked for a selection which packets you wish to install, type y – we need all of them.
# Installs dependencies of kismet pacman -S gcc gpsd make ncurses python2 base-devel python2-pip
Download and Extract kismet
# Downloads file to current directory wget http://www.kismetwireless.net/code/kismet-2011-03-R2.tar.gz # Extracts compressed kismet*.tar.gz with verbose output tar xvzf kismet-2011-03-R2.tar.gz # Changes directory cd kismet-2011-03-R2/
Configure and Build kismet
# Configures kismet ./configure # Generate dependencies make dep # Compile and install program. make && make install
Take a bath or drink a few cups of coffee – my Raspberry spent 1 hour to compile kismet.
Well done. All components hopefully installed without errors.
kismet.confOkay, now we can edit the kismet.conf to setup kismet correctly.
The important stuff for us is to change:
# Kismet will save logs to this path # set '# logprefix=/some/path/to/logs' to logprefix=/home/kismetlogs
# Below '# ncsource=wlan0' add # interface wlan0, splits channels for multi-WLAN scanning, retries if lost connection ncsource=wlan0:split=true,retry=true ncsource=wlan1:split=true,retry=true
# We only want a summary of our scanned networks # Change 'logtypes=pcapdump,gpsxml,netxml,nettxt,alert' to logtypes=netxmlIf you made all your changes, save the document with CTRL X and press Y. Other options like channel list and save-period is well set by default. Do not forget to create a folder named ‘kismetlogs’ in your /home-Folder.
Autostart kismet & gpsdIf you are outside you can’t easily pull out your keyboard and monitor to start everything up.
Now we create our script to start gpsd and kismet with system startup.
In Raspbian you can setup your script in /etc/rc.local but as you noticed ArchLinux is different.
First you have to create a file in the following folder by typing this:
Type in the following data:
[Unit] Description=Autostart [Service] Type=oneshot ExecStart=/autostart.sh [Install] WantedBy=multi-user.target
Save your file with CTRL X and press Y.
Now we have a small service which executes our autostart.sh once.
So now it’s time to create an autostart.sh script in our folder with:
and type in:
#!/bin/bash echo "Starting kismet / gpsd" killall gpsd gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock service ntp restart > /dev/null 2> /dev/null /usr/local/bin/kismet_server
Save it again with CTRL X and y.
The last step is to change permissions on the specific files.
To make executable type in
chmod +x /autostart.sh #Enable Autostart systemctl enable autostart
Now reboot your raspberry by typing
That’s it! Enjoy your fast ArchLinux with kismet and gpsd.
Just turn it on and start scanning in less than 15 seconds.