So far the only satisfactory solution I have found is to install tcpdump
and filter for probes.  Of course that means I need to basically run it as
a daemon.




On Wed, May 8, 2013 at 6:47 AM, camden lindsay <
[email protected]> wrote:

>
> On my encrypted network, I can do
>>     logread -f | grep hostapd
>> to see the MAC addresses of stations that authenticate.
>>
>> If I run hostapd with debugging ("-dd"), I also get messages about
>> stations associating.  (I did this from the command line; if anyone
>> knows how to make this a configuration setting, please share.)
>>
>
>
> A quick look at the source would imply that there is no way to do this,
> other than statically adding the flag to the scripts that may call it
> openWRT_source/trunk $ grep "hostapd -P" * -r
> package/network/services/hostapd/files/hostapd.sh:      hostapd -P
> /var/run/wifi-$ifname.pid -B /var/run/hostapd-$ifname.conf
> package/mac80211/files/lib/wifi/mac80211.sh:            hostapd -P
> /var/run/wifi-$phy.pid -B /var/run/hostapd-$phy.conf || {
>
>
> [email protected]:/# find -iname "hostapd.sh"
> ./lib/wifi/hostapd.sh
> ./rom/lib/wifi/hostapd.sh
> [email protected]:/#
>
> [email protected]:/# find -iname "mac80211.sh"
> ./lib/wifi/mac80211.sh
> ./rom/lib/wifi/mac80211.sh
>
>
> Looks like hostapd.sh is called when setting up 'vif'.. virtual interfaces?
> hostapd_setup_vif() {
>         local vif="$1"
>         local driver="$2"
>         local ifname device channel hwmode
>
>         hostapd_cfg=
>
>         config_get ifname "$vif" ifname
>         config_get device "$vif" device
>         config_get channel "$device" channel
>         config_get hwmode "$device" hwmode
>
>         hostapd_set_log_options hostapd_cfg "$device"
>         hostapd_set_bss_options hostapd_cfg "$vif"
>
>         case "$hwmode" in
>                 *bg|*gdt|*gst|*fh) hwmode=g;;
>                 *adt|*ast) hwmode=a;;
>         esac
>         [ "$channel" = auto ] && channel=
>         [ -n "$channel" -a -z "$hwmode" ] && wifi_fixup_hwmode "$device"
>         cat > /var/run/hostapd-$ifname.conf <<EOF
> driver=$driver
> interface=$ifname
> ${hwmode:+hw_mode=${hwmode#11}}
> ${channel:+channel=$channel}
> $hostapd_cfg
> EOF
>         hostapd -P /var/run/wifi-$ifname.pid -B
> /var/run/hostapd-$ifname.conf
> }
>
>
>
> and looks like mac80211.sh is called as part of brining up the main
> physical interface?
> enable_mac80211() {
> ...
> ...
> ...
>         local start_hostapd=
>
>         rm -f /var/run/hostapd-$phy.conf
>
>         for vif in $vifs; do
>
>                 config_get mode "$vif" mode
>
>                 [ "$mode" = "ap" ] || continue
>
>                 mac80211_hostapd_setup_bss "$phy" "$vif"
>
>                 start_hostapd=1
>
>         done
>
>
>
>         [ -n "$start_hostapd" ] && {
>
>                 hostapd -P /var/run/wifi-$phy.pid -B
> /var/run/hostapd-$phy.conf || {
>
>                         echo "Failed to start hostapd for $phy"
>
>                         return
>
>                 }
>
>                 sleep 2
>
>
> ....
>
>
>
>
>
>
>
> My bet would be you could just vim your option into those files and be
> good.  And/or create 'patches' so that when you upgrade you can re-apply it
> easily..
>
> HTH
>
>
>
>
>
>
>
>
> _______________________________________________
> openwrt-users mailing list
> [email protected]
> https://lists.openwrt.org/mailman/listinfo/openwrt-users
>
>
_______________________________________________
openwrt-users mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-users

Reply via email to