NAzT
1/22/2016 - 11:18 AM

ap+sta.sh

#!/bin/ash

/sbin/uci set wireless.radio0=wifi-device
/sbin/uci set wireless.radio0.type='ralink'
/sbin/uci set wireless.radio0.variant='mt7628'
/sbin/uci set wireless.radio0.country='TH'
/sbin/uci set wireless.radio0.hwmode='11g'
/sbin/uci set wireless.radio0.htmode='HT40'
/sbin/uci set wireless.radio0.channel='auto'
/sbin/uci set wireless.radio0.disabled='0'
/sbin/uci set wireless.ap=wifi-iface
/sbin/uci set wireless.ap.device='radio0'
/sbin/uci set wireless.ap.disabled='0'
/sbin/uci set wireless.ap.mode='ap'
/sbin/uci set wireless.ap.network='lan'
/sbin/uci set wireless.ap.ifname='ra0'
/sbin/uci set wireless.ap.encryption='psk2'
/sbin/uci set wireless.ap.key='devicenetwork'
/sbin/uci set wireless.ap.ssid='CMMC.DEVICE-002'
/sbin/uci set wireless.ap.seq='1'
/sbin/uci set wireless.sta=wifi-iface
/sbin/uci set wireless.sta.device='radio0'
/sbin/uci set wireless.sta.mode='sta'
/sbin/uci set wireless.sta.network='wan'
/sbin/uci set wireless.sta.ifname='apcli0'
/sbin/uci set wireless.sta.led='mediatek:orange:wifi'
/sbin/uci set wireless.sta.ssid='CMMC'
/sbin/uci set wireless.sta.key='PASSPHRASE'
/sbin/uci set wireless.sta.encryption='psk2'


/sbin/uci set wireless.sta.disabled='0'
/sbin/uci commit
/etc/init.d/network restart
/bin/sleep 30

/sbin/uci set wireless.sta.disabled='1'
/sbin/uci commit


echo "DONE"