summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Bayer <bbayer@multitech.com>2016-11-07 17:02:49 -0600
committerBrandon Bayer <bbayer@multitech.com>2016-11-07 17:03:28 -0600
commite3376e7c8bb110735b9fbdf0325f75dcaeaa7b36 (patch)
treee9d388279c1eae2667e034e9d9db0d5cf092e72a
parentd0d3744a7c18ad2bc9632671571c9f0e36475b19 (diff)
downloadmeta-mlinux-e3376e7c8bb110735b9fbdf0325f75dcaeaa7b36.tar.gz
meta-mlinux-e3376e7c8bb110735b9fbdf0325f75dcaeaa7b36.tar.bz2
meta-mlinux-e3376e7c8bb110735b9fbdf0325f75dcaeaa7b36.zip
mtcap:fix: use lora eui in eeprom for global_conf.json
-rwxr-xr-xrecipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init8
1 files changed, 7 insertions, 1 deletions
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init
index 259243e..8c0894a 100755
--- a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init
+++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init
@@ -13,7 +13,13 @@ pkt_fwd_pidfile=$run_dir/lora-pkt-fwd-1.pid
log_file=/var/log/lora-pkt-fwd.log
do_start() {
- echo -n "Starting $NAME: "
+ echo "Starting $NAME: "
+
+ eui=$(mts-io-sysfs show lora/eui)
+ # Remove colons
+ clean_eui="${eui//:/}"
+ echo "Setting gateway_id in global_conf.json to $clean_eui"
+ sed -i "s/\"gateway_ID\": \".*\"/\"gateway_ID\": \"$clean_eui\"/" global_conf.json
mkdir -p $run_dir