Skip to content

Commit 4785c43

Browse files
committed
Update ChirpStack Concentratord + gateway-config script.
1 parent dfc4a4b commit 4785c43

14 files changed

+78
-123
lines changed

layers/chirpstack/meta-chirpstack/recipes-chirpstack/chirpstack-concentratord/chirpstack-concentratord-base_3.1.0.bb

Lines changed: 0 additions & 28 deletions
This file was deleted.

layers/chirpstack/meta-chirpstack/recipes-chirpstack/chirpstack-concentratord/chirpstack-concentratord-sx1301_3.0.0-test.10.bb

Lines changed: 0 additions & 15 deletions
This file was deleted.

layers/chirpstack/meta-chirpstack/recipes-chirpstack/chirpstack-concentratord/chirpstack-concentratord-sx1302_3.0.0-test.10.bb

Lines changed: 0 additions & 15 deletions
This file was deleted.

layers/chirpstack/meta-chirpstack/recipes-chirpstack/chirpstack-concentratord/chirpstack-concentratord.inc

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
HOMEPAGE = "https://www.chirpstack.io/"
2+
DESCRIPTION = "ChirpStack Concentratord"
3+
LICENSE = "MIT"
4+
LIC_FILES_CHKSUM = "file://LICENSE;md5=99e425257f8a67b7efd81dc0009ed8ff"
5+
PR = "r1"
6+
7+
SRC_URI = "\
8+
git://github.com/brocaar/chirpstack-concentratord.git;protocol=git;tag=v${PV} \
9+
file://chirpstack-concentratord.default \
10+
file://chirpstack-concentratord.init \
11+
file://chirpstack-concentratord.monit \
12+
"
13+
DEPENDS = "\
14+
clang-native \
15+
libloragw-sx1301 \
16+
libloragw-sx1302 \
17+
"
18+
19+
inherit cargo update-rc.d
20+
21+
INITSCRIPT_NAME = "chirpstack-concentratord"
22+
INITSCRIPT_PARAMS = "defaults"
23+
24+
S = "${WORKDIR}/git"
25+
26+
export BINDGEN_EXTRA_CLANG_ARGS="-I${STAGING_INCDIR}"
27+
28+
do_install() {
29+
install -d ${D}${sysconfdir}/init.d
30+
install -d ${D}${sysconfdir}/monit.d
31+
install -d ${D}${sysconfdir}/default
32+
install -d ${D}${bindir}
33+
34+
if [ "${CARGO_BUILD_TYPE}" = "--release" ]; then
35+
local cargo_bindir="${CARGO_RELEASE_DIR}"
36+
else
37+
local cargo_bindir="${CARGO_DEBUG_DIR}"
38+
fi
39+
40+
install -m 0755 ../chirpstack-concentratord.init ${D}${sysconfdir}/init.d/chirpstack-concentratord
41+
install -m 0644 ../chirpstack-concentratord.monit ${D}${sysconfdir}/monit.d/chirpstack-concentratord
42+
install -m 0644 ../chirpstack-concentratord.default ${D}${sysconfdir}/default/chirpstack-concentratord
43+
44+
install -m 0755 ${cargo_bindir}/chirpstack-concentratord-sx1301 ${D}${bindir}
45+
install -m 0755 ${cargo_bindir}/chirpstack-concentratord-sx1302 ${D}${bindir}
46+
install -m 0755 ${cargo_bindir}/gateway-id ${D}${bindir}
47+
}
48+
49+
PACKAGES += "${PN}-sx1301 ${PN}-sx1302"
50+
51+
FILES_${PN} = "${sysconfdir} ${bindir}/gateway-id"
52+
FILES_${PN}-sx1301 = "${bindir}/chirpstack-concentratord-sx1301"
53+
FILES_${PN}-sx1302 = "${bindir}/chirpstack-concentratord-sx1302"

layers/chirpstack/meta-chirpstack/recipes-chirpstack/chirpstack-concentratord/gateway-id_3.0.0-test.10.bb

Lines changed: 0 additions & 15 deletions
This file was deleted.

