Below is a proposed change to the script reset_lgw.sh to allow the GPIO number to be passed on the command line as the second argument. If no second argument is supplied, the script continues to use GPIO7 to maintain backwards compatibility.
8,9c8,9
< # ./reset_lgw.sh stop
< # ./reset_lgw.sh start
./reset_lgw.sh stop []
./reset_lgw.sh start []
11,12c11,21
< # The reset pin of SX1301 is wired with RPi GPIO7
< IOT_SK_SX1301_RESET_PIN=7
Which GPIO is wired to the reset pin of the SX1301? By default it is
assumed the GPIO is 7
Note: Using /bin/sh so need to use = and not == when testing
if [ "$2" = "" ]; then
IOT_SK_SX1301_RESET_PIN=7
else
IOT_SK_SX1301_RESET_PIN=$2
fi
Hi,
Below is a proposed change to the script reset_lgw.sh to allow the GPIO number to be passed on the command line as the second argument. If no second argument is supplied, the script continues to use GPIO7 to maintain backwards compatibility.
8,9c8,9 < # ./reset_lgw.sh stop
< # ./reset_lgw.sh start