Lora-net / lora_gateway

Driver/HAL to build a gateway using a concentrator board based on Semtech SX1301 multi-channel modem and SX1257/SX1255 RF transceivers.
Other
917 stars 742 forks source link

Proposed change to reset_lgw.sh to allow a different GPIO to be used. #24

Closed brixworth closed 7 years ago

brixworth commented 7 years ago

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

./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

mcoracin commented 7 years ago

Hello,

Thanks for the proposal, I can add this for the next release.

Regards