mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
better handling of 2.4/5 on the same ssid
This commit is contained in:
parent
4ad83f787b
commit
842a14269a
1 changed files with 8 additions and 5 deletions
|
@ -18,11 +18,14 @@ sleep 3
|
||||||
wpa_cli -i $IFACE scan > /dev/null
|
wpa_cli -i $IFACE scan > /dev/null
|
||||||
sleep 2
|
sleep 2
|
||||||
FREQ=`wpa_cli -i $IFACE scan_results | grep $SSID | awk '{print $2}'`
|
FREQ=`wpa_cli -i $IFACE scan_results | grep $SSID | awk '{print $2}'`
|
||||||
if [ ! $FREQ -lt 2485 ]; then
|
for result in $FREQ; do
|
||||||
FREQ=""
|
echo "frequency $result found for $SSID"
|
||||||
fi
|
if [ $result -lt 2485 ]; then
|
||||||
echo "frequency is $FREQ for $SSID"
|
FREQ2=$result
|
||||||
CHAN=$(($FREQ - 2407 ))
|
fi
|
||||||
|
done
|
||||||
|
echo "Using $FREQ2 for $SSID"
|
||||||
|
CHAN=$(($FREQ2 - 2407 ))
|
||||||
CHAN=$(($CHAN / 5 ))
|
CHAN=$(($CHAN / 5 ))
|
||||||
echo "channel is $CHAN for $SSID"
|
echo "channel is $CHAN for $SSID"
|
||||||
cp /etc/hostapd/hostapd.conf.iiab /etc/hostapd/hostapd.conf
|
cp /etc/hostapd/hostapd.conf.iiab /etc/hostapd/hostapd.conf
|
||||||
|
|
Loading…
Reference in a new issue