summaryrefslogtreecommitdiff
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
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
-rwxr-xr-xrecipes-connectivity/lora/lora-network-server/lora-network-server.init11
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb8
2 files changed, 14 insertions, 5 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
diff --git a/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb b/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb
index 3f5be37..588795c 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb
+++ b/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb
@@ -6,7 +6,7 @@ SECTION = "console/utils"
LICENSE = "SEMTECH"
LIC_FILES_CHKSUM = "file://LICENSE;md5=22af7693d7b76ef0fc76161c4be76c45"
DEPENDS = "lora-gateway"
-PR = "r4"
+PR = "r5"
SRCREV = "v${PV}"
@@ -15,6 +15,8 @@ SRC_URI = "git://github.com/Lora-net/packet_forwarder.git;protocol=git \
file://lora-packet-forwarder.init \
file://lora-packet-forwarder.default \
file://global_conf.json.3.0.0.PCB_E336.EU868.basic.clksrc0 \
+ file://global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 \
+ file://global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 \
file://local_conf.json \
file://lora-packet-forwarder-add-spi-dev-path.patch \
"
@@ -35,7 +37,9 @@ do_compile() {
do_install() {
install -d ${D}${LORA_DIR}
install -m 755 lora_pkt_fwd/lora_pkt_fwd ${D}${LORA_DIR}/
- install -m 755 ${WORKDIR}/global_conf.json.3.0.0.PCB_E336.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json
+ install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json
+ install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0
+ install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5
install -m 755 ${WORKDIR}/local_conf.json ${D}${LORA_DIR}/
install -d ${D}${LORA_DIR}/forwarder-utils