m
This commit is contained in:
parent
f91f6dd837
commit
37b773d08a
18
run.sh
18
run.sh
@ -199,10 +199,16 @@ echo "******************"
|
|||||||
echo "******************"
|
echo "******************"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
|
||||||
|
# Fire up the forwarder.
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
|
||||||
# Reset the board to a known state prior to launching the forwarder
|
# Reset the board to a known state prior to launching the forwarder
|
||||||
|
|
||||||
if [[ $GW_TYPE == "imst-ic880a-spi" ]]; then
|
if [[ $GW_TYPE == "imst-ic880a-spi" ]]; then
|
||||||
echo "Toggling reset pin on IMST iC880A-SPI Board"
|
echo "[TTN Gateway]: Toggling reset pin on IMST iC880A-SPI Board"
|
||||||
gpio -1 mode 22 out
|
gpio -1 mode 22 out
|
||||||
gpio -1 write 22 0
|
gpio -1 write 22 0
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
@ -211,7 +217,7 @@ if [[ $GW_TYPE == "imst-ic880a-spi" ]]; then
|
|||||||
gpio -1 write 22 0
|
gpio -1 write 22 0
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
elif [[ $GW_TYPE == "linklabs-dev" ]]; then
|
elif [[ $GW_TYPE == "linklabs-dev" ]]; then
|
||||||
echo "Toggling reset pin on LinkLabs Raspberry Pi Development Board"
|
echo "[TTN Gateway]: Toggling reset pin on LinkLabs Raspberry Pi Development Board"
|
||||||
gpio -1 mode 29 out
|
gpio -1 mode 29 out
|
||||||
gpio -1 write 29 0
|
gpio -1 write 29 0
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
@ -223,7 +229,7 @@ elif [[ $GW_TYPE == "risinghf" ]]; then
|
|||||||
## found this info via gwrst.sh in the risinghf loriot concentrator install package
|
## found this info via gwrst.sh in the risinghf loriot concentrator install package
|
||||||
## that info toggled pin 2, which I must assume to be Wiring's GPIO02 and thus
|
## that info toggled pin 2, which I must assume to be Wiring's GPIO02 and thus
|
||||||
## pin BCM27/RPI13 on Raspberry Pi. It couldn't be RPi pin 2 because that's 5VDC.
|
## pin BCM27/RPI13 on Raspberry Pi. It couldn't be RPi pin 2 because that's 5VDC.
|
||||||
echo "Toggling reset pin on Rising HF Board"
|
echo "[TTN Gateway]: Toggling reset pin on Rising HF Board"
|
||||||
gpio -1 mode 13 out
|
gpio -1 mode 13 out
|
||||||
gpio -1 write 13 0
|
gpio -1 write 13 0
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
@ -232,6 +238,7 @@ elif [[ $GW_TYPE == "risinghf" ]]; then
|
|||||||
gpio -1 write 13 0
|
gpio -1 write 13 0
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
elif [[ $GW_TYPE == "custom" ]]; then
|
elif [[ $GW_TYPE == "custom" ]]; then
|
||||||
|
echo "[TTN Gateway]: Toggling custom reset pin $CUSTOM_RESET_PIN"
|
||||||
gpio -1 mode $CUSTOM_RESET_PIN out
|
gpio -1 mode $CUSTOM_RESET_PIN out
|
||||||
gpio -1 write $CUSTOM_RESET_PIN 0
|
gpio -1 write $CUSTOM_RESET_PIN 0
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
@ -245,14 +252,11 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fire up the forwarder.
|
|
||||||
|
|
||||||
while true
|
|
||||||
do
|
|
||||||
echo "[TTN Gateway]: Starting packet forwarder..."
|
echo "[TTN Gateway]: Starting packet forwarder..."
|
||||||
./ttn-gateway
|
./ttn-gateway
|
||||||
echo "******************"
|
echo "******************"
|
||||||
echo "*** [TTN Gateway]: EXIT (retrying in 15s)"
|
echo "*** [TTN Gateway]: EXIT (retrying in 15s)"
|
||||||
echo "******************"
|
echo "******************"
|
||||||
sleep 15
|
sleep 15
|
||||||
|
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user