0.0.g version

PREREQS

First, you need a driver for your Wi-Fi NIC that support monitor mode. It's supposed to return frames in wlan_ng format. 

For example acx100 does that. There is one bug in acx100 driver - it returns nose in signal field and vice versa. 
Change idma.c file of acx100 open source driver to fix it. Or change sniffer.c to accept value of the noise field of wlan_ng header.

This particular release was used on WRTSL54GS Wi-Fi router running OpenWrt linux distribution. It does not have an open source
wireless driver, but Broadcom binary driver supplied with it support monitor mode and conviently report frame headers in wlan_ng format.
Another advantage is that Broadcom driver creates additional prism0 interface to allow access to monitor data, at the same time
keeping main eth2 interface in operational mode.

Second, you need to dowload and install libpcap.

And third, you lickly need wireless tools to configure your NIC and put it in monitor mode.


COMPILATION

Edit INCLUDE and SNIF_LIBS in makefile to point to correct libpcap locations.
Run make.

Visit OpenWrt site for instructions on how set crossplatform of native development environment:
http://wiki.openwrt.org/BuildingPackagesHowTo?highlight=%28HowTo%29

RUN

ACX100
Load you NIC driver (insmod acx100_pci.o debug=0x01 firmware_dir=/lib/modules/acx100_frmwe for example).

Config you wireless parameters (iwconfig wlan0 cannel 6 etc.).

Bring up you interface (ifconfig wlan0 192.168.0.10 for example).

Put your NIC in monitor mode (iwpriv wlan0 1 6).


WRTSL54GS Broadcom 
Put your NIC in monitor mode (iwpriv eth2 set_monitor 1).


1.
Run sniffer <interface> <timeout> < <infile> > <outfile>, where <timeout> is the time the sniffer exits after, 
<infile> is the saved <outfile> from previous run or just empty file for the first run, 
<outfile> is the file where sniffed Wi-Fi nodes will be printed out.

2.
Manually edit <outfile> from 1 to set coordinates of receivers or/and trasmitters or distance between them for calibration and type of the record. 
Initial type of all new records is 0x1. Record with known receiver coordinates will hav type 0x9, transmitter coordinates - 0x5, radius - 0x3, 
receiver and transmitter coordinates - 0xd. Last 2 types are for calibration records.

With the current 0.0.g release instead of manual coordinate input, you may run sniffer with --xr <coordinate>, --yr <coordinate> and --zr <coordinate>
 options to set a receiver coordinates.
Options --mact <AA:BB:CC:DD:EE:FF>, --xt, --yt, --zt set transmitter coordinates for particular MAC.

2a.
Run dgraphgen <<infile> with --sigma or --power options to create density diagrams of power deviation and power on receover itself to feed in
webMatematica plotter. For example via http://cose.math.bas.bg/webMathematica/MSP/Sci_Visualization/Contour3DDataPlot interface.

3. 
Run calibrate < <infile> > <outfile>. It will calculate and update parameters of attenuatinon function, approximated by calibration data, 
type will be updated also. Type for the calibrated records will be incremented by 0x10 and for records with calculated distance by 0x80.

4.
Run triangulate < <infile> > <outfile>. It will try to triangulate location of all receivers and transmitters if data for the triangulation 
are available. Type of the record with calculated transmitter locations will be incremented by 0x4 and for receiver locations by 0x8.