Separate mesh hotspot channel
This commit is contained in:
parent
8f109b2b18
commit
e9d21d9fce
|
@ -55,6 +55,7 @@ fi
|
||||||
CELLID='any'
|
CELLID='any'
|
||||||
|
|
||||||
CHANNEL=2
|
CHANNEL=2
|
||||||
|
HOTSPOT_CHANNEL=6
|
||||||
if [ -f $COMPLETION_FILE ]; then
|
if [ -f $COMPLETION_FILE ]; then
|
||||||
if grep -q "Wifi channel:" $COMPLETION_FILE; then
|
if grep -q "Wifi channel:" $COMPLETION_FILE; then
|
||||||
CHANNEL=$(cat $COMPLETION_FILE | grep "Wifi channel:" | awk -F ':' '{print $2}')
|
CHANNEL=$(cat $COMPLETION_FILE | grep "Wifi channel:" | awk -F ':' '{print $2}')
|
||||||
|
@ -251,7 +252,7 @@ function start {
|
||||||
ifconfig $IFACE_SECONDARY mtu 1500
|
ifconfig $IFACE_SECONDARY mtu 1500
|
||||||
ifconfig $IFACE_SECONDARY hw ether $(assign_peer_address)
|
ifconfig $IFACE_SECONDARY hw ether $(assign_peer_address)
|
||||||
iwconfig $IFACE_SECONDARY enc open
|
iwconfig $IFACE_SECONDARY enc open
|
||||||
iwconfig $IFACE_SECONDARY mode managed essid $HOTSPOT_NAME channel ${CHANNEL}
|
iwconfig $IFACE_SECONDARY mode managed essid $HOTSPOT_NAME channel ${HOTSPOT_CHANNEL}
|
||||||
iwconfig $IFACE_SECONDARY ap $CELLID
|
iwconfig $IFACE_SECONDARY ap $CELLID
|
||||||
|
|
||||||
brctl addbr $BRIDGE_HOTSPOT
|
brctl addbr $BRIDGE_HOTSPOT
|
||||||
|
@ -268,7 +269,7 @@ function start {
|
||||||
echo "country_code=UK" >> /etc/hostapd/hostapd.conf
|
echo "country_code=UK" >> /etc/hostapd/hostapd.conf
|
||||||
echo "ssid=$HOTSPOT_NAME" >> /etc/hostapd/hostapd.conf
|
echo "ssid=$HOTSPOT_NAME" >> /etc/hostapd/hostapd.conf
|
||||||
echo 'hw_mode=g' >> /etc/hostapd/hostapd.conf
|
echo 'hw_mode=g' >> /etc/hostapd/hostapd.conf
|
||||||
echo "channel=${CHANNEL}" >> /etc/hostapd/hostapd.conf
|
echo "channel=${HOTSPOT_CHANNEL}" >> /etc/hostapd/hostapd.conf
|
||||||
echo 'wpa=2' >> /etc/hostapd/hostapd.conf
|
echo 'wpa=2' >> /etc/hostapd/hostapd.conf
|
||||||
echo "wpa_passphrase=$HOTSPOT_PASSPHRASE" >> /etc/hostapd/hostapd.conf
|
echo "wpa_passphrase=$HOTSPOT_PASSPHRASE" >> /etc/hostapd/hostapd.conf
|
||||||
echo 'wpa_key_mgmt=WPA-PSK' >> /etc/hostapd/hostapd.conf
|
echo 'wpa_key_mgmt=WPA-PSK' >> /etc/hostapd/hostapd.conf
|
||||||
|
|
Loading…
Reference in New Issue