HOW TO BUILD AND RUN CAPWAP FOR LINUX SYSTEMS:

NOTE: To run WTP you must have a wireless card with AP mode (check with iw)

HOW TO BUILD AC AND WTP:

  - Enter into "capwap" directory
  - Run "make clean"
  - Run "make"

HOW TO RUN WTP:

	- Open a shell in superuser mode
	- Be sure that your wireless card is working
	- Be sure that the wireless card you want to use as Access Point hasn't any active wireless interface (delete all wlanX)
	- In file settings.wtp.txt you have to put the phy name of your wireless card (use iw):
		<RADIO_PHY_TOT>1
		<RADIO_PHY_NAME_0>phy2
    	- Open the file "config.wtp" and write the AC IP-address between <AC_ADDRESSES> and </AC_ADDRESSES> tags
	- Run "./WTP" in superuser mode
	- In LocalMAC mode, you need to bridge the master interface with your ethernet port or setting the route with ip command

HOW TO RUN AC (32-bit OS recommended):
	
	- Open a shell in superuser mode
	- Run "./AC" in superuser mode
	- Create a bridge between AC_tap interface and eth0 using a script like this:
		dhclient -r bridgeAC
		brctl addbr bridgeAC
		brctl addif bridgeAC AC_tap
		brctl addif bridgeAC eth0
		ifconfig bridgeAC up
		ifconfig AC_tap up
		ifconfig eth0 0
		ifconfig AC_tap 0
		dhclient bridgeAC

HOW TO CREATE AN Access Point Interface ON WTP SIDE:
	- Enter into "capwap/wum" and run "make"
	- Run: ./wum -c wtps if you want to know all WTPs associated with your AC
	- Run: ./wum -c addwlan -w <WTP_ID> -r 1 -l 1 -s <SSID> -t 1

N.B. OpenCAPWAP doesn't provide an IP address to associated Stations. You have to set a dhcp server on AC side 
	 or give a static IP to your station.

To set WTP and AC options edit the "config.wtp" and "config.ac" files and restart applications.

For more info: elena.ago@gmail.com
