summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-network-server
diff options
context:
space:
mode:
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