Skip to content

Commit

Permalink
Merge pull request #41 from RAKWireless/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
RAKzhuqi authored Dec 9, 2020
2 parents 21e4af1 + ade51ef commit 487c623
Show file tree
Hide file tree
Showing 92 changed files with 5,862 additions and 289 deletions.
59 changes: 29 additions & 30 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,30 @@

## Introduction

The aim of this project is to help users set up a LoRa network easily. The User Guide can be get from our Web.
The aim of this project is to help users to use the RAK Raspberry Pi Developer Gateway more easily. The User Guide can be get from our Web(https://docs.rakwireless.com/Introduction/).

## Supported platforms

This project currently provides support for the below platforms.
* RAK831
* RAK833(USB/SPI)
* RAK2245
* RAK2247(USB/SPI)
* RAK7243/RAK7244
* RAK7243/RAK7244 no LTE
* RAK7243/RAK7244 with LTE
* RAK833(USB)
* RAK2247(USB)
* RAK833(SPI)
* RAK2247(SPI)
* RAK2246
* RAK2287
* RAK7248 no LTE (RAK2287 + raspberry pi)
* RAK7248 with LTE (RAK2287 + LTE + raspberry pi)
* RAK2285

## Changelog
2020-11-25 V4.2.6

* 1.Added support for RAK7248C.
* 2.Added support for class B in global_conf.json, but it is disabled by default. When needed, you can enable it in `/opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/global_conf.json`.

2020-09-01 V4.2.5

* 1.Add AS920_923.
Expand Down Expand Up @@ -94,31 +103,21 @@ step3 : Clone the installer and start the installation (More installation option
step4 : Next you will see some messages as follow. Please select the corresponding hardware model.

Please select your gateway model:
* 1.RAK831
* 2.RAK2245
* 3.RAK7243/RAK7244 no LTE
* 4.RAK7243/RAK7244 with LTE
* 5.RAK833(USB)
* 6.RAK2247(USB)
* 7.RAK833(SPI)
* 8.RAK2247(SPI)
* 9.RAK2246
* 10.RAK2287(SPI)
* 11.RAK2285
Please enter 1-11 to select the model:

step5 : Wait a moment and the installation is complete.If your gateway uses a wired connection, please reconfigure the LAN's IP address using "sudo gateway-config" after the installation is complete.
* 1.RAK831
* 2.RAK2245
* 3.RAK7243/RAK7244 no LTE
* 4.RAK7243/RAK7244 with LTE
* 5.RAK833(USB)
* 6.RAK2247(USB)
* 7.RAK833(SPI)
* 8.RAK2247(SPI)
* 9.RAK2246
* 10.RAK7248 no LTE (RAK2287 + raspberry pi)
* 11.RAK7248 with LTE (RAK2287 + LTE + raspberry pi)
* 12.RAK2285
Please enter 1-12 to select the model:

step5 : Wait a moment and the installation is complete.

step6 : For more other features, please use "sudo gateway-config".




## Note: The following content is contributed by @x893:

For DietPi OS need add
apt install build-essential net-tools -y
in rak/install.sh (for example before apt install git ppp dialog jq minicom monit -y)
and need check hciuart enabled because
systemctl disable hciuart
not installed and script fail.
39 changes: 22 additions & 17 deletions choose_model.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,19 @@ do_check_variable_type_echo(){
function echo_model_info()
{
echo_yellow "Please select your gateway model:"
echo_yellow "*\t1.RAK831"
echo_yellow "*\t2.RAK2245"
echo_yellow "*\t3.RAK7243/RAK7244 no LTE"
echo_yellow "*\t4.RAK7243/RAK7244 with LTE"
echo_yellow "*\t5.RAK833(USB)"
echo_yellow "*\t6.RAK2247(USB)"
echo_yellow "*\t7.RAK833(SPI)"
echo_yellow "*\t8.RAK2247(SPI)"
echo_yellow "*\t9.RAK2246"
echo_yellow "*\t10.RAK2287(SPI)"
echo_yellow "*\t11.RAK2285"
echo_yellow "Please enter 1-11 to select the model:\c"
echo_yellow "*\t 1.RAK831"
echo_yellow "*\t 2.RAK2245"
echo_yellow "*\t 3.RAK7243/RAK7244 no LTE"
echo_yellow "*\t 4.RAK7243/RAK7244 with LTE"
echo_yellow "*\t 5.RAK833(USB)"
echo_yellow "*\t 6.RAK2247(USB)"
echo_yellow "*\t 7.RAK833(SPI)"
echo_yellow "*\t 8.RAK2247(SPI)"
echo_yellow "*\t 9.RAK2246"
echo_yellow "*\t10.RAK7248 no LTE (RAK2287 + raspberry pi)"
echo_yellow "*\t11.RAK7248 with LTE (RAK2287 + LTE + raspberry pi)"
echo_yellow "*\t12.RAK2285"
echo_yellow "Please enter 1-12 to select the model:\c"
}

function do_set_model_to_json()
Expand Down Expand Up @@ -78,7 +79,7 @@ function do_set_model_to_json()
GW_MODEL=RAK7243
fi
INSTALL_LTE=1
do_set_spi_to_json 0
do_set_spi_to_json 1
elif [ $1 -eq 5 ]; then
GW_MODEL=RAK833
do_set_spi_to_json 0
Expand All @@ -95,9 +96,13 @@ function do_set_model_to_json()
GW_MODEL=RAK2246
do_set_spi_to_json 1
elif [ $1 -eq 10 ]; then
GW_MODEL=RAK2287
GW_MODEL=RAK7248
do_set_spi_to_json 1
elif [ $1 -eq 11 ]; then
GW_MODEL=RAK7248
do_set_spi_to_json 1
INSTALL_LTE=1
elif [ $1 -eq 12 ]; then
GW_MODEL=RAK2285
do_set_spi_to_json 1
else
Expand Down Expand Up @@ -128,23 +133,23 @@ function do_set_model()
do
read RAK_MODEL
if [ -z "$RAK_MODEL" ]; then
echo_yellow "Please enter 1-11 to select the model:\c"
echo_yellow "Please enter 1-12 to select the model:\c"
continue
fi

do_check_variable_type $RAK_MODEL
RET=$?

if [ $RET -eq 0 ]; then
if [ $RAK_MODEL -lt 1 ] || [ $RAK_MODEL -gt 11 ]; then
if [ $RAK_MODEL -lt 1 ] || [ $RAK_MODEL -gt 12 ]; then
echo_yellow "Please enter 1-10 to select the model:\c"
continue
else
do_set_model_to_json $RAK_MODEL
return 0
fi
else
echo_yellow "Please enter 1-11 to select the model:\c"
echo_yellow "Please enter 1-12 to select the model:\c"
continue

fi
Expand Down
100 changes: 53 additions & 47 deletions lora/install_normal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,56 +20,61 @@ INSTALL_LTE=`do_get_gw_install_lte`

mkdir /opt/ttn-gateway -p

if [ "$INSTALL_LTE" = "1" ]; then
pushd rak7243
./install.sh
LORA_DIR_TMP=rak7243
popd

if [ "${RAK_GW_MODEL}" = "RAK2247" ] || [ "${RAK_GW_MODEL}" = "RAK833" ]; then
if [ "${LORA_SPI}" = "1" ]; then
pushd rak2247_spi
./install.sh
LORA_DIR_TMP=rak2247_spi
else
pushd rak2247_usb
./install.sh
LORA_DIR_TMP=rak2247_usb
fi
popd
elif [ "${RAK_GW_MODEL}" = "RAK2287" ] ; then
pushd rak2287_spi
if [ "${INSTALL_LTE}" = "1" ]; then
cp global_conf_i2c global_conf -rf
else
cp global_conf_uart global_conf -rf
fi
./install.sh
LORA_DIR_TMP=rak2287_spi
popd
elif [ "${RAK_GW_MODEL}" = "RAK7243" ] || [ "${RAK_GW_MODEL}" = "RAK7244" ]; then
pushd rak7243
if [ "${INSTALL_LTE}" = "1" ]; then
cp global_conf_i2c global_conf -rf
else
cp global_conf_uart global_conf -rf
fi
./install.sh
LORA_DIR_TMP=rak7243
popd
elif [ "${RAK_GW_MODEL}" = "RAK2285" ]; then

pushd rak2285
LORA_DIR_TMP=rak2285
./install.sh

popd
else
if [ "${RAK_GW_MODEL}" = "RAK2247" ] || [ "${RAK_GW_MODEL}" = "RAK833" ]; then
if [ "${LORA_SPI}" = "1" ]; then
pushd rak2247_spi
./install.sh
LORA_DIR_TMP=rak2247_spi
else
pushd rak2247_usb
./install.sh
LORA_DIR_TMP=rak2247_usb
fi
popd
elif [ "${RAK_GW_MODEL}" = "RAK2287" ]; then
if [ "${LORA_SPI}" = "1" ]; then
pushd rak2287_spi
./install.sh
LORA_DIR_TMP=rak2287_spi
else
pushd rak2287_usb
./install.sh
LORA_DIR_TMP=rak2287_usb
fi
popd
elif [ "${RAK_GW_MODEL}" = "RAK2285" ]; then

pushd rak2285
LORA_DIR_TMP=rak2285
./install.sh

popd
else
if [ "${RAK_GW_MODEL}" = "RAK2246" ]; then
pushd rak2246
./install.sh
LORA_DIR_TMP=rak2246
else
pushd rak2245
./install.sh
LORA_DIR_TMP=rak2245
fi
popd
fi
if [ "${RAK_GW_MODEL}" = "RAK2246" ]; then
pushd rak2246
./install.sh
LORA_DIR_TMP=rak2246
else
pushd rak7243
cp global_conf_uart global_conf -rf
./install.sh
LORA_DIR_TMP=rak7243
fi
popd
fi

if [ -d $SCRIPT_DIR/../lora_gateway ]; then

if [ -d $LORA_DIR_TMP/lora_gateway ]; then
cp $LORA_DIR_TMP/lora_gateway /opt/ttn-gateway/ -rf
fi
cp $LORA_DIR_TMP/packet_forwarder /opt/ttn-gateway/ -rf
Expand All @@ -89,4 +94,5 @@ if [ $rpi_model -eq 3 ] || [ $rpi_model -eq 4 ]; then
fi

systemctl enable ttn-gateway.service
systemctl restart ttn-gateway.service

15 changes: 8 additions & 7 deletions lora/rak2245/global_conf/global_conf.as_920_923.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
"fake_gps":false,
"autoquit_threshold":30,
"gps_tty_path":"/dev/ttyAMA0",
"beacon_freq_hz":923400000,
"beacon_freq_nb":1,
"beacon_freq_step":600000,
"beacon_datarate":9,
"beacon_bw_hz":125000,
"beacon_power":20,
"beacon_period":0
"beacon_period": 0, /* disable class B beacon */
"beacon_freq_hz": 923400000,
"beacon_freq_nb": 1,
"beacon_freq_step": 0,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 27

},
"SX1301_conf":
{
Expand Down
9 changes: 8 additions & 1 deletion lora/rak2245/global_conf/global_conf.as_923_925.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,14 @@
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
"autoquit_threshold": 20,
"beacon_period": 0, /* disable class B beacon */
"beacon_freq_hz": 923400000,
"beacon_freq_nb": 1,
"beacon_freq_step": 0,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 27
}

}
9 changes: 8 additions & 1 deletion lora/rak2245/global_conf/global_conf.au_915_928.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,14 @@
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
"autoquit_threshold": 20,
"beacon_period": 0, /* disable class B beacon */
"beacon_freq_hz": 923300000,
"beacon_freq_nb": 8,
"beacon_freq_step": 600000,
"beacon_datarate": 12,
"beacon_bw_hz": 500000,
"beacon_power": 27
}

}
Expand Down
9 changes: 8 additions & 1 deletion lora/rak2245/global_conf/global_conf.cn_470_510.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,14 @@
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
"autoquit_threshold": 20,
"beacon_period": 0, /* disable class B beacon */
"beacon_freq_hz": 508300000,
"beacon_freq_nb": 8,
"beacon_freq_step": 200000,
"beacon_datarate": 10,
"beacon_bw_hz": 125000,
"beacon_power": 27
}
}

9 changes: 8 additions & 1 deletion lora/rak2245/global_conf/global_conf.eu_433.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,14 @@
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
"autoquit_threshold": 20,
"beacon_period": 0, /* disable class B beacon */
"beacon_freq_hz": 434665000,
"beacon_freq_nb": 1,
"beacon_freq_step": 0,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 27
}
}

9 changes: 8 additions & 1 deletion lora/rak2245/global_conf/global_conf.eu_863_870.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
"autoquit_threshold": 20,
"beacon_period": 0, /* disable class B beacon */
"beacon_freq_hz": 869525000,
"beacon_freq_nb": 1,
"beacon_freq_step": 0,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 27
}
}
9 changes: 8 additions & 1 deletion lora/rak2245/global_conf/global_conf.in_865_867.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,14 @@
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
"autoquit_threshold": 20,
"beacon_period": 0, /* disable class B beacon */
"beacon_freq_hz": 866500000,
"beacon_freq_nb": 1,
"beacon_freq_step": 0,
"beacon_datarate": 8,
"beacon_bw_hz": 125000,
"beacon_power": 27
}

}
Expand Down
Loading

0 comments on commit 487c623

Please sign in to comment.