Thursday, November 19, 2009

Kismet init

Here's a script to add to /etc/init.d that will start kismet_drone on router startup. Put this code in a file called "kismet_drone" (or whatever you want to call it):

#!/bin/sh /etc/rc.common
# Copyright (C) 2008 OpenWrt.org

START=65
PROG=/usr/bin/kismet_drone
start() {
        $PROG
}

stop() {
        killall kismet_drone
}

 Once this is done do the following:

cd /etc/rc.d
ln -s ../init.d/kismet_drone S65kismet_drone

Now kismet_drone will start whenever the router is restarted. The "stop" command doesn't work very well, I'm still working on fixing that issue.

Monday, November 16, 2009

Flashing the Flashed

If your router is already flashed with DD-WRT, the easiest way to get the drone working is to use SCP and MTD. Here's the quick 'n' dirty:

#SCP .trx file to router
scp filename.trx root@routerip:/tmp/

#SSH into router
ssh -lroot routerip

#Start the flash
cd /tmp
mtd -r write filename.trx linux

At this point the router will begin the flash process. Be patient, don't jump the gun and pull the plug on the router (potential brickage might follow). This usually takes 3-5 minutes, just wait for the router to reboot, then you will have to telnet back in and do the configure thing all over again.

Thursday, November 12, 2009

OpenWRT Kismet Files - Part Deux

So, here are a couple of things to do after flashing your router.

After flash:

Edit /usr/local/etc/kismet.conf on server to add in drone source.

ncsource=drone:host=x.x.x.x,port=2501,name=drone1

(if you have more drones, add them here as well:
ncsource=drone:host=x.x.x.x,port=2501,name=drone2
ncsource=drone:host=x.x.x.x,port=2501,name=drone3
)

Edit /etc/kismet/kismet_drone.conf on drone to add source.

ncsource=wlan0

You can also set allowedhosts in the kismet.conf/kismet_drone.conf files if you want only specific hosts to talk to the drones.

Drone setting:
droneallowedhosts=x.x.x.0/24,x.x.x.x

Server setting:
listen=tcp://hostip:2501

Set your timezone on the drone:
echo timezone > /etc/TZ

Example: echo EST+5 > /etc/TZ

date mmddhhmmccyy

Example: date 111212002009