summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-network-server
diff options
context:
space:
mode:
authorJason Reiss <jreiss@multitech.com>2016-11-02 11:17:34 -0500
committerJason Reiss <jreiss@multitech.com>2016-11-02 11:17:34 -0500
commit1bb2e0d8e48d956e8140590840c47ca29cc96175 (patch)
tree8c49f6927d994f0b769608d2348403377f7e936d /recipes-connectivity/lora/lora-network-server
parent5362bf1fc4b8da40f1c7a6b00996f6a24adb4a62 (diff)
downloadmeta-mlinux-1bb2e0d8e48d956e8140590840c47ca29cc96175.tar.gz
meta-mlinux-1bb2e0d8e48d956e8140590840c47ca29cc96175.tar.bz2
meta-mlinux-1bb2e0d8e48d956e8140590840c47ca29cc96175.zip
lora: remove 1.1 lora card from network server init script
look for SPI suffix on product-id to mark 1.0 SPI vs USB
Diffstat (limited to 'recipes-connectivity/lora/lora-network-server')
-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