summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-network-server
diff options
context:
space:
mode:
authorAndrii Pientsov <andrii.pientsov@globallogic.com>2020-05-15 17:39:04 +0300
committerSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2020-05-21 10:57:35 +0300
commitd252c15795b1da269e6144a75e07edb23a9a0fd5 (patch)
tree0c95f5bdb15b2bef173cbdb5b64a3cdfd434fc59 /recipes-connectivity/lora/lora-network-server
parent0bddc1c82986fb8eb8ed8cab8ff1368274494765 (diff)
parente26f94e3f97b755652327f5652ea32f9ebf2b57b (diff)
downloadmeta-mlinux-d252c15795b1da269e6144a75e07edb23a9a0fd5.tar.gz
meta-mlinux-d252c15795b1da269e6144a75e07edb23a9a0fd5.tar.bz2
meta-mlinux-d252c15795b1da269e6144a75e07edb23a9a0fd5.zip
Merge remote-tracking branch 'origin/master' into multiarch5-thud
Diffstat (limited to 'recipes-connectivity/lora/lora-network-server')
-rwxr-xr-xrecipes-connectivity/lora/lora-network-server/lora-network-server.init16
1 files changed, 13 insertions, 3 deletions
diff --git a/recipes-connectivity/lora/lora-network-server/lora-network-server.init b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
index e226669..3ec02a0 100755
--- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init
+++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
@@ -137,10 +137,20 @@ setup_mtcdt() {
}
setup_mtcap() {
+ hw=$(mts-io-sysfs show hw-version 2> /dev/null)
+
if [ "$lora_id" = "$lora_mtcap_id868" ]; then
- GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.EU868
+ if [ "$hw" = "MTCAP-0.2" ]; then
+ GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP2_LORA_1_5.EU868
+ else
+ GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.EU868
+ fi
elif [ "$lora_id" = "$lora_mtcap_id915" ]; then
- GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.US915
+ if [ "$hw" = "MTCAP-0.2" ]; then
+ GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP2_LORA_1_5.US915
+ else
+ GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.US915
+ fi
else
return 1
fi
@@ -213,7 +223,7 @@ do_start() {
if [ "$dual_cards_installed" == "true" ]; then
/usr/sbin/start-stop-daemon --chdir $run_dir/2 --start --background --make-pidfile \
--pidfile $pkt_fwd_2_pidfile --startas /bin/bash \
- -- -c "exec $angel $pkt_fwd_2 $pkt_fwd_options 2>&1"
+ -- -c "exec $angel $pkt_fwd_2 $pkt_fwd_options 2>&1 >> $pkt_fwd_2_log"
fi
fi