summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrecipes-connectivity/lora/lora-network-server/lora-network-server.init15
1 files changed, 7 insertions, 8 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 7a72b34..75b753c 100755
--- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init
+++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
@@ -30,9 +30,8 @@ port2=/sys/devices/platform/mts-io/ap2
lora_us_id="MTAC-LORA-915"
lora_eu_id="MTAC-LORA-868"
-lora_usb_hw="MTAC-LORA-1.0"
-lora_spi_hw="MTAC-LORA-1.1"
-lora_h_hw="MTAC-LORA-1.5"
+lora_1_0_hw="MTAC-LORA-1.0"
+lora_1_5_h_hw="MTAC-LORA-1.5"
read_card_info() {
@@ -52,13 +51,13 @@ card_found() {
ln -sf /dev/spidev32765.2 /dev/spidev0.0
fi
- if [ "$lora_id" = "$lora_us_id" ] || [ "$lora_id" = "$lora_eu_id" ]; then
- if [ "$lora_hw" = "$lora_spi_hw" ] || [ "$lora_hw" = "$lora_h_hw" ]; then
- ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd
- return 0
- elif [ "$lora_hw" = "$lora_usb_hw" ]; then
+ if [[ "$lora_id" =~ "$lora_us_id" ]] || [[ "$lora_id" =~ "$lora_eu_id" ]]; then
+ if [ "$lora_hw" = "$lora_hw" ] && [[ ! "$lora_id" =~ .*-SPI ]]; then
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
+ ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd
+ return 0
else
return 1
fi