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
fbff072f
Commit
fbff072f
authored
Feb 15, 2012
by
p4u
Browse files
Node ID is autoconfigured according the primary_device eth0. New web section Node
parent
9824ca07
Changes
5
Hide whitespace changes
Inline
Side-by-side
packages/qmp-small-node/files/etc/config/qmp
View file @
fbff072f
## this config should work for Routerstation(PRO), Alix, Fonera, ...
config 'qmp' 'interfaces'
# option 'configure_switch' 'eth0' # (uncomment line if available, e.g. WGT634U)
option 'lan_devices' 'eth0 wlan1' # will be used as is!
option 'wan_device'
'eth1' # will be used as is!
option 'wan_device
s
' 'eth1' # will be used as is!
option 'mesh_devices' 'wlan0 wlan2' # will be extended by vlan tag!
config 'qmp' 'node'
# option community_node_id 901 # [0x0100..0xFFFF] if commented out then community_node_id will be
# autoconfigured based on last byte of MAC address, thus: [0x000..0x0FF]
option 'primary_device' 'eth0'
option 'community_id' 'qmp'
option 'community_node_id' ''
option 'key' '/tmp/qmp_key'
config 'qmp' 'non_overlapping'
...
...
@@ -68,3 +67,4 @@ config 'wireless'
config 'wireless'
option 'mode' 'adhoc'
option 'name' 'qMp.cat'
packages/qmp-small-node/files/etc/qmp/qmp_control.sh
View file @
fbff072f
...
...
@@ -56,6 +56,10 @@ configure_network() {
apply_netserver
}
configure_system
()
{
qmp_configure_system
}
enable_ns_ppt
()
{
echo
8
>
/sys/class/gpio/export
echo
out
>
/sys/class/gpio/gpio8/direction
...
...
@@ -70,6 +74,7 @@ help() {
echo
" search_default_gw : Search for a default gw in the network"
echo
" configure_wifi : Configure and apply current wifi settings"
echo
" configure_network : Configure and apply current network settings"
echo
" configure_system : Configure and apply current system settings (qmp.node section and so on)"
echo
" apply_netserver : Start/stop nerserver depending on qmp configuration"
echo
" enable_ns_ppt : Enable POE passtrought from NanoStation M2/5 devices. Be careful with this"
echo
""
...
...
packages/qmp-small-node/files/etc/qmp/qmp_functions.sh
View file @
fbff072f
...
...
@@ -398,6 +398,7 @@ qmp_configure_network() {
if
qmp_uci_test qmp.interfaces.wan_device
;
then
uci
set
$conf
.wan
=
"interface"
uci
set
$conf
.wan.ifname
=
"
$(
uci get qmp.interfaces.wan_device
)
"
uci
set
$conf
.wan.type
=
"bridge"
uci
set
$conf
.wan.proto
=
"dhcp"
fi
...
...
@@ -634,17 +635,6 @@ qmp_configure_bmx6() {
# /etc/init.d/$conf restart
}
qmp_configure_olsr6
()
{
local
conf
=
"olsrd"
...
...
@@ -753,11 +743,6 @@ EOF
}
qmp_configure_olsr6_uci_unused
()
{
local
conf
=
"olsrd_uci"
...
...
@@ -823,15 +808,20 @@ qmp_configure_olsr6_uci_unused() {
qmp_configure_system
()
{
local
primary_mesh_device
=
"
$(
uci get qmp.interfaces.mesh_devices |
awk
'{print $1}'
)
"
local
primary_device
=
"
$(
uci get qmp.node.primary_device
)
"
[
-z
"
$primary_device
"
]
&&
primary_device
=
"eth0"
local
community_node_id
if
qmp_uci_test qmp.node.community_node_id
;
then
community_node_id
=
"
$(
uci get qmp.node.community_node_id
)
"
el
if
!
[
-z
"
$primary_mesh_device
"
]
;
then
community_node_id
=
"
$(
qmp_get_mac_for_dev
$primary_
mesh_
device
|
awk
-F
':'
'{print $6}'
)
"
el
se
community_node_id
=
"
$(
qmp_get_mac_for_dev
$primary_device
|
awk
-F
':'
'{print $6}'
)
"
fi
uci
set
system.@system[0].hostname
=
qmp
${
community_node_id
}
local
community_id
=
"
$(
uci get qmp.node.community_id
)
"
[
-z
"
$community_id
"
]
&&
community_id
=
"qmp"
uci
set
system.@system[0].hostname
=
${
community_id
}${
community_node_id
}
uci commit system
# enable IPv6 in httpd:
...
...
packages/qmp-small-node/files/usr/lib/lua/luci/model/cbi/qmp/network.lua
View file @
fbff072f
...
...
@@ -65,7 +65,7 @@ for i,l in ipairs(eth_int) do
end
-- Option wan_device
wan
=
eth_section
:
option
(
ListValue
,
"wan_device"
,
"WAN device"
,
"Th
is
device will be used for internet or any other gateway connection"
)
wan
=
eth_section
:
option
(
ListValue
,
"wan_device
s
"
,
"WAN device
s
"
,
"Th
ese
device
s
will be used for internet or any other gateway connection"
)
for
i
,
w
in
ipairs
(
eth_int
)
do
wan
:
value
(
w
,
w
)
end
...
...
packages/qmp-small-node/files/usr/lib/lua/luci/model/cbi/qmp/wireless.lua
View file @
fbff072f
...
...
@@ -82,6 +82,7 @@ for _,wdev in ipairs(wdevs) do
mode
=
s_wireless
:
option
(
ListValue
,
"mode"
,
"Mode"
)
mode
:
value
(
"adhoc"
,
"Ad-Hoc"
)
mode
:
value
(
"ap"
,
"Access Point"
)
mode
:
value
(
"client"
,
"Client"
)
mode
:
value
(
"none"
,
"Not used"
)
-- Name
...
...
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