summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-network-server/lora-network-server.init
diff options
context:
space:
mode:
authorJason Reiss <jreiss@multitech.com>2020-03-12 12:41:38 -0500
committerJohn Klug <john.klug@multitech.com>2020-06-18 20:22:07 -0500
commita3020c1257ad6bd653b5c619f1552b5e22fe7e0c (patch)
tree24f149cc19a84d2bf92164ebd5397efac8c5ce15 /recipes-connectivity/lora/lora-network-server/lora-network-server.init
parent9ac778701169bc5110d5a011198366d13e3fed2b (diff)
downloadmeta-mlinux-a3020c1257ad6bd653b5c619f1552b5e22fe7e0c.tar.gz
meta-mlinux-a3020c1257ad6bd653b5c619f1552b5e22fe7e0c.tar.bz2
meta-mlinux-a3020c1257ad6bd653b5c619f1552b5e22fe7e0c.zip
lora: add MTCAP2 global_conf files, adjust init scripts to detect MTCAP2
Diffstat (limited to 'recipes-connectivity/lora/lora-network-server/lora-network-server.init')
-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