summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-network-server
diff options
context:
space:
mode:
authorJason Reiss <jreiss@multitech.com>2016-11-09 09:27:08 -0600
committerJason Reiss <jreiss@multitech.com>2016-11-09 09:27:08 -0600
commitfe4ec81b4aa74350b17f5b78aa438e09e0a2060c (patch)
tree3622bd7e987bcd1e76bdfa6fa55655ce4155c8df /recipes-connectivity/lora/lora-network-server
parentfb8a4478dfaf022425f6abae4ecf12f19b8f5fd4 (diff)
downloadmeta-mlinux-fe4ec81b4aa74350b17f5b78aa438e09e0a2060c.tar.gz
meta-mlinux-fe4ec81b4aa74350b17f5b78aa438e09e0a2060c.tar.bz2
meta-mlinux-fe4ec81b4aa74350b17f5b78aa438e09e0a2060c.zip
lora: network server init script to copy default global_conf.json file based on card type to match calibration data
packet forwarder to install 1.0 and 1.5 default global_conf.json files
Diffstat (limited to 'recipes-connectivity/lora/lora-network-server')
-rwxr-xr-xrecipes-connectivity/lora/lora-network-server/lora-network-server.init11
1 files changed, 8 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 75b753c..75e43c9 100755
--- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init
+++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
@@ -53,13 +53,18 @@ card_found() {
if [[ "$lora_id" =~ "$lora_us_id" ]] || [[ "$lora_id" =~ "$lora_eu_id" ]]; then
if [ "$lora_hw" = "$lora_hw" ] && [[ ! "$lora_id" =~ .*-SPI ]]; then
+ cp /opt/lora/global_conf.json.MTAC_LORA_1_0 /opt/lora/global_conf.json
ln -sf /opt/lora/basic_pkt_fwd-usb $pkt_fwd
return 0
- elif [ "$lora_hw" = "$lora_1_0_hw" ] || [ "$lora_hw" = "$lora_1_5_h_hw" ]; then
+ else
+ if [ "$lora_hw" = "$lora_1_0_hw" ]; then
+ cp /opt/lora/global_conf.json.MTAC_LORA_1_0 /opt/lora/global_conf.json
+ fi
+ if [ "$lora_hw" = "$lora_1_5_h_hw" ]; then
+ cp /opt/lora/global_conf.json.MTAC_LORA_1_5 /opt/lora/global_conf.json
+ fi
ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd
return 0
- else
- return 1
fi
else
return 1