tests: Make hostapd test setup more similar to the P2P tests
[mech_eap.git] / tests / hwsim / start-ap.sh
1 #!/bin/sh
2
3 DIR="$( cd "$( dirname "$0" )" && pwd )"
4 WPAS=$DIR/../../wpa_supplicant/wpa_supplicant
5 HAPD=$DIR/../../hostapd/hostapd
6 WLANTEST=$DIR/../../wlantest/wlantest
7
8 $DIR/stop-wifi.sh
9 sudo modprobe mac80211_hwsim radios=5
10 mkdir -p $DIR/logs
11 DATE=`date +%s`
12 sudo ifconfig hwsim0 up
13 sudo $WLANTEST -i hwsim0 -c -d > $DIR/logs/$DATE-hwsim0 &
14 sudo $WPAS -Dnl80211 -iwlan0 -c $DIR/p2p0.conf -ddKt > $DIR/logs/$DATE-log0 &
15 sudo $WPAS -Dnl80211 -iwlan1 -c $DIR/p2p1.conf -ddKt > $DIR/logs/$DATE-log1 &
16 sudo $WPAS -Dnl80211 -iwlan2 -c $DIR/p2p2.conf -ddKt > $DIR/logs/$DATE-log2 &
17 sudo $HAPD -ddKt -g $DIR/hostapd-global -G admin -ddKt > $DIR/logs/$DATE-hostapd &
18 sleep 1