From 16a81ff8b5b3502fdd21250eeaa45557568e6b3d Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Thu, 9 Feb 2023 22:36:35 -0600 Subject: Added lora 2.4g card setup --- .../lora/lora-network-server/lora-network-server.init | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'recipes-connectivity/lora/lora-network-server') 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 0c1ae19..8e2e729 100755 --- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init +++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init @@ -117,6 +117,23 @@ hardware_found() { fi } +setup_mtcdt_2g4() { + mts-io-sysfs store lora/reset 0 + mts-io-sysfs store lora/boot 0 + sleep 0.25 + mts-io-sysfs store lora/reset 1 + GLOBAL_CONF=/opt/lora/global_conf.json.2g4 + set +e + diff $GLOBAL_CONF /opt/lora/global_conf.json 1>/dev/null + if [ $? -ne 0 ]; then + cp $GLOBAL_CONF /opt/lora/global_conf.json + fi + set -e + ln -sf /opt/lora/lora_pkt_fwd_2g4 $pkt_fwd + ln -sf /opt/lora/lora_pkt_fwd_2g4 $pkt_fwd_2 + return 0 +} + setup_mtcdt_2_1() { if [[ "$lora_id" = "$lora_mtac_g16_id868" ]]; then GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_2_1_loc_single_antenna_16ch_EU868 -- cgit v1.2.3