layers/targets/meta-raspberrypi/recipes-chirpstack/chirpstack-concentratord/chirpstack-concentratord-sx1302_%.bbappend

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,24 @@ SRC_URI_append = "\
2222
file://sx1301/us915_5.toml \
2323
file://sx1301/us915_6.toml \
2424
file://sx1301/us915_7.toml \
25+
file://sx1302/global.toml \
26+
file://sx1302/eu868.toml \
27+
file://sx1302/eu868_0.toml \
28+
file://sx1302/us915.toml \
29+
file://sx1302/us915_0.toml \
30+
file://sx1302/us915_1.toml \
31+
file://sx1302/us915_2.toml \
32+
file://sx1302/us915_3.toml \
33+
file://sx1302/us915_4.toml \
34+
file://sx1302/us915_5.toml \
35+
file://sx1302/us915_6.toml \
36+
file://sx1302/us915_7.toml \
2537
"
2638

2739
do_install_append() {
2840
install -d ${D}${sysconfdir}/chirpstack-concentratord/sx1301/examples
2941
install -m 0644 ${WORKDIR}/sx1301/*.toml ${D}${sysconfdir}/chirpstack-concentratord/sx1301/examples
42+
43+
install -d ${D}${sysconfdir}/chirpstack-concentratord/sx1302/examples
44+
install -m 0644 ${WORKDIR}/sx1302/* ${D}${sysconfdir}/chirpstack-concentratord/sx1302/examples
3045
}

layers/targets/meta-raspberrypi/recipes-core/gateway-config/files/gateway-config.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ do_main_menu() {
1010
GATEWAY_ID="not configured"
1111
fi
1212

13-
FUN=$(dialog --cr-wrap --title "ChirpStack Gateway OS" --cancel-label "Quit" --menu "Version: $VERSION\nGateway ID: $GATEWAY_ID\n " 17 65 7 \
13+
FUN=$(dialog --cr-wrap --title "ChirpStack Gateway OS" --cancel-label "Quit" --menu "Version: $VERSION\nGateway ID: $GATEWAY_ID\n " 17 65 8 \
1414
1 "Setup LoRa concentrator shield" \
1515
2 "Edit ChirpStack Concentratord config" \
1616
3 "Edit ChirpStack Gateway Bridge config" \
1717
4 "Restart ChirpStack Concentratord" \
1818
5 "Restart ChirpStack Gateway Bridge" \
1919
6 "Configure WIFI" \
2020
7 "Set admin password" \
21+
8 "Reload Gateway ID" \
2122
3>&1 1>&2 2>&3)
2223
RET=$?
2324
if [ $RET -eq 1 ]; then
@@ -32,6 +33,7 @@ do_main_menu() {
3233
5) do_restart_chirpstack_gateway_bridge;;
3334
6) do_configure_wifi;;
3435
7) do_setup_admin_password;;
36+
8) ;;
3537
esac
3638
fi
3739
done
@@ -125,15 +127,15 @@ do_setup_imst_lite() {
125127
do_setup_pislora() {
126128
FUN=$(dialog --title "Channel-plan configuration" --menu "Select the channel-plan:" 15 60 2 \
127129
1 "EU868" \
128-
3 "US915" \
130+
2 "US915" \
129131
3>&1 1>&2 2>&3)
130132
RET=$?
131133
if [ $RET -eq 1 ]; then
132134
do_main_menu
133135
elif [ $RET -eq 0 ]; then
134136
case "$FUN" in
135-
1) do_copy_concentratord_config "sx1301" "generic_eu868" "" "eu868" "0" && do_copy_chirpstack_ns_config "eu868";;
136-
2) do_select_us915_block "sx1301" "generic_us915" "";;
137+
1) do_copy_concentratord_config "sx1301" "pi_supply_lora_gateway_hat_eu868" "" "eu868" "0" && do_copy_chirpstack_ns_config "eu868";;
138+
2) do_select_us915_block "sx1301" "pi_supply_lora_gateway_hat_us915" "";;
137139
esac
138140
fi
139141
}
File renamed without changes.

0 commit comments

Comments
 (0)