diff options
author | Jason Reiss <jreiss@multitech.com> | 2020-03-12 12:41:38 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2020-06-18 20:22:07 -0500 |
commit | a3020c1257ad6bd653b5c619f1552b5e22fe7e0c (patch) | |
tree | 24f149cc19a84d2bf92164ebd5397efac8c5ce15 /recipes-connectivity/lora/lora-network-server/lora-network-server.init | |
parent | 9ac778701169bc5110d5a011198366d13e3fed2b (diff) | |
download | meta-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-x | recipes-connectivity/lora/lora-network-server/lora-network-server.init | 14 |
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 |