On Sat, Nov 5, 2011 at 5:14 AM, abhinav narain <abhinavnarai...@gmail.com> wrote: > hi,
Hi Abhinav, > I want to sniff all the packets from the network. > I am setting > sc->sc_ah->is_monitoring = true; > in ath9k_start() > > but this gets set to false in in ath9k_config(..). > using the flag : IEEE80211_CONF_CHANGE_MONITOR, by doing > changed | = > IEEE80211_CONF_CHANGE_MONITOR ; those were mac80211 (protocol stack for 802.11) flags that has to be taken care by the driver. mac80211 sets those flags when the interface gets down > Does not set it on, and I hope this does not break the things in kernel > elsewhere > Both the functions are defined in main.c in > compat../drivers/net/wireless/ath/ath9k > I have the following doubts : > 1. this flag is not used anywhere and I don't get how should i set "changed > " so that this flag is set. > 2. If I force ah->is_monitoring to true, before this, I am not sure how the > driver will behave as other things might go wrong elsewhere > > Please suggest how to set the monitoring mode. please install iw sudo apt-get install you can uncheck the Enable wireless in gui sudo service network-manager stop sudo iw dev wlan0 set type monitor sudo iw dev wlan0 set channel 6 sudo ifconfig wlan0 up > > ----------------------------------------------------------------------------------------------------------------------------------------- > Also, I have doubt in setting the monitor mode using iwconfig. > The usual mode of the device is Master( using iwconfig ) > When, I use the following commands : > $ifconfig wlan0 down > $iwconfig wlan0 mode monitor > $ifconfig wlan0 up > The router reboots on the last command, and the wlan0 still shows monitor > mode(iwconfig output) > The browser interface also shows Master mode. monitor mode ? > A user space ioctl call : ioctl(sd, SIOCSIWMODE, &wrq) > gives me an error : Device or resource ready. > the radio interface is not configure. > There is a mon.wlan0, mon.wlan1 (in Monitor mode) interfaces in iwconfig > output. > Shall i use them to create a raw socket and sniff on it ? are you trying to use some AP sort of device as monitor mode? > When I use iw with the following command : > $ iw phy phy0 interface add mon0 type monitor > It gives error, that device not found ... what should I do to set wlan0 on after having my wlan74 interface as an AP mode using hostpad, i did this and it seem to work for me sudo iw dev wlan74 interface add mon74 type monitor sudo ifconfig mon74 up > ? > Please suggest > Abhinav Narain > _______________________________________________ > ath9k-devel mailing list > ath9k-devel@lists.ath9k.org > https://lists.ath9k.org/mailman/listinfo/ath9k-devel > > -- shafi _______________________________________________ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel