mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 19:22:24 +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
|
||||
sleep 2
|
||||
FREQ=`wpa_cli -i $IFACE scan_results | grep $SSID | awk '{print $2}'`
|
||||
if [ ! $FREQ -lt 2485 ]; then
|
||||
FREQ=""
|
||||
fi
|
||||
echo "frequency is $FREQ for $SSID"
|
||||
CHAN=$(($FREQ - 2407 ))
|
||||
for result in $FREQ; do
|
||||
echo "frequency $result found for $SSID"
|
||||
if [ $result -lt 2485 ]; then
|
||||
FREQ2=$result
|
||||
fi
|
||||
done
|
||||
echo "Using $FREQ2 for $SSID"
|
||||
CHAN=$(($FREQ2 - 2407 ))
|
||||
CHAN=$(($CHAN / 5 ))
|
||||
echo "channel is $CHAN for $SSID"
|
||||
cp /etc/hostapd/hostapd.conf.iiab /etc/hostapd/hostapd.conf
|
||||
|
|
Loading…
Reference in a new issue