Hi again

Forgot to attach the sender and receiver code for this problem

I am trying to get the wifi access point and station code examples
in /conf/wifi working with madwifi 0.9.4 in monitor mode.

The only thing I changed in the code was
//-> prism2_decap :: Prism2Decap()
-> RadiotapDecap()
-> extra_decap :: ExtraDecap()

I can authenticate and associate - but I find that there is about 75%
packet loss when pinging between the client and the AP due to repeated
association requests arriving at the AP.

Any idea how to fix this problem?

Thanks
David





//access_point.click

// This configuration contains a configuration for running 
// an 802.11b access point.
// It creates an interface using FromHost called "ap"
// and uses open authentication to allow stations to associate to it.
// This configuration assumes that you have a network interface named
// ath1 and that it is located on channel 11.

// Run it at user level with
// 'click access_point.click'

// Run it in the Linux kernel with
// 'click-install access-point.click'
// Messages are printed to the system log (run 'dmesg' to see them, or look
// in /var/log/messages), and to the file '/click/messages'.

AddressInfo(ap_bssid 10.0.0.1/8 00:0C:42:23:5C:77);

winfo :: WirelessInfo(SSID "click", BSSID ap_bssid, CHANNEL 14);

rates :: AvailableRates(DEFAULT 2 4 11 22);

control :: ControlSocket("TCP", 6777);
chatter :: ChatterSocket("TCP", 6778);

FromHost(ap, ap_bssid, ETHER ap_bssid)
  -> wifi_encap :: WifiEncap(0x02, WIRELESS_INFO winfo)
  -> set_rate :: SetTXRate(22)
  -> q :: Queue(10)
  -> ExtraEncap()
  -> to_dev :: ToDevice (ath0);

from_dev :: FromDevice(ath0)
//-> prism2_decap :: Prism2Decap()
//-> extra_decap :: ExtraDecap()
-> RadiotapDecap()
-> extra_decap :: ExtraDecap()
-> phyerr_filter :: FilterPhyErr()
-> tx_filter :: FilterTX()
-> dupe :: WifiDupeFilter() 
-> c1 :: Counter
-> wifi_cl :: Classifier(0/08%0c 1/01%03, //data
			 0/00%0c); //mgt

wifi_cl [0] 
-> c2 :: Counter
-> decap :: WifiDecap()
-> HostEtherFilter(ap_bssid, DROP_OTHER true, DROP_OWN true) 
-> ToHost(ap)

wifi_cl [1] 
	-> c3 :: Counter
	-> mgt_cl :: Classifier(0/00%f0, //assoc req
				    0/10%f0, //assoc resp
				    0/40%f0, //probe req
				    0/50%f0, //probe resp
				    0/80%f0, //beacon
				    0/a0%f0, //disassoc
				    0/b0%f0, //auth
				    );



mgt_cl [0]
-> c4 :: Counter
-> PrintWifi()
-> ar :: AssociationResponder(WIRELESS_INFO winfo,
			      RT rates)
-> q;

mgt_cl [1]
-> c5 :: Counter
-> PrintWifi() -> Discard;

mgt_cl [2]
-> c6 :: Counter
-> beacon_source :: BeaconSource(WIRELESS_INFO winfo,
				 RT rates)
-> q;

mgt_cl [3] 
-> c7 :: Counter
-> PrintWifi() -> Discard;

mgt_cl [4] 
-> c8 :: Counter
-> bs :: BeaconScanner(RT rates) -> Discard; 

mgt_cl [5] 
-> c9 :: Counter
-> PrintWifi() -> Discard;

mgt_cl [6] 
-> c10 :: Counter
-> PrintWifi() -> auth :: OpenAuthResponder(WIRELESS_INFO winfo) -> q;




//station.click

// This configuration contains a configuration for running 
// an 802.11b station (which can connect to an access point).
// It creates an interface using FromHost called "station"
// and uses open authentication to connect to an access point.
// This configuration assumes that you have a network interface named
// ath0 and that it is located on channel 1.

// Run it at user level with
// 'click station.click'

// Run it in the Linux kernel with
// 'click-install station.click'
// Messages are printed to the system log (run 'dmesg' to see them, or look
// in /var/log/messages), and to the file '/click/messages'.
// You will have to remove the elements ControlSocket and ChatterSocket to run
// in the kernel.

// To associate to an access point, load this config and then write the 
// following handlers:
// 
// winfo.channel <channel (integer)>
// winfo.bssid <access_point etheraddress>
// winfo.ssid <ssid of access point>
//
// And then trigger the assocation requests by writing the following handlers:
//
// station_auth.send_auth_req 1
// station_auth.send_assoc_req 1
//
// You should then see the following messages:
//
// station_auth :: OpenAuthRequester: auth 0 seq 2 status 0
// station_assoc :: AssociationRequester: response 00:12:17:1c:f1:b1 +24 [ ESS ] status 0 associd 49156 ( { 2 4 11 22 } 36 48 72 108 )
//
// status of 0 means you associated/authenticated successfully.
//


control :: ControlSocket("TCP", 7777);
chatter :: ChatterSocket("TCP", 7778);

AddressInfo(station_address 10.0.0.2/8 00:0B:6B:83:61:B3);
winfo :: WirelessInfo(SSID "click", BSSID 00:0C:42:23:5C:77, CHANNEL 14);

rates :: AvailableRates(DEFAULT 2 4 11 22);

q :: Queue(10)
-> wep_encap :: WepEncap(ACTIVE false)
-> set_rate :: SetTXRate(2)

-> rate :: ProbeTXRate(OFFSET 4,
		       THRESHOLD 0,
		       WINDOW 10000,
		       RT rates)

-> SetTXPower(63)
  //-> seq :: WifiSeq()
-> extra_encap :: ExtraEncap()
-> to_dev :: ToDevice (ath0);


from_dev :: FromDevice(ath0, PROMISC true)
//-> prism2_decap :: Prism2Decap()
//-> extra_decap :: ExtraDecap()
-> RadiotapDecap()
-> extra_decap :: ExtraDecap()
-> FilterPhyErr()
-> tx_filter :: FilterTX()
-> HostEtherFilter(station_address, OFFSET 4)
-> dupe :: WifiDupeFilter()
-> wep_decap :: WepDecap()
-> wifi_cl :: Classifier(0/00%0c, //mgt
			 0/08%0c, //data
			 );

// management
wifi_cl [0] -> management_cl :: Classifier(0/00%f0, //assoc req
					   0/10%f0, //assoc resp
					   0/80%f0, //beacon
					   0/a0%f0, //disassoc
					   0/50%f0, //probe resp
					   0/b0%f0, //auth
					   );
			     


station_probe :: ProbeRequester(ETH station_address,
				WIRELESS_INFO winfo,
				RT rates) 
-> c3 :: Counter
-> PrintWifi() -> Print(probe-req) -> q;

station_auth :: OpenAuthRequester(ETH station_address, WIRELESS_INFO winfo) 
-> c1 :: Counter
-> PrintWifi() 
-> q;

station_assoc ::  AssociationRequester(ETH station_address,
				       WIRELESS_INFO winfo,
				       RT rates) 
-> c2 :: Counter
-> PrintWifi() 
-> q;

management_cl [0] -> PrintWifi() -> Discard;
management_cl [1] -> PrintWifi() -> station_assoc;
management_cl [2] -> beacon_t :: Tee(2) 
-> bs :: BeaconScanner(RT rates, WIRELESS_INFO winfo)
->  c4 :: Counter
-> Discard;
beacon_t [1] 
-> c5 :: Counter
-> tracker :: BeaconTracker(WIRELESS_INFO winfo, TRACK 10) -> Discard;

management_cl [3] -> PrintWifi() -> station_assoc;
management_cl [4] -> PrintWifi(probe_resp) -> bs;
management_cl [5] -> PrintWifi() -> station_auth;

wifi_cl [1] 
//-> PrintWifi(data)
-> wifi_decap :: WifiDecap() 
-> ether_filter ::HostEtherFilter(station_address, DROP_OWN true)
-> ToHost(station);

FromHost(station, station_address, ETHER station_address)
-> station_encap :: WifiEncap(0x01, WIRELESS_INFO winfo)
-> q;


tx_filter [1] -> [1] rate [1] -> Discard;
_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click

Reply via email to