Developing lightweight computation at the DSG edge
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Quick Mesh Project
qMp packages
Commits
dbcf9f3d
Commit
dbcf9f3d
authored
Nov 29, 2011
by
p4u
Browse files
Some improvement to wireless channel autoconfiguration and changed default one to ES
parent
0aa8aa12
Changes
4
Hide whitespace changes
Inline
Side-by-side
packages/qmp-small-node/files/etc/config/qmp
View file @
dbcf9f3d
...
...
@@ -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'
...
...
packages/qmp-small-node/files/etc/qmp/qmp_common.sh
View file @
dbcf9f3d
...
...
@@ -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
...
...
packages/qmp-small-node/files/etc/qmp/qmp_wireless.sh
View file @
dbcf9f3d
...
...
@@ -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
...
...
packages/qmp-small-node/files/etc/qmp/templates/wireless.default.config
View file @
dbcf9f3d
driver
mac80211
country
UZ
bssid
02
:
CA
:
FF
:
EE
:
BA
:
BE
name
q
m
p
txpower
20
name
q
M
p
txpower
17
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment