summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-network-server
diff options
context:
space:
mode:
authorJason Reiss <jreiss@multitech.com>2020-03-12 12:41:38 -0500
committerJason Reiss <jreiss@multitech.com>2020-03-12 12:41:38 -0500
commitd47e6d997a114e5b2899bd3d4a0359843dd211d2 (patch)
tree24f149cc19a84d2bf92164ebd5397efac8c5ce15 /recipes-connectivity/lora/lora-network-server
parent4f6244cf5d3310724cc0d1cbff8b864055332af2 (diff)
downloadmeta-mlinux-d47e6d997a114e5b2899bd3d4a0359843dd211d2.tar.gz
meta-mlinux-d47e6d997a114e5b2899bd3d4a0359843dd211d2.tar.bz2
meta-mlinux-d47e6d997a114e5b2899bd3d4a0359843dd211d2.zip
lora: add MTCAP2 global_conf files, adjust init scripts to detect MTCAP2
Diffstat (limited to 'recipes-connectivity/lora/lora-network-server')
-rwxr-xr-xrecipes-connectivity/lora/lora-network-server/lora-network-server.init14
1 files changed, 12 insertions, 2 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 b619d8c..61b6e2b 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