Developing lightweight computation at the DSG edge

Commit dbcf9f3d authored by p4u's avatar p4u
Browse files

Some improvement to wireless channel autoconfiguration and changed default one to ES

parent 0aa8aa12
......@@ -52,7 +52,7 @@ config 'qmp' 'tunnels'
config 'qmp' 'wireless'
option 'driver' 'mac80211'
option 'country' 'UZ'
option 'country' 'ES'
option 'bssid' '02:CA:FF:EE:BA:BE'
......
......@@ -29,7 +29,6 @@ qmp_uci_get() {
u="$(uci -q get qmp.$1)"
r=$?
echo "$u"
echo "$u" >> /tmp/uci_get
[ $r -ne 0 ] && logger -t qMp "UCI returned an error (uci get qmp.$1)"
qmp_debug "qmp_uci_get: uci -q get qmp.$1"
return $r
......
......@@ -262,11 +262,10 @@ qmp_wifi_get_default() {
# we are using index var to put devices in different channels
index=$(echo $device | tr -d [A-z])
index=$(( $index * 2 ))
# QMPINFO returns a list of avaiable channels in this format: 130 ht40+ adhoc
[ "$mode" == "adhoc" ] || [ -z "$mode" ] && channel_info="$(qmp_tac $QMPINFO channels $device | grep adhoc | awk NR==$index+1)"
[ "$mode" == "ap" ] && channel_info="$($QMPINFO channels $device | awk NR==$(qmp_get_dec_node_id)%10+$index+1)"
[ "$mode" == "adhoc" ] || [ -z "$mode" ] && channel_info="$(qmp_tac $QMPINFO channels $device | grep adhoc | awk NR==${index}+1)"
[ "$mode" == "ap" ] && channel_info="$($QMPINFO channels $device | awk NR==$(qmp_get_dec_node_id)%10+${index}*2+1)"
# if there is some problem, channel 6 is used
if [ -z "$channel_info" ]; then
......
driver mac80211
country UZ
bssid 02:CA:FF:EE:BA:BE
name qmp
txpower 20
name qMp
txpower 17
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment