From ba35462741987d9aac561272ce72c8bc0ee650bd Mon Sep 17 00:00:00 2001 From: Serhii Voloshynov Date: Fri, 26 Nov 2021 11:33:41 +0200 Subject: add udev rules for ubi partitions. it creates links /dev/ubi_config1 -> ubi0_4 /dev/ubi_config2 -> ubi0_5 /dev/ubi_oem1 -> ubi0_6 /dev/ubi_oem2 -> ubi0_7 /dev/ubi_rootfs1 -> ubi0_2 /dev/ubi_rootfs2 -> ubi0_3 /dev/ubi_uenv1 -> ubi0_0 /dev/ubi_uenv2 -> ubi0_1 /dev/ubi_user-data -> ubi0_8 --- recipes-core/udev/eudev/ubi.rules | 7 +++++++ recipes-core/udev/eudev_%.bbappend | 4 ++++ 2 files changed, 11 insertions(+) create mode 100644 recipes-core/udev/eudev/ubi.rules diff --git a/recipes-core/udev/eudev/ubi.rules b/recipes-core/udev/eudev/ubi.rules new file mode 100644 index 0000000..f681e27 --- /dev/null +++ b/recipes-core/udev/eudev/ubi.rules @@ -0,0 +1,7 @@ +SUBSYSTEM!="ubi", GOTO="ubi_end" +# only ubi devices +KERNEL!="ubi*", GOTO="ubi_end" + +SUBSYSTEM=="ubi", KERNEL=="ubi*_*", SYMLINK+="ubi_%s{name}" + +LABEL="ubi_end" diff --git a/recipes-core/udev/eudev_%.bbappend b/recipes-core/udev/eudev_%.bbappend index 364288e..539cfb2 100644 --- a/recipes-core/udev/eudev_%.bbappend +++ b/recipes-core/udev/eudev_%.bbappend @@ -6,6 +6,7 @@ PR .= ".mlinux7" # add custom rules for persistent modem device names SRC_URI += "file://cellular_radios.rules \ file://cellular_radios.sh \ + file://ubi.rules \ file://${MACHINE}.rules" do_install_append() { @@ -15,4 +16,7 @@ do_install_append() { install -m 755 ${WORKDIR}/cellular_radios.sh ${D}${sysconfdir}/udev/scripts/ } +do_install_append_mtcap3() { + install -m 644 ${WORKDIR}/ubi.rules ${D}${sysconfdir}/udev/rules.d/ +} -- cgit v1.2.3 From 3908aa3d25d583420d36976bc1a2f11f38b5410d Mon Sep 17 00:00:00 2001 From: Serhii Voloshynov Date: Fri, 26 Nov 2021 11:33:41 +0200 Subject: remove fstab manipulation --- .../multitech/overlayfs-init-ubi/overlayfs.init | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init b/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init index 7fc7f7e..0000f29 100644 --- a/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init +++ b/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init @@ -128,25 +128,8 @@ do_rw_mount() { done } - -TMP=/var/volatile -# Set the suffix number in /var/oem and /var/config to match root -fix_volume_names() { - if ! [[ $(cat /proc/cmdline) =~ root=ubi0:rootfs([0-9]+) ]] ; then - loginfo "Cannot find root=ubi0:rootfs in /proc/cmdline" - fi - vol_suffix=${BASH_REMATCH[1]} - echo $vol_suffix - sed -r "s/(ubi0:(oem|config))([0-9]*)/\1${vol_suffix}/" /etc/fstab >${TMP}/fstab - if ! cmp ${TMP}/fstab /etc/fstab ; then - loginfo "Updating fstab with new volume names" - cp ${TMP}/fstab /etc/fstab - fi -} - do_start() { do_rw_mount - fix_volume_names } case $1 in -- cgit v1.2.3 From 1049c2fd703c28fb688d3e75538534cc6e32445f Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Mon, 6 Dec 2021 16:02:44 +0200 Subject: MTCAP3: Fix fstab after introducing reduntant partitions Commit 3908aa3d25d583420d36976bc1a2f11f38b5410d removes the fstab manipulation. In mPower the configuration partition is selected during boot time from config.init, without modifying fstab, which in turn saves the flash erase cycles by not making nay changes on rootfs/overlay. This commit updates the fstab to permanently use the first configuration partition as /var/config. The second partition is not used in mLinux. This approach is similar to the one for mLinux on MTCDT3. If one needs a config partition switchover on mLinux - please implement it in a similar manner to mPower, wihout making changes on rootfs during boot. --- recipes-core/base-files/fstab-ubifs/fstab | 4 ++-- recipes-core/base-files/fstab-ubifs_1.0.bb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes-core/base-files/fstab-ubifs/fstab b/recipes-core/base-files/fstab-ubifs/fstab index 8cca798..4560bb3 100644 --- a/recipes-core/base-files/fstab-ubifs/fstab +++ b/recipes-core/base-files/fstab-ubifs/fstab @@ -6,5 +6,5 @@ tmpfs /run tmpfs mode=0755,nodev,nosuid,stri tmpfs /var/volatile tmpfs defaults 0 0 configfs /sys/kernel/config configfs defaults 0 0 -ubi0:config /var/config ubifs defaults 0 0 -ubi0:oem /var/oem ubifs defaults,ro 0 0 +ubi0:config1 /var/config ubifs defaults 0 0 +ubi0:oem1 /var/oem ubifs defaults,ro 0 0 diff --git a/recipes-core/base-files/fstab-ubifs_1.0.bb b/recipes-core/base-files/fstab-ubifs_1.0.bb index cd2102a..533293a 100644 --- a/recipes-core/base-files/fstab-ubifs_1.0.bb +++ b/recipes-core/base-files/fstab-ubifs_1.0.bb @@ -1,7 +1,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" inherit allarch -PR = "r1" +PR = "r2" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" PROVIDES = "fstab" DEPENDS = "base-files" -- cgit v1.2.3 From 12e34516aa2df00459f688abd70c506606c11f80 Mon Sep 17 00:00:00 2001 From: Andrii Pientsov Date: Wed, 26 Jan 2022 17:05:07 +0200 Subject: MTX-4363 mPower R.6.0.x: MTCAP3 - Reset overlayfs when switching rootfs on the boot counter overflow GP-1454 --- recipes-core/multitech/overlayfs-init-ubi/overlayfs.init | 6 +++--- recipes-core/multitech/overlayfs-init-ubi_0.1.bb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init b/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init index 0000f29..c23a1ce 100644 --- a/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init +++ b/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init @@ -12,7 +12,7 @@ USER_PARTITION="ubi0:user-data" # Erase the file system DO_ERASE_PERSISTENT="/mnt/user/.persistent/mts_do_erase_persistent" # Remove files not hidden -DO_CLEAR_PERSISTENT="/mnt/user/.persistent/mts_do_clear_persistent" +DO_CLEAR_PERSISTENT=$(fw_printenv default_reset_f | cut -d '"' -f2 | grep -Eo '[0-9]+$' || true) pid=$$ prefix="<3>overlayrootfs-generator[${pid}]: " @@ -69,7 +69,7 @@ do_clear_old() { mv "$FILE_PATH" "$MNT_USER/$FILE_NAME.old" 2>&1 | logpipe done do_remove_old - rm -f $DO_CLEAR_PERSISTENT + fw_setenv default_reset_f 0 } # Most efficient way to clear UBIFS file system @@ -99,7 +99,7 @@ do_rw_mount() { if [[ -f $DO_ERASE_PERSISTENT ]] ; then do_erase_old - elif [[ -f $DO_CLEAR_PERSISTENT ]] ; then + elif [[ "$DO_CLEAR_PERSISTENT" -eq 1 ]] ; then do_clear_old fi diff --git a/recipes-core/multitech/overlayfs-init-ubi_0.1.bb b/recipes-core/multitech/overlayfs-init-ubi_0.1.bb index a14ed2e..be7ea36 100644 --- a/recipes-core/multitech/overlayfs-init-ubi_0.1.bb +++ b/recipes-core/multitech/overlayfs-init-ubi_0.1.bb @@ -3,7 +3,7 @@ HOMEPAGE = "http://www.multitech.com/" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" PACKAGE_ARCH = "all" -PR = "r5" +PR = "6" RDEPENDS_${PN} += "bash" SRC_URI = " \ -- cgit v1.2.3 From f60c9ff1f9f1f161d9aba021827792d0df3d2ba7 Mon Sep 17 00:00:00 2001 From: Sergii Shchelkanov Date: Tue, 8 Feb 2022 19:13:58 +0200 Subject: MTCAP3 - bootlogd patch - no init scripts messages in console - fix --- .../bootlogd-support-more-console-names.patch | 66 ++++++++++++++++++++++ recipes-core/sysvinit/sysvinit_2.96.bbappend | 10 ++++ 2 files changed, 76 insertions(+) create mode 100644 recipes-core/sysvinit/sysvinit/bootlogd-support-more-console-names.patch create mode 100644 recipes-core/sysvinit/sysvinit_2.96.bbappend diff --git a/recipes-core/sysvinit/sysvinit/bootlogd-support-more-console-names.patch b/recipes-core/sysvinit/sysvinit/bootlogd-support-more-console-names.patch new file mode 100644 index 0000000..2286750 --- /dev/null +++ b/recipes-core/sysvinit/sysvinit/bootlogd-support-more-console-names.patch @@ -0,0 +1,66 @@ +From 8a085ea9b7f2d8e59cbf17e9c04b155fddab4dd9 Mon Sep 17 00:00:00 2001 +From: Jesse Smith +Date: Tue, 3 Aug 2021 18:21:16 -0300 +Subject: Applied patch from Matthias Schiffer which allows bootlogd to read + from a wider range of consoles. The console name is already passed in from + the kernel command line using "console=". We no longer filter out names as + strictly but do now check to confirm the "console=" device points to a valid + TTY. + +--- + src/bootlogd.c | 25 ++++++++++++++++++++++++- + 1 file changed, 24 insertions(+), 1 deletion(-) + +diff --git a/src/bootlogd.c b/src/bootlogd.c +index 787db87..78e4c81 100644 +--- a/src/bootlogd.c ++++ b/src/bootlogd.c +@@ -212,6 +212,22 @@ int findpty(int *master, int *slave, char *name) + + return 0; + } ++ ++static int istty(const char *dev) ++{ ++ int fd, ret; ++ ++ fd = open(dev, O_RDONLY|O_NONBLOCK); ++ if (fd < 0) ++ return 0; ++ ++ ret = isatty(fd); ++ ++ close(fd); ++ ++ return ret; ++} ++ + /* + * See if a console taken from the kernel command line maps + * to a character device we know about, and if we can open it. +@@ -228,7 +244,7 @@ int isconsole(char *s, char *res, int rlen) + l = strlen(c->cmdline); + if (sl <= l) continue; + p = s + l; +- if (strncmp(s, c->cmdline, l) != 0 || !isdigit(*p)) ++ if (strncmp(s, c->cmdline, l) != 0) + continue; + for (i = 0; i < 2; i++) { + snprintf(res, rlen, i ? c->dev1 : c->dev2, p); +@@ -239,6 +255,13 @@ int isconsole(char *s, char *res, int rlen) + } + } + } ++ ++ /* Fallback: accept any TTY device */ ++ snprintf(res, rlen, "/dev/%s", s); ++ if ((q = strchr(res, ',')) != NULL) *q = 0; ++ if (istty(res)) ++ return 1; ++ + return 0; + } + +-- +cgit v1.1 + diff --git a/recipes-core/sysvinit/sysvinit_2.96.bbappend b/recipes-core/sysvinit/sysvinit_2.96.bbappend new file mode 100644 index 0000000..1f30887 --- /dev/null +++ b/recipes-core/sysvinit/sysvinit_2.96.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +# Backport from sysvinit 3.00. Remove bbappend when updating the main recipe to +# 3.00 or newer. + +PR = "r0" + +SRC_URI_append = " \ + file://bootlogd-support-more-console-names.patch \ +" -- cgit v1.2.3 From 930d79b066e233cbf1d3f3c7b001f0bec0b3176f Mon Sep 17 00:00:00 2001 From: "andrii.davydenko" Date: Wed, 16 Feb 2022 14:12:11 +0200 Subject: [GP-1480] mPower R.6.0.x: MTCAP3 - Installed packages do not display on the "Package Management" page Add exception for user-data directory Signed-off-by: andrii.davydenko --- recipes-core/multitech/overlayfs-init-ubi/overlayfs.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init b/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init index c23a1ce..f2faf72 100644 --- a/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init +++ b/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init @@ -122,7 +122,7 @@ do_rw_mount() { umount -l /var/volatile >/dev/null 2>&1 cgroupmnts=$(sed -r -e 's/[^[:space:]]*[[:space:]]//' -e 's/[[:space:]]+.*//g' /proc/mounts | grep '^/orig') for mp in ${cgroupmnts} ; do - if [[ $mp != /orig ]] && [[ -d $mp ]] ; then + if [[ $mp != /orig ]] && [[ $mp != /orig/mnt* ]] && [[ -d $mp ]] ; then umount -l $mp >/dev/null 2>&1 fi done -- cgit v1.2.3 From cd250d01166a61d0ffa65591d7673103ec0a6163 Mon Sep 17 00:00:00 2001 From: "andrii.davydenko" Date: Wed, 16 Feb 2022 14:35:32 +0200 Subject: [GP-1480] mPower R.6.0.x: MTCAP3 - Installed packages do not display on the "Package Management" page Remove extra run directory in fs list Signed-off-by: andrii.davydenko --- recipes-core/multitech/overlayfs-init-ubi/overlayfs.init | 2 +- recipes-core/multitech/overlayfs-init-ubi_0.1.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init b/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init index f2faf72..f19abef 100644 --- a/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init +++ b/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init @@ -31,7 +31,7 @@ mnt_user() { mount -t ubifs $USER_PARTITION $MNT_USER } -fs="/run /dev /proc /sys /sys/kernel/security /dev/shm /dev/pts /run /sys/fs/cgroup /sys/fs/cgroup/unified +fs="/run /dev /proc /sys /sys/kernel/security /dev/shm /dev/pts /sys/fs/cgroup /sys/fs/cgroup/unified /sys/fs/cgroup/systemd /sys/fs/cgroup/devices /sys/fs/cgroup/freezer /sys/fs/cgroup/pids /sys/fs/cgroup/memory /dev/mqueue /sys/kernel/debug /tmp /sys/fs/fuse/connections /sys/kernel/config /var/volatile" diff --git a/recipes-core/multitech/overlayfs-init-ubi_0.1.bb b/recipes-core/multitech/overlayfs-init-ubi_0.1.bb index be7ea36..b2d98af 100644 --- a/recipes-core/multitech/overlayfs-init-ubi_0.1.bb +++ b/recipes-core/multitech/overlayfs-init-ubi_0.1.bb @@ -3,7 +3,7 @@ HOMEPAGE = "http://www.multitech.com/" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" PACKAGE_ARCH = "all" -PR = "6" +PR = "7" RDEPENDS_${PN} += "bash" SRC_URI = " \ -- cgit v1.2.3 From 7cf03e7c53485d0a71e71de442604c18c0ce514f Mon Sep 17 00:00:00 2001 From: "harsh.sharma" Date: Thu, 17 Feb 2022 16:31:42 -0600 Subject: updated lora gateway 1303 recipe --- .../lora/lora-gateway-sx1303/LICENSE.TXT | 80 +++++++++++++ .../global_conf.json.MTAC_003_0_0.EU868 | 126 +++++++++++++++++++++ .../global_conf.json.MTAC_003_0_0.US915 | 113 ++++++++++++++++++ .../global_conf.json.MTCAP3.EU868 | 126 +++++++++++++++++++++ .../global_conf.json.MTCAP3.US915 | 113 ++++++++++++++++++ .../lora/lora-gateway-sx1303/reset_lgw.sh | 83 ++++++++++++++ .../lora/lora-gateway-sx1303_2.0.1.bb | 65 ----------- .../lora/lora-gateway-sx1303_2.0.4.bb | 78 +++++++++++++ 8 files changed, 719 insertions(+), 65 deletions(-) create mode 100644 recipes-connectivity/lora/lora-gateway-sx1303/LICENSE.TXT create mode 100644 recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868 create mode 100644 recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915 create mode 100644 recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.EU868 create mode 100644 recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.US915 create mode 100644 recipes-connectivity/lora/lora-gateway-sx1303/reset_lgw.sh delete mode 100644 recipes-connectivity/lora/lora-gateway-sx1303_2.0.1.bb create mode 100644 recipes-connectivity/lora/lora-gateway-sx1303_2.0.4.bb diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/LICENSE.TXT b/recipes-connectivity/lora/lora-gateway-sx1303/LICENSE.TXT new file mode 100644 index 0000000..a59e967 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303/LICENSE.TXT @@ -0,0 +1,80 @@ +Copyright (c) 2019, SEMTECH S.A. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Semtech corporation nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL SEMTECH S.A. BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +--- For the parson library used by the packet forwarder --- + +Parson ( http://kgabis.github.com/parson/ ) +Copyright (c) 2012 Krzysztof Gabis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +ITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- For the tinyMT32 library used by the HAL --- + +Copyright (c) 2011 Mutsuo Saito, Makoto Matsumoto, Hiroshima +University and The University of Tokyo. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of the Hiroshima University nor the names of + its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868 new file mode 100644 index 0000000..063c931 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868 @@ -0,0 +1,126 @@ +{ + "SX130x_conf": { + "com_type": "SPI", + "com_path": "/dev/spidev0.0", + "lorawan_public": true, + "clksrc": 0, + "antenna_gain": 0, /* antenna gain, in dBi */ + "full_duplex": false, + "fine_timestamp": { + "enable": false, + "mode": "all_sf" /* high_capacity or all_sf */ + }, + "sx1261_conf": { + "spi_path": "/dev/spidev0.1", + "rssi_offset": 0, /* dB */ + "spectral_scan": { + "enable": false, + "freq_start": 867100000, + "nb_chan": 8, + "nb_scan": 2000, + "pace_s": 10 + }, + "lbt": { + "enable": false, + "rssi_target": -70, /* dBm */ + "channels":[ /* 16 channels maximum */ + { "freq_hz": 867100000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 867300000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 867500000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 867700000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 867900000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 868100000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 868300000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 868500000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 869525000, "bandwidth": 125000, "scan_time_us": 5000, "transmit_time_ms": 4000 }, + { "freq_hz": 868300000, "bandwidth": 250000, "scan_time_us": 128, "transmit_time_ms": 400 } + ] + } + }, + "radio_0": { + "enable": true, + "type": "SX1250", + "freq": 867500000, + "rssi_offset": -215.4, + "rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0}, + "tx_enable": true, + "tx_freq_min": 863000000, + "tx_freq_max": 870000000, + "tx_gain_lut":[ + {"rf_power": 12, "pa_gain": 0, "pwr_idx": 15}, + {"rf_power": 13, "pa_gain": 0, "pwr_idx": 16}, + {"rf_power": 14, "pa_gain": 0, "pwr_idx": 17}, + {"rf_power": 15, "pa_gain": 0, "pwr_idx": 19}, + {"rf_power": 16, "pa_gain": 0, "pwr_idx": 20}, + {"rf_power": 17, "pa_gain": 0, "pwr_idx": 22}, + {"rf_power": 18, "pa_gain": 1, "pwr_idx": 1}, + {"rf_power": 19, "pa_gain": 1, "pwr_idx": 2}, + {"rf_power": 20, "pa_gain": 1, "pwr_idx": 3}, + {"rf_power": 21, "pa_gain": 1, "pwr_idx": 4}, + {"rf_power": 22, "pa_gain": 1, "pwr_idx": 5}, + {"rf_power": 23, "pa_gain": 1, "pwr_idx": 6}, + {"rf_power": 24, "pa_gain": 1, "pwr_idx": 7}, + {"rf_power": 25, "pa_gain": 1, "pwr_idx": 9}, + {"rf_power": 26, "pa_gain": 1, "pwr_idx": 11}, + {"rf_power": 27, "pa_gain": 1, "pwr_idx": 14} + ] + }, + "radio_1": { + "enable": true, + "type": "SX1250", + "freq": 868500000, + "rssi_offset": -215.4, + "rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0}, + "tx_enable": false + }, + "chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]}, + "chan_multiSF_0": {"enable": true, "radio": 1, "if": -400000}, + "chan_multiSF_1": {"enable": true, "radio": 1, "if": -200000}, + "chan_multiSF_2": {"enable": true, "radio": 1, "if": 0}, + "chan_multiSF_3": {"enable": true, "radio": 0, "if": -400000}, + "chan_multiSF_4": {"enable": true, "radio": 0, "if": -200000}, + "chan_multiSF_5": {"enable": true, "radio": 0, "if": 0}, + "chan_multiSF_6": {"enable": true, "radio": 0, "if": 200000}, + "chan_multiSF_7": {"enable": true, "radio": 0, "if": 400000}, + "chan_Lora_std": {"enable": true, "radio": 1, "if": -200000, "bandwidth": 250000, "spread_factor": 7, + "implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1}, + "chan_FSK": {"enable": true, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000} + }, + + "gateway_conf": { + "gateway_ID": "AA555A0000000000", + /* change with default server address/ports */ + "server_address": "localhost", + "serv_port_up": 1730, + "serv_port_down": 1730, + /* adjust the following parameters for your network */ + "keepalive_interval": 10, + "stat_interval": 30, + "push_timeout_ms": 100, + /* forward only valid packets */ + "forward_crc_valid": true, + "forward_crc_error": false, + "forward_crc_disabled": false, + /* GPS configuration */ + "gps_tty_path": "/dev/ttyS0", + /* GPS reference coordinates */ + "ref_latitude": 0.0, + "ref_longitude": 0.0, + "ref_altitude": 0, + /* Beaconing parameters */ + "beacon_period": 0, + "beacon_freq_hz": 869525000, + "beacon_datarate": 9, + "beacon_bw_hz": 125000, + "beacon_power": 14, + "beacon_infodesc": 0 + }, + + "debug_conf": { + "ref_payload":[ + {"id": "0xCAFE1234"}, + {"id": "0xCAFE2345"} + ], + "log_file": "loragw_hal.log" + } +} diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915 new file mode 100644 index 0000000..04434bf --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915 @@ -0,0 +1,113 @@ +{ + "SX130x_conf": { + "com_type": "SPI", + "com_path": "/dev/spidev0.0", + "lorawan_public": true, + "clksrc": 0, + "antenna_gain": 0, /* antenna gain, in dBi */ + "full_duplex": false, + "fine_timestamp": { + "enable": false, + "mode": "all_sf" /* high_capacity or all_sf */ + }, + "sx1261_conf": { + "spi_path": "/dev/spidev0.1", + "rssi_offset": 0, /* dB */ + "spectral_scan": { + "enable": false, + "freq_start": 903900000, + "nb_chan": 8, + "nb_scan": 2000, + "pace_s": 10 + }, + "lbt": { + "enable": false /* LBT for 500 Khz channels is not supported */ + } + }, + "radio_0": { + "enable": true, + "type": "SX1250", + "freq": 904300000, + "rssi_offset": -215.4, + "rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0}, + "tx_enable": true, + "tx_freq_min": 923000000, + "tx_freq_max": 928000000, + "tx_gain_lut":[ + {"rf_power": 12, "pa_gain": 0, "pwr_idx": 15}, + {"rf_power": 13, "pa_gain": 0, "pwr_idx": 16}, + {"rf_power": 14, "pa_gain": 0, "pwr_idx": 17}, + {"rf_power": 15, "pa_gain": 0, "pwr_idx": 19}, + {"rf_power": 16, "pa_gain": 0, "pwr_idx": 20}, + {"rf_power": 17, "pa_gain": 0, "pwr_idx": 22}, + {"rf_power": 18, "pa_gain": 1, "pwr_idx": 1}, + {"rf_power": 19, "pa_gain": 1, "pwr_idx": 2}, + {"rf_power": 20, "pa_gain": 1, "pwr_idx": 3}, + {"rf_power": 21, "pa_gain": 1, "pwr_idx": 4}, + {"rf_power": 22, "pa_gain": 1, "pwr_idx": 5}, + {"rf_power": 23, "pa_gain": 1, "pwr_idx": 6}, + {"rf_power": 24, "pa_gain": 1, "pwr_idx": 7}, + {"rf_power": 25, "pa_gain": 1, "pwr_idx": 9}, + {"rf_power": 26, "pa_gain": 1, "pwr_idx": 11}, + {"rf_power": 27, "pa_gain": 1, "pwr_idx": 14} + ] + }, + "radio_1": { + "enable": true, + "type": "SX1250", + "freq": 905000000, + "rssi_offset": -215.4, + "rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0}, + "tx_enable": false + }, + "chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]}, + "chan_multiSF_0": {"enable": true, "radio": 0, "if": -400000}, /* Freq : 903.9 MHz*/ + "chan_multiSF_1": {"enable": true, "radio": 0, "if": -200000}, /* Freq : 904.1 MHz*/ + "chan_multiSF_2": {"enable": true, "radio": 0, "if": 0}, /* Freq : 904.3 MHz*/ + "chan_multiSF_3": {"enable": true, "radio": 0, "if": 200000}, /* Freq : 904.5 MHz*/ + "chan_multiSF_4": {"enable": true, "radio": 1, "if": -300000}, /* Freq : 904.7 MHz*/ + "chan_multiSF_5": {"enable": true, "radio": 1, "if": -100000}, /* Freq : 904.9 MHz*/ + "chan_multiSF_6": {"enable": true, "radio": 1, "if": 100000}, /* Freq : 905.1 MHz*/ + "chan_multiSF_7": {"enable": true, "radio": 1, "if": 300000}, /* Freq : 905.3 MHz*/ + "chan_Lora_std": {"enable": true, "radio": 0, "if": 300000, "bandwidth": 500000, "spread_factor": 8, /* Freq : 904.6 MHz*/ + "implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1}, + "chan_FSK": {"enable": false, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000} /* Freq : 868.8 MHz*/ + }, + + "gateway_conf": { + "gateway_ID": "AA555A0000000000", + /* change with default server address/ports */ + "server_address": "localhost", + "serv_port_up": 1730, + "serv_port_down": 1730, + /* adjust the following parameters for your network */ + "keepalive_interval": 10, + "stat_interval": 30, + "push_timeout_ms": 100, + /* forward only valid packets */ + "forward_crc_valid": true, + "forward_crc_error": false, + "forward_crc_disabled": false, + /* GPS configuration */ + "gps_tty_path": "/dev/ttyS0", + /* GPS reference coordinates */ + "ref_latitude": 0.0, + "ref_longitude": 0.0, + "ref_altitude": 0, + /* Beaconing parameters */ + "beacon_period": 0, /* disable class B beacon */ + "beacon_freq_hz": 869525000, + "beacon_datarate": 9, + "beacon_bw_hz": 125000, + "beacon_power": 14, + "beacon_infodesc": 0 + }, + + "debug_conf": { + "ref_payload":[ + {"id": "0xCAFE1234"}, + {"id": "0xCAFE2345"} + ], + "log_file": "loragw_hal.log" + } +} diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.EU868 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.EU868 new file mode 100644 index 0000000..2f17d34 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.EU868 @@ -0,0 +1,126 @@ +{ + "SX130x_conf": { + "com_type": "SPI", + "com_path": "/dev/spidev1.0", + "lorawan_public": true, + "clksrc": 0, + "antenna_gain": 0, /* antenna gain, in dBi */ + "full_duplex": false, + "fine_timestamp": { + "enable": false, + "mode": "all_sf" /* high_capacity or all_sf */ + }, + "sx1261_conf": { + "spi_path": "/dev/spidev1.1", + "rssi_offset": 0, /* dB */ + "spectral_scan": { + "enable": false, + "freq_start": 867100000, + "nb_chan": 8, + "nb_scan": 2000, + "pace_s": 10 + }, + "lbt": { + "enable": false, + "rssi_target": -70, /* dBm */ + "channels":[ /* 16 channels maximum */ + { "freq_hz": 867100000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 867300000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 867500000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 867700000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 867900000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 868100000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 868300000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 868500000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, + { "freq_hz": 869525000, "bandwidth": 125000, "scan_time_us": 5000, "transmit_time_ms": 4000 }, + { "freq_hz": 868300000, "bandwidth": 250000, "scan_time_us": 128, "transmit_time_ms": 400 } + ] + } + }, + "radio_0": { + "enable": true, + "type": "SX1250", + "freq": 867500000, + "rssi_offset": -215.4, + "rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0}, + "tx_enable": true, + "tx_freq_min": 863000000, + "tx_freq_max": 870000000, + "tx_gain_lut":[ + {"rf_power": 12, "pa_gain": 0, "pwr_idx": 15}, + {"rf_power": 13, "pa_gain": 0, "pwr_idx": 16}, + {"rf_power": 14, "pa_gain": 0, "pwr_idx": 17}, + {"rf_power": 15, "pa_gain": 0, "pwr_idx": 19}, + {"rf_power": 16, "pa_gain": 0, "pwr_idx": 20}, + {"rf_power": 17, "pa_gain": 0, "pwr_idx": 22}, + {"rf_power": 18, "pa_gain": 1, "pwr_idx": 1}, + {"rf_power": 19, "pa_gain": 1, "pwr_idx": 2}, + {"rf_power": 20, "pa_gain": 1, "pwr_idx": 3}, + {"rf_power": 21, "pa_gain": 1, "pwr_idx": 4}, + {"rf_power": 22, "pa_gain": 1, "pwr_idx": 5}, + {"rf_power": 23, "pa_gain": 1, "pwr_idx": 6}, + {"rf_power": 24, "pa_gain": 1, "pwr_idx": 7}, + {"rf_power": 25, "pa_gain": 1, "pwr_idx": 9}, + {"rf_power": 26, "pa_gain": 1, "pwr_idx": 11}, + {"rf_power": 27, "pa_gain": 1, "pwr_idx": 14} + ] + }, + "radio_1": { + "enable": true, + "type": "SX1250", + "freq": 868500000, + "rssi_offset": -215.4, + "rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0}, + "tx_enable": false + }, + "chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]}, + "chan_multiSF_0": {"enable": true, "radio": 1, "if": -400000}, + "chan_multiSF_1": {"enable": true, "radio": 1, "if": -200000}, + "chan_multiSF_2": {"enable": true, "radio": 1, "if": 0}, + "chan_multiSF_3": {"enable": true, "radio": 0, "if": -400000}, + "chan_multiSF_4": {"enable": true, "radio": 0, "if": -200000}, + "chan_multiSF_5": {"enable": true, "radio": 0, "if": 0}, + "chan_multiSF_6": {"enable": true, "radio": 0, "if": 200000}, + "chan_multiSF_7": {"enable": true, "radio": 0, "if": 400000}, + "chan_Lora_std": {"enable": true, "radio": 1, "if": -200000, "bandwidth": 250000, "spread_factor": 7, + "implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1}, + "chan_FSK": {"enable": true, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000} + }, + + "gateway_conf": { + "gateway_ID": "AA555A0000000000", + /* change with default server address/ports */ + "server_address": "localhost", + "serv_port_up": 1730, + "serv_port_down": 1730, + /* adjust the following parameters for your network */ + "keepalive_interval": 10, + "stat_interval": 30, + "push_timeout_ms": 100, + /* forward only valid packets */ + "forward_crc_valid": true, + "forward_crc_error": false, + "forward_crc_disabled": false, + /* GPS configuration */ + "gps_tty_path": "/dev/ttyS0", + /* GPS reference coordinates */ + "ref_latitude": 0.0, + "ref_longitude": 0.0, + "ref_altitude": 0, + /* Beaconing parameters */ + "beacon_period": 0, + "beacon_freq_hz": 869525000, + "beacon_datarate": 9, + "beacon_bw_hz": 125000, + "beacon_power": 14, + "beacon_infodesc": 0 + }, + + "debug_conf": { + "ref_payload":[ + {"id": "0xCAFE1234"}, + {"id": "0xCAFE2345"} + ], + "log_file": "loragw_hal.log" + } +} diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.US915 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.US915 new file mode 100644 index 0000000..e89cc16 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.US915 @@ -0,0 +1,113 @@ +{ + "SX130x_conf": { + "com_type": "SPI", + "com_path": "/dev/spidev1.0", + "lorawan_public": true, + "clksrc": 0, + "antenna_gain": 0, /* antenna gain, in dBi */ + "full_duplex": false, + "fine_timestamp": { + "enable": false, + "mode": "all_sf" /* high_capacity or all_sf */ + }, + "sx1261_conf": { + "spi_path": "/dev/spidev1.1", + "rssi_offset": 0, /* dB */ + "spectral_scan": { + "enable": false, + "freq_start": 903900000, + "nb_chan": 8, + "nb_scan": 2000, + "pace_s": 10 + }, + "lbt": { + "enable": false /* LBT for 500 Khz channels is not supported */ + } + }, + "radio_0": { + "enable": true, + "type": "SX1250", + "freq": 904300000, + "rssi_offset": -215.4, + "rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0}, + "tx_enable": true, + "tx_freq_min": 923000000, + "tx_freq_max": 928000000, + "tx_gain_lut":[ + {"rf_power": 12, "pa_gain": 0, "pwr_idx": 15}, + {"rf_power": 13, "pa_gain": 0, "pwr_idx": 16}, + {"rf_power": 14, "pa_gain": 0, "pwr_idx": 17}, + {"rf_power": 15, "pa_gain": 0, "pwr_idx": 19}, + {"rf_power": 16, "pa_gain": 0, "pwr_idx": 20}, + {"rf_power": 17, "pa_gain": 0, "pwr_idx": 22}, + {"rf_power": 18, "pa_gain": 1, "pwr_idx": 1}, + {"rf_power": 19, "pa_gain": 1, "pwr_idx": 2}, + {"rf_power": 20, "pa_gain": 1, "pwr_idx": 3}, + {"rf_power": 21, "pa_gain": 1, "pwr_idx": 4}, + {"rf_power": 22, "pa_gain": 1, "pwr_idx": 5}, + {"rf_power": 23, "pa_gain": 1, "pwr_idx": 6}, + {"rf_power": 24, "pa_gain": 1, "pwr_idx": 7}, + {"rf_power": 25, "pa_gain": 1, "pwr_idx": 9}, + {"rf_power": 26, "pa_gain": 1, "pwr_idx": 11}, + {"rf_power": 27, "pa_gain": 1, "pwr_idx": 14} + ] + }, + "radio_1": { + "enable": true, + "type": "SX1250", + "freq": 905000000, + "rssi_offset": -215.4, + "rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0}, + "tx_enable": false + }, + "chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]}, + "chan_multiSF_0": {"enable": true, "radio": 0, "if": -400000}, /* Freq : 903.9 MHz*/ + "chan_multiSF_1": {"enable": true, "radio": 0, "if": -200000}, /* Freq : 904.1 MHz*/ + "chan_multiSF_2": {"enable": true, "radio": 0, "if": 0}, /* Freq : 904.3 MHz*/ + "chan_multiSF_3": {"enable": true, "radio": 0, "if": 200000}, /* Freq : 904.5 MHz*/ + "chan_multiSF_4": {"enable": true, "radio": 1, "if": -300000}, /* Freq : 904.7 MHz*/ + "chan_multiSF_5": {"enable": true, "radio": 1, "if": -100000}, /* Freq : 904.9 MHz*/ + "chan_multiSF_6": {"enable": true, "radio": 1, "if": 100000}, /* Freq : 905.1 MHz*/ + "chan_multiSF_7": {"enable": true, "radio": 1, "if": 300000}, /* Freq : 905.3 MHz*/ + "chan_Lora_std": {"enable": true, "radio": 0, "if": 300000, "bandwidth": 500000, "spread_factor": 8, /* Freq : 904.6 MHz*/ + "implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1}, + "chan_FSK": {"enable": false, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000} /* Freq : 868.8 MHz*/ + }, + + "gateway_conf": { + "gateway_ID": "AA555A0000000000", + /* change with default server address/ports */ + "server_address": "localhost", + "serv_port_up": 1730, + "serv_port_down": 1730, + /* adjust the following parameters for your network */ + "keepalive_interval": 10, + "stat_interval": 30, + "push_timeout_ms": 100, + /* forward only valid packets */ + "forward_crc_valid": true, + "forward_crc_error": false, + "forward_crc_disabled": false, + /* GPS configuration */ + "gps_tty_path": "/dev/ttyS0", + /* GPS reference coordinates */ + "ref_latitude": 0.0, + "ref_longitude": 0.0, + "ref_altitude": 0, + /* Beaconing parameters */ + "beacon_period": 0, /* disable class B beacon */ + "beacon_freq_hz": 869525000, + "beacon_datarate": 9, + "beacon_bw_hz": 125000, + "beacon_power": 14, + "beacon_infodesc": 0 + }, + + "debug_conf": { + "ref_payload":[ + {"id": "0xCAFE1234"}, + {"id": "0xCAFE2345"} + ], + "log_file": "loragw_hal.log" + } +} diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/reset_lgw.sh b/recipes-connectivity/lora/lora-gateway-sx1303/reset_lgw.sh new file mode 100644 index 0000000..a89c674 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303/reset_lgw.sh @@ -0,0 +1,83 @@ +#!/bin/sh + +# This script is intended to be used on MTAC-003V3 platform, it performs +# the following actions: +# - export/unpexort pioC9 and pioB12 used to reset the SX1302 chip and setup AP1_NRESET +# - export/unexport pioC10 used to reset the optional SX1261 radio used for LBT/Spectral Scan +# +# Usage examples: +# ./reset_lgw.sh stop +# ./reset_lgw.sh start + +# GPIO mapping has to be adapted with HW +# + +SX1302_RESET_PIN=73 # SX1302 reset +AP1_NRESET_PIN=44 # AP1_NRESET +SX1261_RESET_PIN=74 # SX1261 reset (LBT / Spectral Scan) +SX1302_RESET_pio=C9 # pio for SX1303 reset +AP1_NRESET_pio=B12 # pio for AP1_NRESET +SX1261_NRESET_pio=C10 # pio for SX1261 NRESET + +WAIT_GPIO() { + sleep 0.1 +} + +init() { + # setup GPIOs + echo "$SX1302_RESET_PIN" > /sys/class/gpio/export; WAIT_GPIO + echo "$SX1261_RESET_PIN" > /sys/class/gpio/export; WAIT_GPIO + echo "$AP1_NRESET_PIN" > /sys/class/gpio/export; WAIT_GPIO + + # set GPIOs as output + echo "out" > /sys/class/gpio/pio$SX1302_RESET_pio/direction; WAIT_GPIO + echo "out" > /sys/class/gpio/pio$SX1261_NRESET_pio/direction; WAIT_GPIO + echo "out" > /sys/class/gpio/pio$AP1_NRESET_pio/direction; WAIT_GPIO +} + +reset() { + echo "MTAC-003V3 SX1303 reset through pio$SX1302_RESET_pio..." + echo "SX1261 reset through pio$SX1261_NRESET_pio..." + echo "AP1 NRESET through pio$AP1_NRESET_pio..." + + # write output for AP1_NRESET and SX1303 reset + echo "1" > /sys/class/gpio/pio$AP1_NRESET_pio/value; WAIT_GPIO + + echo "1" > /sys/class/gpio/pio$SX1302_RESET_pio/value; WAIT_GPIO + echo "0" > /sys/class/gpio/pio$SX1302_RESET_pio/value; WAIT_GPIO + + echo "0" > /sys/class/gpio/pio$SX1261_NRESET_pio/value; WAIT_GPIO + echo "1" > /sys/class/gpio/pio$SX1261_NRESET_pio/value; WAIT_GPIO +} + +term() { + # cleanup all GPIOs + if [ -d /sys/class/gpio/pio$SX1302_RESET_pio ] + then + echo "$SX1302_RESET_PIN" > /sys/class/gpio/unexport; WAIT_GPIO + fi + if [ -d /sys/class/gpio/pio$SX1261_NRESET_pio ] + then + echo "$SX1261_RESET_PIN" > /sys/class/gpio/unexport; WAIT_GPIO + fi + if [ -d /sys/class/gpio/pio$AP1_NRESET_pio ] + then + echo "$AP1_NRESET_PIN" > /sys/class/gpio/unexport; WAIT_GPIO + fi +} + +case "$1" in + start) + term # just in case + init + reset + ;; + stop) + reset + term + ;; + *) + echo "Usage: $0 {start|stop}" + exit 1 + ;; +esac diff --git a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.1.bb b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.1.bb deleted file mode 100644 index c5c2ab1..0000000 --- a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.1.bb +++ /dev/null @@ -1,65 +0,0 @@ -DESCRIPTION = "LoRa Packet Forwarder" -HOMEPAGE = "https://github.com/Lora-net/sx1302_hal" -PRIORITY = "optional" -SECTION = "console/utils" -# Semtech license is a modified BSD-style license -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d2119120bd616e725f4580070bd9ee19" -DEPENDS = "logrotate" -RDEPENDS_${PN} += "bash" -PR = "r0" - -# SRCREV = "100104ee350a0e469b348ac383486d311caaf5e5" -SRCREV = "V${PV}" - -SRC_URI = "git://github.com/Lora-net/sx1302_hal.git;protocol=git;branch=master \ -" - - -S = "${WORKDIR}/git" -B = "${S}" - -LORA_DIR = "/opt/lora" - - -CFLAGS += " -I${S}/packet_forwarder/inc -I${S}/libloragw/inc -I${S}/libtools/inc -I${S}/inc -I. -std=gnu11" - -do_compile() { - oe_runmake packet_forwarder LDFLAGS=${LDFLAGS} - oe_runmake util_boot LDFLAGS=${LDFLAGS} - oe_runmake util_chip_id FLAGS=${LDFLAGS} - oe_runmake util_net_downlink LDFLAGS=${LDFLAGS} - # oe_runmake util_spectral_scan LDFLAGS=${LDFLAGS} -} - -do_install() { - install -d ${D}${LORA_DIR} - install -d ${D}${LORA_DIR}/forwarder-utils-sx1303 - install -d ${D}${LORA_DIR}/gateway-utils-sx1303 - install -m 755 packet_forwarder/lora_pkt_fwd ${D}${LORA_DIR}/lora_pkt_fwd_sx1303 - install -m 755 libloragw/test_loragw* ${D}${LORA_DIR}/gateway-utils-sx1303/ - install -m 755 util_boot/boot ${D}${LORA_DIR}/forwarder-utils-sx1303/util_boot - install -m 755 util_chip_id/chip_id ${D}${LORA_DIR}/forwarder-utils-sx1303/util_chip_id - install -m 755 util_net_downlink/net_downlink ${D}${LORA_DIR}/forwarder-utils-sx1303/util_net_downlink - # install -m 755 util_spectral_scan/util_spectral_scan ${D}${LORA_DIR}/forwarder-utils-sx1303/ -} - -do_install_append_mtcdt() { -} - -do_install_append_mtcap() { -} - -do_install_append_mtcdt3() { -} - -do_install_append_mtcdt3hs() { -} - - -FILES_${PN} += "${LORA_DIR}" - -# disable this on purpose for dev purposes -do_rm_work() { - echo "skipping" -} diff --git a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.4.bb b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.4.bb new file mode 100644 index 0000000..fb2d708 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.4.bb @@ -0,0 +1,78 @@ +DESCRIPTION = "LoRa Packet Forwarder" +HOMEPAGE = "https://github.com/Lora-net/sx1302_hal" +PRIORITY = "optional" +SECTION = "console/utils" +# Semtech license is a modified BSD-style license +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d2119120bd616e725f4580070bd9ee19" +DEPENDS = "logrotate" +RDEPENDS_${PN} += "bash" +PR = "r0" + +# SRCREV = "100104ee350a0e469b348ac383486d311caaf5e5" +SRCREV = "V${PV}" + +SRC_URI = "git://github.com/MultiTechSystems/sx1302_hal.git;protocol=git;branch=master \ + file://global_conf.json.MTAC_003_0_0.EU868 \ + file://global_conf.json.MTAC_003_0_0.US915 \ + file://global_conf.json.MTCAP3.EU868 \ + file://global_conf.json.MTCAP3.US915 \ +" + + +S = "${WORKDIR}/git" +B = "${S}" + +LORA_DIR = "/opt/lora" + + +CFLAGS += " -I${S}/packet_forwarder/inc -I${S}/libloragw/inc -I${S}/libtools/inc -I${S}/inc -I. -std=gnu11" + +do_compile() { + oe_runmake packet_forwarder LDFLAGS=${LDFLAGS} + oe_runmake util_boot LDFLAGS=${LDFLAGS} + oe_runmake util_chip_id FLAGS=${LDFLAGS} + oe_runmake util_net_downlink LDFLAGS=${LDFLAGS} + # oe_runmake util_spectral_scan LDFLAGS=${LDFLAGS} +} + +do_install() { + install -d ${D}${LORA_DIR} + install -d ${D}${LORA_DIR}/forwarder-utils-sx1303 + install -d ${D}${LORA_DIR}/gateway-utils-sx1303 + install -m 755 packet_forwarder/lora_pkt_fwd ${D}${LORA_DIR}/lora_pkt_fwd_sx1303 + install -m 755 libloragw/test_loragw* ${D}${LORA_DIR}/gateway-utils-sx1303/ + install -m 755 util_boot/boot ${D}${LORA_DIR}/forwarder-utils-sx1303/util_boot + install -m 755 util_chip_id/chip_id ${D}${LORA_DIR}/forwarder-utils-sx1303/util_chip_id + install -m 755 util_net_downlink/net_downlink ${D}${LORA_DIR}/forwarder-utils-sx1303/util_net_downlink + # install -m 755 util_spectral_scan/util_spectral_scan ${D}${LORA_DIR}/forwarder-utils-sx1303/ +} + +do_install_append_mtcdt() { + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.US915 +} + +do_install_append_mtcap() { + install -m 644 ${WORKDIR}/global_conf.json.MTCAP3.EU868 ${D}${LORA_DIR}/global_conf.json.MTCAP3.EU868 + install -m 644 ${WORKDIR}/global_conf.json.MTCAP3.US915 ${D}${LORA_DIR}/global_conf.json.MTCAP3.US915 +} + +do_install_append_mtcdt3() { + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.US915 +} + +do_install_append_mtcdt3hs() { + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.US915 +} + + +FILES_${PN} += "${LORA_DIR}" + +# disable this on purpose for dev purposes +do_rm_work() { + echo "skipping" + +} -- cgit v1.2.3 From 696b4b7140cd122ec83557527d3d309755efd04d Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Mon, 4 Apr 2022 17:30:21 -0500 Subject: Updated lora gateway 1303 tag --- .../lora/lora-gateway-sx1303_2.0.12.bb | 78 ++++++++++++++++++++++ .../lora/lora-gateway-sx1303_2.0.9.bb | 78 ---------------------- 2 files changed, 78 insertions(+), 78 deletions(-) create mode 100644 recipes-connectivity/lora/lora-gateway-sx1303_2.0.12.bb delete mode 100644 recipes-connectivity/lora/lora-gateway-sx1303_2.0.9.bb diff --git a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.12.bb b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.12.bb new file mode 100644 index 0000000..3bf2442 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.12.bb @@ -0,0 +1,78 @@ +DESCRIPTION = "LoRa Packet Forwarder" +HOMEPAGE = "https://github.com/Lora-net/sx1302_hal" +PRIORITY = "optional" +SECTION = "console/utils" +# Semtech license is a modified BSD-style license +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d2119120bd616e725f4580070bd9ee19" +DEPENDS = "logrotate" +RDEPENDS_${PN} += "bash" +PR = "r0" + +#SRCREV = "100104ee350a0e469b348ac383486d311caaf5e5" +SRCREV = "V${PV}" + +SRC_URI = "git://github.com/MultiTechSystems/sx1302_hal.git;protocol=https;branch=master \ + file://global_conf.json.MTAC_003_0_0.EU868 \ + file://global_conf.json.MTAC_003_0_0.US915 \ + file://global_conf.json.MTCAP3.EU868 \ + file://global_conf.json.MTCAP3.US915 \ +" + + +S = "${WORKDIR}/git" +B = "${S}" + +LORA_DIR = "/opt/lora" + + +CFLAGS += " -I${S}/packet_forwarder/inc -I${S}/libloragw/inc -I${S}/libtools/inc -I${S}/inc -I. -std=gnu11" + +do_compile() { + oe_runmake packet_forwarder LDFLAGS=${LDFLAGS} + oe_runmake util_boot LDFLAGS=${LDFLAGS} + oe_runmake util_chip_id FLAGS=${LDFLAGS} + oe_runmake util_net_downlink LDFLAGS=${LDFLAGS} + # oe_runmake util_spectral_scan LDFLAGS=${LDFLAGS} +} + +do_install() { + install -d ${D}${LORA_DIR} + install -d ${D}${LORA_DIR}/forwarder-utils-sx1303 + install -d ${D}${LORA_DIR}/gateway-utils-sx1303 + install -m 755 packet_forwarder/lora_pkt_fwd ${D}${LORA_DIR}/lora_pkt_fwd_sx1303 + install -m 755 libloragw/test_loragw* ${D}${LORA_DIR}/gateway-utils-sx1303/ + install -m 755 util_boot/boot ${D}${LORA_DIR}/forwarder-utils-sx1303/util_boot + install -m 755 util_chip_id/chip_id ${D}${LORA_DIR}/forwarder-utils-sx1303/util_chip_id + install -m 755 util_net_downlink/net_downlink ${D}${LORA_DIR}/forwarder-utils-sx1303/util_net_downlink + # install -m 755 util_spectral_scan/util_spectral_scan ${D}${LORA_DIR}/forwarder-utils-sx1303/ +} + +do_install_append_mtcdt() { + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.US915 +} + +do_install_append_mtcap() { + install -m 644 ${WORKDIR}/global_conf.json.MTCAP3.EU868 ${D}${LORA_DIR}/global_conf.json.MTCAP3.EU868 + install -m 644 ${WORKDIR}/global_conf.json.MTCAP3.US915 ${D}${LORA_DIR}/global_conf.json.MTCAP3.US915 +} + +do_install_append_mtcdt3() { + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.US915 +} + +do_install_append_mtcdt3hs() { + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.US915 +} + + +FILES_${PN} += "${LORA_DIR}" + +# disable this on purpose for dev purposes +do_rm_work() { + echo "skipping" + +} diff --git a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.9.bb b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.9.bb deleted file mode 100644 index 0f0fb24..0000000 --- a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.9.bb +++ /dev/null @@ -1,78 +0,0 @@ -DESCRIPTION = "LoRa Packet Forwarder" -HOMEPAGE = "https://github.com/Lora-net/sx1302_hal" -PRIORITY = "optional" -SECTION = "console/utils" -# Semtech license is a modified BSD-style license -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d2119120bd616e725f4580070bd9ee19" -DEPENDS = "logrotate" -RDEPENDS_${PN} += "bash" -PR = "r0" - -# SRCREV = "100104ee350a0e469b348ac383486d311caaf5e5" -SRCREV = "V${PV}" - -SRC_URI = "git://github.com/MultiTechSystems/sx1302_hal.git;protocol=https;branch=master \ - file://global_conf.json.MTAC_003_0_0.EU868 \ - file://global_conf.json.MTAC_003_0_0.US915 \ - file://global_conf.json.MTCAP3.EU868 \ - file://global_conf.json.MTCAP3.US915 \ -" - - -S = "${WORKDIR}/git" -B = "${S}" - -LORA_DIR = "/opt/lora" - - -CFLAGS += " -I${S}/packet_forwarder/inc -I${S}/libloragw/inc -I${S}/libtools/inc -I${S}/inc -I. -std=gnu11" - -do_compile() { - oe_runmake packet_forwarder LDFLAGS=${LDFLAGS} - oe_runmake util_boot LDFLAGS=${LDFLAGS} - oe_runmake util_chip_id FLAGS=${LDFLAGS} - oe_runmake util_net_downlink LDFLAGS=${LDFLAGS} - # oe_runmake util_spectral_scan LDFLAGS=${LDFLAGS} -} - -do_install() { - install -d ${D}${LORA_DIR} - install -d ${D}${LORA_DIR}/forwarder-utils-sx1303 - install -d ${D}${LORA_DIR}/gateway-utils-sx1303 - install -m 755 packet_forwarder/lora_pkt_fwd ${D}${LORA_DIR}/lora_pkt_fwd_sx1303 - install -m 755 libloragw/test_loragw* ${D}${LORA_DIR}/gateway-utils-sx1303/ - install -m 755 util_boot/boot ${D}${LORA_DIR}/forwarder-utils-sx1303/util_boot - install -m 755 util_chip_id/chip_id ${D}${LORA_DIR}/forwarder-utils-sx1303/util_chip_id - install -m 755 util_net_downlink/net_downlink ${D}${LORA_DIR}/forwarder-utils-sx1303/util_net_downlink - # install -m 755 util_spectral_scan/util_spectral_scan ${D}${LORA_DIR}/forwarder-utils-sx1303/ -} - -do_install_append_mtcdt() { - install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.EU868 - install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.US915 -} - -do_install_append_mtcap() { - install -m 644 ${WORKDIR}/global_conf.json.MTCAP3.EU868 ${D}${LORA_DIR}/global_conf.json.MTCAP3.EU868 - install -m 644 ${WORKDIR}/global_conf.json.MTCAP3.US915 ${D}${LORA_DIR}/global_conf.json.MTCAP3.US915 -} - -do_install_append_mtcdt3() { - install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.EU868 - install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.US915 -} - -do_install_append_mtcdt3hs() { - install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.EU868 - install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.US915 -} - - -FILES_${PN} += "${LORA_DIR}" - -# disable this on purpose for dev purposes -do_rm_work() { - echo "skipping" - -} -- cgit v1.2.3 From c5606f336ec51066d7f70b991dd92bde91cc67c9 Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Tue, 5 Apr 2022 17:12:08 -0500 Subject: Updated lora 1303 tag --- .../global_conf.json.MTAC_003_0_0.EU868 | 3 +- .../global_conf.json.MTAC_003_0_0.US915 | 3 +- .../global_conf.json.MTCAP3.EU868 | 3 +- .../global_conf.json.MTCAP3.US915 | 3 +- .../lora/lora-gateway-sx1303_2.0.12.bb | 78 ---------------------- .../lora/lora-gateway-sx1303_2.0.13.bb | 78 ++++++++++++++++++++++ 6 files changed, 86 insertions(+), 82 deletions(-) delete mode 100644 recipes-connectivity/lora/lora-gateway-sx1303_2.0.12.bb create mode 100644 recipes-connectivity/lora/lora-gateway-sx1303_2.0.13.bb diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868 index 40dc9a2..40fb874 100644 --- a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868 +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868 @@ -103,7 +103,8 @@ "forward_crc_error": false, "forward_crc_disabled": false, /* GPS configuration */ - "gps_tty_path": "/dev/ttyS0", + "gps" : true, + "gps_tty_path": "/dev/gps0", /* GPS reference coordinates */ "ref_latitude": 0.0, "ref_longitude": 0.0, diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915 index 3719762..ba40dca 100644 --- a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915 +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915 @@ -90,7 +90,8 @@ "forward_crc_error": false, "forward_crc_disabled": false, /* GPS configuration */ - "gps_tty_path": "/dev/ttyS0", + "gps" : true, + "gps_tty_path": "/dev/gps0", /* GPS reference coordinates */ "ref_latitude": 0.0, "ref_longitude": 0.0, diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.EU868 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.EU868 index f1652ca..57d92e8 100644 --- a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.EU868 +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.EU868 @@ -103,7 +103,8 @@ "forward_crc_error": false, "forward_crc_disabled": false, /* GPS configuration */ - "gps_tty_path": "/dev/ttyS0", + "gps" : false, + "gps_tty_path": "/dev/gps0", /* GPS reference coordinates */ "ref_latitude": 0.0, "ref_longitude": 0.0, diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.US915 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.US915 index 21e906d..df8b854 100644 --- a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.US915 +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.US915 @@ -90,7 +90,8 @@ "forward_crc_error": false, "forward_crc_disabled": false, /* GPS configuration */ - "gps_tty_path": "/dev/ttyS0", + "gps" : false, + "gps_tty_path": "/dev/gps0", /* GPS reference coordinates */ "ref_latitude": 0.0, "ref_longitude": 0.0, diff --git a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.12.bb b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.12.bb deleted file mode 100644 index 3bf2442..0000000 --- a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.12.bb +++ /dev/null @@ -1,78 +0,0 @@ -DESCRIPTION = "LoRa Packet Forwarder" -HOMEPAGE = "https://github.com/Lora-net/sx1302_hal" -PRIORITY = "optional" -SECTION = "console/utils" -# Semtech license is a modified BSD-style license -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d2119120bd616e725f4580070bd9ee19" -DEPENDS = "logrotate" -RDEPENDS_${PN} += "bash" -PR = "r0" - -#SRCREV = "100104ee350a0e469b348ac383486d311caaf5e5" -SRCREV = "V${PV}" - -SRC_URI = "git://github.com/MultiTechSystems/sx1302_hal.git;protocol=https;branch=master \ - file://global_conf.json.MTAC_003_0_0.EU868 \ - file://global_conf.json.MTAC_003_0_0.US915 \ - file://global_conf.json.MTCAP3.EU868 \ - file://global_conf.json.MTCAP3.US915 \ -" - - -S = "${WORKDIR}/git" -B = "${S}" - -LORA_DIR = "/opt/lora" - - -CFLAGS += " -I${S}/packet_forwarder/inc -I${S}/libloragw/inc -I${S}/libtools/inc -I${S}/inc -I. -std=gnu11" - -do_compile() { - oe_runmake packet_forwarder LDFLAGS=${LDFLAGS} - oe_runmake util_boot LDFLAGS=${LDFLAGS} - oe_runmake util_chip_id FLAGS=${LDFLAGS} - oe_runmake util_net_downlink LDFLAGS=${LDFLAGS} - # oe_runmake util_spectral_scan LDFLAGS=${LDFLAGS} -} - -do_install() { - install -d ${D}${LORA_DIR} - install -d ${D}${LORA_DIR}/forwarder-utils-sx1303 - install -d ${D}${LORA_DIR}/gateway-utils-sx1303 - install -m 755 packet_forwarder/lora_pkt_fwd ${D}${LORA_DIR}/lora_pkt_fwd_sx1303 - install -m 755 libloragw/test_loragw* ${D}${LORA_DIR}/gateway-utils-sx1303/ - install -m 755 util_boot/boot ${D}${LORA_DIR}/forwarder-utils-sx1303/util_boot - install -m 755 util_chip_id/chip_id ${D}${LORA_DIR}/forwarder-utils-sx1303/util_chip_id - install -m 755 util_net_downlink/net_downlink ${D}${LORA_DIR}/forwarder-utils-sx1303/util_net_downlink - # install -m 755 util_spectral_scan/util_spectral_scan ${D}${LORA_DIR}/forwarder-utils-sx1303/ -} - -do_install_append_mtcdt() { - install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.EU868 - install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.US915 -} - -do_install_append_mtcap() { - install -m 644 ${WORKDIR}/global_conf.json.MTCAP3.EU868 ${D}${LORA_DIR}/global_conf.json.MTCAP3.EU868 - install -m 644 ${WORKDIR}/global_conf.json.MTCAP3.US915 ${D}${LORA_DIR}/global_conf.json.MTCAP3.US915 -} - -do_install_append_mtcdt3() { - install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.EU868 - install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.US915 -} - -do_install_append_mtcdt3hs() { - install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.EU868 - install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.US915 -} - - -FILES_${PN} += "${LORA_DIR}" - -# disable this on purpose for dev purposes -do_rm_work() { - echo "skipping" - -} diff --git a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.13.bb b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.13.bb new file mode 100644 index 0000000..3bf2442 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.13.bb @@ -0,0 +1,78 @@ +DESCRIPTION = "LoRa Packet Forwarder" +HOMEPAGE = "https://github.com/Lora-net/sx1302_hal" +PRIORITY = "optional" +SECTION = "console/utils" +# Semtech license is a modified BSD-style license +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d2119120bd616e725f4580070bd9ee19" +DEPENDS = "logrotate" +RDEPENDS_${PN} += "bash" +PR = "r0" + +#SRCREV = "100104ee350a0e469b348ac383486d311caaf5e5" +SRCREV = "V${PV}" + +SRC_URI = "git://github.com/MultiTechSystems/sx1302_hal.git;protocol=https;branch=master \ + file://global_conf.json.MTAC_003_0_0.EU868 \ + file://global_conf.json.MTAC_003_0_0.US915 \ + file://global_conf.json.MTCAP3.EU868 \ + file://global_conf.json.MTCAP3.US915 \ +" + + +S = "${WORKDIR}/git" +B = "${S}" + +LORA_DIR = "/opt/lora" + + +CFLAGS += " -I${S}/packet_forwarder/inc -I${S}/libloragw/inc -I${S}/libtools/inc -I${S}/inc -I. -std=gnu11" + +do_compile() { + oe_runmake packet_forwarder LDFLAGS=${LDFLAGS} + oe_runmake util_boot LDFLAGS=${LDFLAGS} + oe_runmake util_chip_id FLAGS=${LDFLAGS} + oe_runmake util_net_downlink LDFLAGS=${LDFLAGS} + # oe_runmake util_spectral_scan LDFLAGS=${LDFLAGS} +} + +do_install() { + install -d ${D}${LORA_DIR} + install -d ${D}${LORA_DIR}/forwarder-utils-sx1303 + install -d ${D}${LORA_DIR}/gateway-utils-sx1303 + install -m 755 packet_forwarder/lora_pkt_fwd ${D}${LORA_DIR}/lora_pkt_fwd_sx1303 + install -m 755 libloragw/test_loragw* ${D}${LORA_DIR}/gateway-utils-sx1303/ + install -m 755 util_boot/boot ${D}${LORA_DIR}/forwarder-utils-sx1303/util_boot + install -m 755 util_chip_id/chip_id ${D}${LORA_DIR}/forwarder-utils-sx1303/util_chip_id + install -m 755 util_net_downlink/net_downlink ${D}${LORA_DIR}/forwarder-utils-sx1303/util_net_downlink + # install -m 755 util_spectral_scan/util_spectral_scan ${D}${LORA_DIR}/forwarder-utils-sx1303/ +} + +do_install_append_mtcdt() { + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.US915 +} + +do_install_append_mtcap() { + install -m 644 ${WORKDIR}/global_conf.json.MTCAP3.EU868 ${D}${LORA_DIR}/global_conf.json.MTCAP3.EU868 + install -m 644 ${WORKDIR}/global_conf.json.MTCAP3.US915 ${D}${LORA_DIR}/global_conf.json.MTCAP3.US915 +} + +do_install_append_mtcdt3() { + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.US915 +} + +do_install_append_mtcdt3hs() { + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/global_conf.json.MTAC_003_0_0.US915 +} + + +FILES_${PN} += "${LORA_DIR}" + +# disable this on purpose for dev purposes +do_rm_work() { + echo "skipping" + +} -- cgit v1.2.3 From 779f85d507620b23c6ff57833036c327310d8cef Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Tue, 5 Apr 2022 17:17:52 -0500 Subject: Removed lora packet forwarder from lns dependency list --- recipes-connectivity/lora/lora-network-server_2.5.35.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-connectivity/lora/lora-network-server_2.5.35.bb b/recipes-connectivity/lora/lora-network-server_2.5.35.bb index 97a9852..395fb0f 100644 --- a/recipes-connectivity/lora/lora-network-server_2.5.35.bb +++ b/recipes-connectivity/lora/lora-network-server_2.5.35.bb @@ -4,7 +4,7 @@ SECTION = "console/utils" LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENSE;md5=2b9a30a3082ddccd2c695a4dbeeab80d" DEPENDS = "jsoncpp libmts mosquitto sqlite3 curl gnutls" -RDEPENDS_${PN} += "lora-packet-forwarder logrotate bash lora-logging jsoncpp" +RDEPENDS_${PN} += "logrotate bash lora-logging jsoncpp" PR = "r0" CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server" -- cgit v1.2.3 From c6ffdefbf6a67a07deb33197dc946dfa1c1b9494 Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Tue, 12 Apr 2022 09:51:17 -0500 Subject: Added lora basic station recipe for sx1303 --- .../lora-basic-station.default | 2 + .../lora-basic-station.init | 158 +++++++++++++++++++++ .../lora-basic-station-sx1303/mtcap-station.conf | 47 ++++++ .../lora-basic-station-sx1303/mtcdt-station.conf | 47 ++++++ .../lora/lora-basic-station-sx1303/setup.gmk | 91 ++++++++++++ .../lora/lora-basic-station-sx1303/tc.uri | 1 + .../lora/lora-basic-station-sx1303_2.0.6-5.bb | 56 ++++++++ .../lora/lora-gateway-sx1303_2.0.17.bb | 93 ------------ .../lora/lora-gateway-sx1303_2.0.19.bb | 93 ++++++++++++ 9 files changed, 495 insertions(+), 93 deletions(-) create mode 100644 recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.default create mode 100755 recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.init create mode 100644 recipes-connectivity/lora/lora-basic-station-sx1303/mtcap-station.conf create mode 100644 recipes-connectivity/lora/lora-basic-station-sx1303/mtcdt-station.conf create mode 100644 recipes-connectivity/lora/lora-basic-station-sx1303/setup.gmk create mode 100644 recipes-connectivity/lora/lora-basic-station-sx1303/tc.uri create mode 100644 recipes-connectivity/lora/lora-basic-station-sx1303_2.0.6-5.bb delete mode 100644 recipes-connectivity/lora/lora-gateway-sx1303_2.0.17.bb create mode 100644 recipes-connectivity/lora/lora-gateway-sx1303_2.0.19.bb diff --git a/recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.default b/recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.default new file mode 100644 index 0000000..0f92640 --- /dev/null +++ b/recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.default @@ -0,0 +1,2 @@ +# set to "yes" or "no" to control starting on boot +ENABLED="no" diff --git a/recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.init b/recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.init new file mode 100755 index 0000000..7ebeea2 --- /dev/null +++ b/recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.init @@ -0,0 +1,158 @@ +#!/bin/bash + + +NAME="lora-basic-station" +ENABLED="yes" + + +[ -f /etc/default/$NAME ] && source /etc/default/$NAME + +run_dir=/var/run/lora +opt_conf_dir=/opt/lora +conf_dir=/var/config/lora +conf_file=$conf_dir/station.conf +tc_uri_file=$conf_dir/tc.uri +tc_key_file=$conf_dir/tc.key +tc_trust_file=$conf_dir/tc.trust + +pkt_fwd=$run_dir/1/station +pkt_fwd_pidfile=$run_dir/station.pid + +port1=/sys/devices/platform/mts-io/ap1 +port2=/sys/devices/platform/mts-io/ap2 + +lora_mtac_id="MTAC-LORA" +lora_1_0_hw="MTAC-LORA-1.0" +lora_1_5_h_hw="MTAC-LORA-1.5" +lora_2_1_hw="MTAC-LORA-2.1" + +lora_mtac_id="MTAC-LORA" +lora_mtac_id915="MTAC-LORA-915" +lora_mtac_id868="MTAC-LORA-868" +lora_mtac_h_id915="MTAC-LORA-H-915" +lora_mtac_h_id868="MTAC-LORA-H-868" + +lora_mtcap_id="MTCAP-LORA" +lora_mtcap_id868="MTCAP-LORA-868" +lora_mtcap_id915="MTCAP-LORA-915" + +lora_mtac_g_id="MTAC-LORA-G" +lora_mtac_g16_id868="MTAC-LORA-G16-868" +lora_mtac_g16_id915="MTAC-LORA-G16-915" +lora_mtac_g64_id868="MTAC-LORA-G64-868" +lora_mtac_g64_id915="MTAC-LORA-G64-915" + +pkt_fwd_options="" + +gps_path="/dev/gps0" + +read_lora_hw_info() { + lora_id=$(mts-io-sysfs show lora/product-id 2> /dev/null) + lora_hw=$(mts-io-sysfs show lora/hw-version 2> /dev/null) + lora_eui=$(mts-io-sysfs show lora/eui 2> /dev/null) + lora_eui_raw=${lora_eui//:/} +} + +hardware_found() { + if [[ "$lora_id" =~ "$lora_mtac_g_id" ]]; then + setup_mtcdt_2_1 + elif [[ "$lora_id" =~ "$lora_mtcap_id" ]]; then + setup_mtcap + elif [[ "$lora_id" =~ "$lora_mtac_id" ]]; then + setup_mtcdt + else + return 1 + fi + return 0 +} + +setup_mtcdt() { + ln -sf /opt/lora/station $pkt_fwd +} + +setup_mtcap() { + ln -sf /opt/lora/station $pkt_fwd +} + +setup_mtcdt_2_1() { + echo LORA-2.1 not supported + return 1 +} + +do_start() { + + mkdir -p $run_dir/1 + rm -rf $run_dir/1/* + + read_lora_hw_info + + if hardware_found; then + echo "Found $lora_id with $lora_hw hardware. Configuring" + else + echo "$0: LORA card not detected" + exit 1 + fi + + if ! [ -f $conf_file ]; then + echo "$0: $conf_file missing" + exit 1 + fi + + # + # copy conf files to the run directory + # + cp $conf_file $run_dir/1/ + cp $tc_uri_file $run_dir/1/ + cp $tc_key_file $run_dir/1/ + cp $tc_trust_file $run_dir/1/ + + sed -i.bak "s/\(.*routerid\"\s*\:\s*\"\)<.*>[^\"]*\(.*\)/\1${lora_eui_raw}\2/g" /var/run/lora/1/station.conf + + # + # start packet forwarder + # + echo -n "Starting $NAME: " + + /usr/sbin/start-stop-daemon --chdir $run_dir/1 --background --start --make-pidfile \ + --pidfile $pkt_fwd_pidfile --startas /bin/bash -- -c "exec $pkt_fwd $pkt_fwd_options" + + renice -n -20 -p $(pgrep $(basename $pkt_fwd)) + + echo "OK" +} + + +do_stop() { + echo -n "Stopping $NAME: " + start-stop-daemon --stop --quiet --oknodo --pidfile $pkt_fwd_pidfile --retry 5 + rm -f $pkt_fwd_pidfile + echo "OK" +} + + +if [ "$ENABLED" != "yes" ]; then + echo "$NAME: disabled in /etc/default" + exit +fi + + +case "$1" in + "start") + do_start + ;; + "stop") + do_stop + ;; + "restart") + ## Stop the service and regardless of whether it was + ## running or not, start it again. + do_stop + do_start + ;; + *) + ## If no parameters are given, print which are avaiable. + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac + diff --git a/recipes-connectivity/lora/lora-basic-station-sx1303/mtcap-station.conf b/recipes-connectivity/lora/lora-basic-station-sx1303/mtcap-station.conf new file mode 100644 index 0000000..baa9793 --- /dev/null +++ b/recipes-connectivity/lora/lora-basic-station-sx1303/mtcap-station.conf @@ -0,0 +1,47 @@ +{ + "SX1301_conf": { + "lorawan_public": true, + "clksrc": 0, + "pps": true, + "device": "/dev/spidev0.0", + "chan_FSK": {"bandwidth": 125000, "datarate": 50000, "enable": true, "if": 300000, "radio": 0}, + "chan_Lora_std": {"bandwidth": 250000, "enable": true, "if": -200000, "radio": 0, "spread_factor": 7}, + "chan_multiSF_0": {"enable": true, "if": -400000, "radio": 0}, + "chan_multiSF_1": {"enable": true, "if": -200000, "radio": 0}, + "chan_multiSF_2": {"enable": true, "if": 0, "radio": 0}, + "chan_multiSF_3": {"enable": true, "if": -400000, "radio": 1}, + "chan_multiSF_4": {"enable": true, "if": -200000, "radio": 1}, + "chan_multiSF_5": {"enable": true, "if": 0, "radio": 1}, + "chan_multiSF_6": {"enable": true, "if": 200000, "radio": 1}, + "chan_multiSF_7": {"enable": true, "if": 400000, "radio": 1}, + "radio_0": {"enable": true, "freq": 923600000, "rssi_offset": -162, "tx_enable": true, "type": "SX1257"}, + "radio_1": {"enable": true, "freq": 922600000, "rssi_offset": -162, "tx_enable": false, "type": "SX1257"}, + "tx_gain_lut": [ + {"dac_gain": 3,"dig_gain":2,"mix_gain":15,"pa_gain":1,"rf_power":10}, + {"dac_gain": 3,"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":11}, + {"dac_gain": 3,"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":12}, + {"dac_gain": 3,"dig_gain":0,"mix_gain":10,"pa_gain":2,"rf_power":13}, + {"dac_gain": 3,"dig_gain":3,"mix_gain":14,"pa_gain":2,"rf_power":14}, + {"dac_gain": 3,"dig_gain":1,"mix_gain":12,"pa_gain":2,"rf_power":15}, + {"dac_gain": 3,"dig_gain":0,"mix_gain":12,"pa_gain":2,"rf_power":16}, + {"dac_gain": 3,"dig_gain":2,"mix_gain":14,"pa_gain":2,"rf_power":17}, + {"dac_gain": 3,"dig_gain":2,"mix_gain":15,"pa_gain":2,"rf_power":18}, + {"dac_gain": 3,"dig_gain":1,"mix_gain":15,"pa_gain":2,"rf_power":19}, + {"dac_gain": 3,"dig_gain":0,"mix_gain":9,"pa_gain":3,"rf_power":20}, + {"dac_gain": 3,"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":21}, + {"dac_gain": 3,"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":22}, + {"dac_gain": 3,"dig_gain":0,"mix_gain":11,"pa_gain":3,"rf_power":23}, + {"dac_gain": 3,"dig_gain":2,"mix_gain":14,"pa_gain":3,"rf_power":24}, + {"dac_gain": 3,"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":25} + ] + }, + "station_conf": { + "routerid": "", + "euiprefix": "::0", + "log_file": "stderr", + "log_level": "INFO", + "log_size": 100000, + "log_rotate": 3, + "TC_TIMEOUT": "2s" + } +} diff --git a/recipes-connectivity/lora/lora-basic-station-sx1303/mtcdt-station.conf b/recipes-connectivity/lora/lora-basic-station-sx1303/mtcdt-station.conf new file mode 100644 index 0000000..8cfa72d --- /dev/null +++ b/recipes-connectivity/lora/lora-basic-station-sx1303/mtcdt-station.conf @@ -0,0 +1,47 @@ +{ + "SX1301_conf": { + "lorawan_public": true, + "clksrc": 0, + "pps": true, + "device": "/dev/spidev0.0", + "chan_FSK": {"bandwidth": 125000, "datarate": 50000, "enable": true, "if": 300000, "radio": 0}, + "chan_Lora_std": {"bandwidth": 250000, "enable": true, "if": -200000, "radio": 0, "spread_factor": 7}, + "chan_multiSF_0": {"enable": true, "if": -400000, "radio": 0}, + "chan_multiSF_1": {"enable": true, "if": -200000, "radio": 0}, + "chan_multiSF_2": {"enable": true, "if": 0, "radio": 0}, + "chan_multiSF_3": {"enable": true, "if": -400000, "radio": 1}, + "chan_multiSF_4": {"enable": true, "if": -200000, "radio": 1}, + "chan_multiSF_5": {"enable": true, "if": 0, "radio": 1}, + "chan_multiSF_6": {"enable": true, "if": 200000, "radio": 1}, + "chan_multiSF_7": {"enable": true, "if": 400000, "radio": 1}, + "radio_0": {"enable": true, "freq": 923600000, "rssi_offset": -162, "tx_enable": true, "type": "SX1257"}, + "radio_1": {"enable": true, "freq": 922600000, "rssi_offset": -162, "tx_enable": false, "type": "SX1257"}, + "tx_gain_lut": [ + {"dig_gain": 0, "mix_gain": 11, "pa_gain": 0, "dac_gain": 3, "rf_power": -6}, + {"dig_gain": 0, "mix_gain": 13, "pa_gain": 0, "dac_gain": 3, "rf_power": -3}, + {"dig_gain": 0, "mix_gain": 9, "pa_gain": 1, "dac_gain": 3, "rf_power": 0}, + {"dig_gain": 0, "mix_gain": 10, "pa_gain": 1, "dac_gain": 3, "rf_power": 3}, + {"dig_gain": 0, "mix_gain": 12, "pa_gain": 1, "dac_gain": 3, "rf_power": 6}, + {"dig_gain": 0, "mix_gain": 10, "pa_gain": 2, "dac_gain": 3, "rf_power": 10}, + {"dig_gain": 0, "mix_gain": 11, "pa_gain": 2, "dac_gain": 3, "rf_power": 11}, + {"dig_gain": 0, "mix_gain": 11, "pa_gain": 2, "dac_gain": 3, "rf_power": 12}, + {"dig_gain": 2, "mix_gain": 12, "pa_gain": 2, "dac_gain": 3, "rf_power": 13}, + {"dig_gain": 0, "mix_gain": 13, "pa_gain": 2, "dac_gain": 3, "rf_power": 14}, + {"dig_gain": 0, "mix_gain": 15, "dac_gain": 3, "pa_gain": 2, "rf_power": 16}, + {"dig_gain": 0, "mix_gain": 10, "pa_gain": 3, "dac_gain": 3, "rf_power": 20}, + {"dig_gain": 0, "mix_gain": 12, "dac_gain": 3, "pa_gain": 3, "rf_power": 23}, + {"dig_gain": 0, "dac_gain": 3, "mix_gain": 13, "pa_gain": 3, "rf_power": 25}, + {"dig_gain": 0, "dac_gain": 3, "mix_gain": 15, "pa_gain": 3, "rf_power": 26}, + {"dig_gain": 0, "mix_gain": 15, "dac_gain": 3, "pa_gain": 3, "rf_power": 27} + ] + }, + "station_conf": { + "routerid": "", + "euiprefix": "::0", + "log_file": "stderr", + "log_level": "INFO", + "log_size": 100000, + "log_rotate": 3, + "TC_TIMEOUT": "2s" + } +} diff --git a/recipes-connectivity/lora/lora-basic-station-sx1303/setup.gmk b/recipes-connectivity/lora/lora-basic-station-sx1303/setup.gmk new file mode 100644 index 0000000..5811673 --- /dev/null +++ b/recipes-connectivity/lora/lora-basic-station-sx1303/setup.gmk @@ -0,0 +1,91 @@ +# -*- makefile -*- + +# Top dir of s2core +# - override accordingly in makefile including this setup.gmk + +platform ?= mlinux +variant ?= sx1303 + + +ARCH ?= +CROSS_COMPILE ?= +export + +# TOOLPREFIX=${CROSS_COMPILE} + + +BD=build-${platform}-${variant} + +# -- Architecture specific +CFG.arm-linux-gnueabihf = mlinux +# CFG.x86_64-linux-gnu = linux + +# -- Variant specific +# testsim runs libloragw inside master process +# testms uses a master slave model +#CFG.testsim = logini_lvl=DEBUG selftests tlsdebug lgwsim ral_lgw +#CFG.testms = logini_lvl=DEBUG selftests tlsdebug lgwsim ral_master_slave +#CFG.testfs = logini_lvl=DEBUG selftests tlsdebug lgwsim ral_lgw +#CFG.testpin = logini_lvl=INFO tlsdebug ral_lgw testpin +#CFG.std = logini_lvl=INFO tlsdebug ral_lgw +#CFG.stdn = logini_lvl=INFO tlsdebug ral_master_slave +#CFG.debug = logini_lvl=DEBUG selftests tlsdebug ral_lgw +#CFG.debugn = logini_lvl=DEBUG selftests tlsdebug ral_master_slave + +# -- Platform specific +CFG.linux = linux lgw1 no_leds +CFG.rpi = linux lgw1 no_leds +CFG.kerlink = linux lgw1 no_leds +CFG.mlinux = linux no_leds ral_lgw prod sx1302 lgw1 + +SD.default = src-linux + +SD = $(or ${SD.${platform}}, ${SD.default}) + +UTILS.linux = mtuns + +UTILS = $(or ${UTILS.${platform}}, ${UTILS.default}) + +PERSO.default = +PERSO = $(or ${PERSO.${platform}}, ${PERSO.default}) +PERSOH = $(if ${PERSO},perso.h,) + +# Paths to dependencies +MBEDLIBS = -lmbedtls -lmbedx509 -lmbedcrypto + +# -lm: Needed for lgw which uses pow/ceil +ifneq (minihub,$(platform)) +SYSLIBS = -lm +endif + +CFLAGS.linux.testsim = -g -O0 --coverage +CFLAGS.linux.testms = -g -O0 --coverage +CFLAGS.linux.testfs = -g -O0 --coverage +CFLAGS.linux.testpin = -g -O3 +CFLAGS.linux.std = -g -O3 +CFLAGS.mlinux.std = -g -O3 + +LIBS.mlinux = -lloragw ${MBEDLIBS} -lrt -lm -lpthread +LIBS.linux = -llgw ${MBEDLIBS} -lpthread +LIBS.rpi = -llgw ${MBEDLIBS} -lpthread +LIBS.kerlink = -llgw ${MBEDLIBS} -lrt -lpthread + +xCFG = ${CFG.${ARCH}} ${CFG.${platform}} ${CFG.${variant}} ${CFG.${platform}.${variant}} +xCFLAGS = ${CFLAGS.${ARCH}} ${CFLAGS.${platform}} ${CFLAGS.${variant}} ${CFLAGS.${platform}.${variant}} +xINCS = ${INCS.${ARCH}} ${INCS.${platform}} ${INCS.${variant}} +xLDFLAGS = ${LDFLAGS.${ARCH}} ${LDFLAGS.${platform}} ${LDFLAGS.${variant}} +xLIBS = ${LIBS.${ARCH}} ${LIBS.${platform}} ${LIBS.${variant}} +xFILES = ${FILES.${ARCH}} ${FILES.${platform}} ${FILES.${variant}} +xOCFLAGS = ${OCFLAGS.${ARCH}} ${OCFLAGS.${platform}} ${OCFLAGS.${variant}} + +DEFS = -DCFG_platform_${platform} -DCFG_platform=\"${platform}\" -DCFG_variant_${variant} -DCFG_variant=\"${variant}\" +DEFS += -DCFG_bdate='"$(shell date -u '+%Y-%m-%d %H:%M:%S')"' +DEFS += -DCFG_version='"$(shell if [ -f ${TD}/VERSION.txt ]; then cat ${TD}/VERSION.txt; else git describe --tag; fi)(${platform}/${variant})"' +DEFS += -DCFG_commit='"$(shell if git rev-parse --git-dir >/dev/null 2>&1; then git rev-parse --short HEAD; else echo -; fi)"' +DEFS += ${xCFG:%=-DCFG_%} +INCS = ${VPATH:%=-I%} -I ${TD}/${BD}/include ${xINCS} +CFLAGS += -std=gnu11 ${INCS} ${DEFS} ${xCFLAGS} ${MORECFLAGS} +LDFLAGS += -L ${TD}/${BD}/lib ${xLDFLAGS} +LIBS = ${xLIBS} ${SYSLIBS} +FILES = ${xFILES} +OCFLAGS = ${xOCFLAGS} diff --git a/recipes-connectivity/lora/lora-basic-station-sx1303/tc.uri b/recipes-connectivity/lora/lora-basic-station-sx1303/tc.uri new file mode 100644 index 0000000..62ad13e --- /dev/null +++ b/recipes-connectivity/lora/lora-basic-station-sx1303/tc.uri @@ -0,0 +1 @@ +wss://127.0.0.1:9002 diff --git a/recipes-connectivity/lora/lora-basic-station-sx1303_2.0.6-5.bb b/recipes-connectivity/lora/lora-basic-station-sx1303_2.0.6-5.bb new file mode 100644 index 0000000..35e13a6 --- /dev/null +++ b/recipes-connectivity/lora/lora-basic-station-sx1303_2.0.6-5.bb @@ -0,0 +1,56 @@ +DESCRIPTION = "LoRa Basic Station" +HOMEPAGE = "https://github.com/lorabasics/basicstation" +PRIORITY = "optional" +SECTION = "console/utils" +# Semtech license is a modified BSD-style license +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENSE;md5=26699ffb0048fefa02c871c2485867ee" +DEPENDS = "lora-gateway-sx1303 logrotate lora-logging mbedtls" +RDEPENDS_${PN} += "bash" +PR = "r4" + +# SRCREV = "9bf824154731cbe78366cbffa1b0c6bd0354b66f" +SRCREV = "${PV}" + +SRC_URI = "git://github.com/MultiTechSystems/basicstation.git;protocol=https;branch=master; \ + file://setup.gmk \ + file://lora-basic-station.init \ + file://lora-basic-station.default \ + file://tc.uri \ + file://mtcap-station.conf \ + file://mtcdt-station.conf \ +" + +S = "${WORKDIR}/git" +B = "${S}" + +LORA_DIR = "/opt/lora" + +export LGW_PATH = "${STAGING_LIBDIR}/lora" +export LGW_INC = "${STAGING_INCDIR}/lora" + +CFLAGS += "-DNODEBUG -I${STAGING_INCDIR} -I${WORKDIR}/git/libtools -I${STAGING_INCDIR}/lora -I${STAGING_INCDIR}/lora/lgw-sx1303 -I${WORKDIR}/git/deps -Iinc -I. -std=gnu11 -L${WORKDIR}/git/libtools -L${STAGING_LIBDIR}/lora/lgw-sx1303/lgw/ -L${STAGING_LIBDIR}/lora" + +do_compile() { + cp ${WORKDIR}/setup.gmk ${S}/setup.gmk + oe_runmake +} + +do_install() { + install -d ${D}${LORA_DIR} + install -m 755 ${S}/build-mlinux-sx1303/bin/station ${D}${LORA_DIR}/station-sx1303 +} + +do_install_append_mtcdt() { + install -d ${D}${LORA_DIR} + install -m 755 ${WORKDIR}/mtcdt-station.conf ${D}${LORA_DIR}/station-sx1303.conf +} + + + +FILES_${PN} += "${LORA_DIR}" + +# disable this on purpose for dev purposes +do_rm_work() { + echo "skipping" +} diff --git a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.17.bb b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.17.bb deleted file mode 100644 index 312eda4..0000000 --- a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.17.bb +++ /dev/null @@ -1,93 +0,0 @@ -DESCRIPTION = "LoRa Packet Forwarder" -HOMEPAGE = "https://github.com/MultiTechSystems/sx1302_hal" -PRIORITY = "optional" -SECTION = "console/utils" -# Semtech license is a modified BSD-style license -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d2119120bd616e725f4580070bd9ee19" -DEPENDS = "logrotate" -RDEPENDS_${PN} += "bash" - -PR = "r6" - -SRCREV = "V${PV}" - -SRC_URI = "git://github.com/MultiTechSystems/sx1302_hal.git;protocol=https;branch=master \ - file://reset_lgw.sh \ - file://global_conf.json.MTAC_003_0_0.EU868 \ - file://global_conf.json.MTAC_003_0_0.US915 \ - file://global_conf.json.MTCAP3.EU868 \ - file://global_conf.json.MTCAP3.US915 \ -" - -SRC_URI[sha256sum] = "6499b73e97cb3e97fcfc02f4ebeee78cf273ccfec7f2221e2b1b9d1f02e7d408" - - -S = "${WORKDIR}/git" -B = "${S}" - -LORA_DIR = "/opt/lora" - - -CFLAGS += "-DNODEBUG -I${S}/packet_forwarder/inc -I${S}/libloragw/inc -I${S}/libtools/inc -I${S}/inc -I. -std=gnu11" - -do_compile() { - oe_runmake packet_forwarder LDFLAGS=${LDFLAGS} - oe_runmake util_boot LDFLAGS=${LDFLAGS} - oe_runmake util_chip_id FLAGS=${LDFLAGS} - oe_runmake util_net_downlink LDFLAGS=${LDFLAGS} - # oe_runmake util_spectral_scan LDFLAGS=${LDFLAGS} -} - -do_install() { - install -d ${D}${LORA_DIR} - install -d ${D}${libdir}/lora - install -d ${D}${libdir}/lora/lgw-sx1303/lgw - install -d ${D}${includedir}/lora/lgw-sx1303/lgw - - install -m 0644 libloragw/libloragw.a ${D}${libdir}/lora/lgw-sx1303/lgw/ - install -m 0644 libloragw/library.cfg ${D}${libdir}/lora/lgw-sx1303/lgw/ - install -m 0644 libloragw/inc/* ${D}${includedir}/lora/lgw-sx1303/lgw/ - - install -d ${D}${LORA_DIR}/forwarder-utils-sx1303 - install -d ${D}${LORA_DIR}/gateway-utils-sx1303 - install -m 755 ${WORKDIR}/reset_lgw.sh ${D}${LORA_DIR}/ - install -m 755 packet_forwarder/lora_pkt_fwd ${D}${LORA_DIR}/lora_pkt_fwd_sx1303 - install -m 755 libloragw/test_loragw* ${D}${LORA_DIR}/gateway-utils-sx1303/ - install -m 755 util_boot/boot ${D}${LORA_DIR}/forwarder-utils-sx1303/util_boot - install -m 755 util_chip_id/chip_id ${D}${LORA_DIR}/forwarder-utils-sx1303/util_chip_id - install -m 755 util_net_downlink/net_downlink ${D}${LORA_DIR}/forwarder-utils-sx1303/util_net_downlink - # install -m 755 util_spectral_scan/util_spectral_scan ${D}${LORA_DIR}/forwarder-utils-sx1303/ -} - -do_install_append_mtcdt() { - install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/ - install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/ -} - -do_install_append_mtcap() { -} - - -do_install_append_mtcap3() { - install -m 755 ${WORKDIR}/global_conf.json.MTCAP3.EU868 ${D}${LORA_DIR}/ - install -m 755 ${WORKDIR}/global_conf.json.MTCAP3.US915 ${D}${LORA_DIR}/ -} - -do_install_append_mtcdt3() { - install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/ - install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/ -} - -do_install_append_mtcdt3hs() { - install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/ - install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/ -} - - -FILES_${PN} += "${LORA_DIR}" - -# disable this on purpose for dev purposes -do_rm_work() { - echo "skipping" -} diff --git a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.19.bb b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.19.bb new file mode 100644 index 0000000..312eda4 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.19.bb @@ -0,0 +1,93 @@ +DESCRIPTION = "LoRa Packet Forwarder" +HOMEPAGE = "https://github.com/MultiTechSystems/sx1302_hal" +PRIORITY = "optional" +SECTION = "console/utils" +# Semtech license is a modified BSD-style license +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d2119120bd616e725f4580070bd9ee19" +DEPENDS = "logrotate" +RDEPENDS_${PN} += "bash" + +PR = "r6" + +SRCREV = "V${PV}" + +SRC_URI = "git://github.com/MultiTechSystems/sx1302_hal.git;protocol=https;branch=master \ + file://reset_lgw.sh \ + file://global_conf.json.MTAC_003_0_0.EU868 \ + file://global_conf.json.MTAC_003_0_0.US915 \ + file://global_conf.json.MTCAP3.EU868 \ + file://global_conf.json.MTCAP3.US915 \ +" + +SRC_URI[sha256sum] = "6499b73e97cb3e97fcfc02f4ebeee78cf273ccfec7f2221e2b1b9d1f02e7d408" + + +S = "${WORKDIR}/git" +B = "${S}" + +LORA_DIR = "/opt/lora" + + +CFLAGS += "-DNODEBUG -I${S}/packet_forwarder/inc -I${S}/libloragw/inc -I${S}/libtools/inc -I${S}/inc -I. -std=gnu11" + +do_compile() { + oe_runmake packet_forwarder LDFLAGS=${LDFLAGS} + oe_runmake util_boot LDFLAGS=${LDFLAGS} + oe_runmake util_chip_id FLAGS=${LDFLAGS} + oe_runmake util_net_downlink LDFLAGS=${LDFLAGS} + # oe_runmake util_spectral_scan LDFLAGS=${LDFLAGS} +} + +do_install() { + install -d ${D}${LORA_DIR} + install -d ${D}${libdir}/lora + install -d ${D}${libdir}/lora/lgw-sx1303/lgw + install -d ${D}${includedir}/lora/lgw-sx1303/lgw + + install -m 0644 libloragw/libloragw.a ${D}${libdir}/lora/lgw-sx1303/lgw/ + install -m 0644 libloragw/library.cfg ${D}${libdir}/lora/lgw-sx1303/lgw/ + install -m 0644 libloragw/inc/* ${D}${includedir}/lora/lgw-sx1303/lgw/ + + install -d ${D}${LORA_DIR}/forwarder-utils-sx1303 + install -d ${D}${LORA_DIR}/gateway-utils-sx1303 + install -m 755 ${WORKDIR}/reset_lgw.sh ${D}${LORA_DIR}/ + install -m 755 packet_forwarder/lora_pkt_fwd ${D}${LORA_DIR}/lora_pkt_fwd_sx1303 + install -m 755 libloragw/test_loragw* ${D}${LORA_DIR}/gateway-utils-sx1303/ + install -m 755 util_boot/boot ${D}${LORA_DIR}/forwarder-utils-sx1303/util_boot + install -m 755 util_chip_id/chip_id ${D}${LORA_DIR}/forwarder-utils-sx1303/util_chip_id + install -m 755 util_net_downlink/net_downlink ${D}${LORA_DIR}/forwarder-utils-sx1303/util_net_downlink + # install -m 755 util_spectral_scan/util_spectral_scan ${D}${LORA_DIR}/forwarder-utils-sx1303/ +} + +do_install_append_mtcdt() { + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/ +} + +do_install_append_mtcap() { +} + + +do_install_append_mtcap3() { + install -m 755 ${WORKDIR}/global_conf.json.MTCAP3.EU868 ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/global_conf.json.MTCAP3.US915 ${D}${LORA_DIR}/ +} + +do_install_append_mtcdt3() { + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/ +} + +do_install_append_mtcdt3hs() { + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/ +} + + +FILES_${PN} += "${LORA_DIR}" + +# disable this on purpose for dev purposes +do_rm_work() { + echo "skipping" +} -- cgit v1.2.3 From a3546aa30cf7c5bbf4159f662d857a02e0f00ad1 Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Sat, 9 Apr 2022 16:53:27 +0300 Subject: MTCAP3: Fix tpm2-tss-engine for new versions of openssl Modern versions of openssl look for engine files that do not have the "lib" prefix. The current tpm2-tss-engine recipe provides a symlink from "tpm2tss.so" to "libtpm2tss.so" in the "-dev" package. Adding "-dev" packages to the image is not an option (increases the image size by more than 20 MiB) and the "-engines" package does not provide the required symlink. Provide the symlink in "tpm2-tss-engine-engines" so it can be used in the image instead of "tpm2-tss-engine-dev". --- recipes-tpm2/tpm2-tss/tpm2-tss-engine_1.0.1.bbappend | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 recipes-tpm2/tpm2-tss/tpm2-tss-engine_1.0.1.bbappend diff --git a/recipes-tpm2/tpm2-tss/tpm2-tss-engine_1.0.1.bbappend b/recipes-tpm2/tpm2-tss/tpm2-tss-engine_1.0.1.bbappend new file mode 100644 index 0000000..5bdbb4a --- /dev/null +++ b/recipes-tpm2/tpm2-tss/tpm2-tss-engine_1.0.1.bbappend @@ -0,0 +1,18 @@ +# Openssl since 1.1.0 looks for the engine files **without** the "lib" prefix, +# so add a symlink from "tpm2tss.so" to "libtpm2tss.so". +# More info: +# - https://github.com/tpm2-software/tpm2-tss-engine/issues/6#issuecomment-422489744 +# - https://github.com/openssl/openssl/commit/9ee0ed3de66678a15db126d10b3e4226e835b8f5 +# - https://bugzilla.yoctoproject.org/show_bug.cgi?id=14776 +# - https://lists.yoctoproject.org/g/yocto/message/47921 + +# Remove tpm2tss.so from the "-dev" package, include it to "-engines" instead. +# The "-dev" package depends on "-engines" anyway. +FILES_${PN}-dev = "${includedir}/*" +FILES_${PN}-engines_append = " ${libdir}/engines-1.1/tpm2tss.so" + +# Allow the symlink from tpm2tss.so to libtpm2tss.so in "-engines". +INSANE_SKIP_${PN}-engines += "dev-so" + +# Customized in mLinux. +PR = "m0" -- cgit v1.2.3 From 2dec7e2d07bbe650cfcb77894c15c21c8621c7ef Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Thu, 14 Apr 2022 09:54:48 -0500 Subject: Removed lora basic station sx1303 from recipes --- .../lora-basic-station.default | 2 - .../lora-basic-station.init | 158 --------------------- .../lora-basic-station-sx1303/mtcap-station.conf | 47 ------ .../lora-basic-station-sx1303/mtcdt-station.conf | 47 ------ .../lora/lora-basic-station-sx1303/setup.gmk | 91 ------------ .../lora/lora-basic-station-sx1303/tc.uri | 1 - .../lora/lora-basic-station-sx1303_2.0.6-5.bb | 56 -------- 7 files changed, 402 deletions(-) delete mode 100644 recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.default delete mode 100755 recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.init delete mode 100644 recipes-connectivity/lora/lora-basic-station-sx1303/mtcap-station.conf delete mode 100644 recipes-connectivity/lora/lora-basic-station-sx1303/mtcdt-station.conf delete mode 100644 recipes-connectivity/lora/lora-basic-station-sx1303/setup.gmk delete mode 100644 recipes-connectivity/lora/lora-basic-station-sx1303/tc.uri delete mode 100644 recipes-connectivity/lora/lora-basic-station-sx1303_2.0.6-5.bb diff --git a/recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.default b/recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.default deleted file mode 100644 index 0f92640..0000000 --- a/recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.default +++ /dev/null @@ -1,2 +0,0 @@ -# set to "yes" or "no" to control starting on boot -ENABLED="no" diff --git a/recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.init b/recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.init deleted file mode 100755 index 7ebeea2..0000000 --- a/recipes-connectivity/lora/lora-basic-station-sx1303/lora-basic-station.init +++ /dev/null @@ -1,158 +0,0 @@ -#!/bin/bash - - -NAME="lora-basic-station" -ENABLED="yes" - - -[ -f /etc/default/$NAME ] && source /etc/default/$NAME - -run_dir=/var/run/lora -opt_conf_dir=/opt/lora -conf_dir=/var/config/lora -conf_file=$conf_dir/station.conf -tc_uri_file=$conf_dir/tc.uri -tc_key_file=$conf_dir/tc.key -tc_trust_file=$conf_dir/tc.trust - -pkt_fwd=$run_dir/1/station -pkt_fwd_pidfile=$run_dir/station.pid - -port1=/sys/devices/platform/mts-io/ap1 -port2=/sys/devices/platform/mts-io/ap2 - -lora_mtac_id="MTAC-LORA" -lora_1_0_hw="MTAC-LORA-1.0" -lora_1_5_h_hw="MTAC-LORA-1.5" -lora_2_1_hw="MTAC-LORA-2.1" - -lora_mtac_id="MTAC-LORA" -lora_mtac_id915="MTAC-LORA-915" -lora_mtac_id868="MTAC-LORA-868" -lora_mtac_h_id915="MTAC-LORA-H-915" -lora_mtac_h_id868="MTAC-LORA-H-868" - -lora_mtcap_id="MTCAP-LORA" -lora_mtcap_id868="MTCAP-LORA-868" -lora_mtcap_id915="MTCAP-LORA-915" - -lora_mtac_g_id="MTAC-LORA-G" -lora_mtac_g16_id868="MTAC-LORA-G16-868" -lora_mtac_g16_id915="MTAC-LORA-G16-915" -lora_mtac_g64_id868="MTAC-LORA-G64-868" -lora_mtac_g64_id915="MTAC-LORA-G64-915" - -pkt_fwd_options="" - -gps_path="/dev/gps0" - -read_lora_hw_info() { - lora_id=$(mts-io-sysfs show lora/product-id 2> /dev/null) - lora_hw=$(mts-io-sysfs show lora/hw-version 2> /dev/null) - lora_eui=$(mts-io-sysfs show lora/eui 2> /dev/null) - lora_eui_raw=${lora_eui//:/} -} - -hardware_found() { - if [[ "$lora_id" =~ "$lora_mtac_g_id" ]]; then - setup_mtcdt_2_1 - elif [[ "$lora_id" =~ "$lora_mtcap_id" ]]; then - setup_mtcap - elif [[ "$lora_id" =~ "$lora_mtac_id" ]]; then - setup_mtcdt - else - return 1 - fi - return 0 -} - -setup_mtcdt() { - ln -sf /opt/lora/station $pkt_fwd -} - -setup_mtcap() { - ln -sf /opt/lora/station $pkt_fwd -} - -setup_mtcdt_2_1() { - echo LORA-2.1 not supported - return 1 -} - -do_start() { - - mkdir -p $run_dir/1 - rm -rf $run_dir/1/* - - read_lora_hw_info - - if hardware_found; then - echo "Found $lora_id with $lora_hw hardware. Configuring" - else - echo "$0: LORA card not detected" - exit 1 - fi - - if ! [ -f $conf_file ]; then - echo "$0: $conf_file missing" - exit 1 - fi - - # - # copy conf files to the run directory - # - cp $conf_file $run_dir/1/ - cp $tc_uri_file $run_dir/1/ - cp $tc_key_file $run_dir/1/ - cp $tc_trust_file $run_dir/1/ - - sed -i.bak "s/\(.*routerid\"\s*\:\s*\"\)<.*>[^\"]*\(.*\)/\1${lora_eui_raw}\2/g" /var/run/lora/1/station.conf - - # - # start packet forwarder - # - echo -n "Starting $NAME: " - - /usr/sbin/start-stop-daemon --chdir $run_dir/1 --background --start --make-pidfile \ - --pidfile $pkt_fwd_pidfile --startas /bin/bash -- -c "exec $pkt_fwd $pkt_fwd_options" - - renice -n -20 -p $(pgrep $(basename $pkt_fwd)) - - echo "OK" -} - - -do_stop() { - echo -n "Stopping $NAME: " - start-stop-daemon --stop --quiet --oknodo --pidfile $pkt_fwd_pidfile --retry 5 - rm -f $pkt_fwd_pidfile - echo "OK" -} - - -if [ "$ENABLED" != "yes" ]; then - echo "$NAME: disabled in /etc/default" - exit -fi - - -case "$1" in - "start") - do_start - ;; - "stop") - do_stop - ;; - "restart") - ## Stop the service and regardless of whether it was - ## running or not, start it again. - do_stop - do_start - ;; - *) - ## If no parameters are given, print which are avaiable. - echo "Usage: $0 {start|stop|restart}" - exit 1 - ;; -esac - diff --git a/recipes-connectivity/lora/lora-basic-station-sx1303/mtcap-station.conf b/recipes-connectivity/lora/lora-basic-station-sx1303/mtcap-station.conf deleted file mode 100644 index baa9793..0000000 --- a/recipes-connectivity/lora/lora-basic-station-sx1303/mtcap-station.conf +++ /dev/null @@ -1,47 +0,0 @@ -{ - "SX1301_conf": { - "lorawan_public": true, - "clksrc": 0, - "pps": true, - "device": "/dev/spidev0.0", - "chan_FSK": {"bandwidth": 125000, "datarate": 50000, "enable": true, "if": 300000, "radio": 0}, - "chan_Lora_std": {"bandwidth": 250000, "enable": true, "if": -200000, "radio": 0, "spread_factor": 7}, - "chan_multiSF_0": {"enable": true, "if": -400000, "radio": 0}, - "chan_multiSF_1": {"enable": true, "if": -200000, "radio": 0}, - "chan_multiSF_2": {"enable": true, "if": 0, "radio": 0}, - "chan_multiSF_3": {"enable": true, "if": -400000, "radio": 1}, - "chan_multiSF_4": {"enable": true, "if": -200000, "radio": 1}, - "chan_multiSF_5": {"enable": true, "if": 0, "radio": 1}, - "chan_multiSF_6": {"enable": true, "if": 200000, "radio": 1}, - "chan_multiSF_7": {"enable": true, "if": 400000, "radio": 1}, - "radio_0": {"enable": true, "freq": 923600000, "rssi_offset": -162, "tx_enable": true, "type": "SX1257"}, - "radio_1": {"enable": true, "freq": 922600000, "rssi_offset": -162, "tx_enable": false, "type": "SX1257"}, - "tx_gain_lut": [ - {"dac_gain": 3,"dig_gain":2,"mix_gain":15,"pa_gain":1,"rf_power":10}, - {"dac_gain": 3,"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":11}, - {"dac_gain": 3,"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":12}, - {"dac_gain": 3,"dig_gain":0,"mix_gain":10,"pa_gain":2,"rf_power":13}, - {"dac_gain": 3,"dig_gain":3,"mix_gain":14,"pa_gain":2,"rf_power":14}, - {"dac_gain": 3,"dig_gain":1,"mix_gain":12,"pa_gain":2,"rf_power":15}, - {"dac_gain": 3,"dig_gain":0,"mix_gain":12,"pa_gain":2,"rf_power":16}, - {"dac_gain": 3,"dig_gain":2,"mix_gain":14,"pa_gain":2,"rf_power":17}, - {"dac_gain": 3,"dig_gain":2,"mix_gain":15,"pa_gain":2,"rf_power":18}, - {"dac_gain": 3,"dig_gain":1,"mix_gain":15,"pa_gain":2,"rf_power":19}, - {"dac_gain": 3,"dig_gain":0,"mix_gain":9,"pa_gain":3,"rf_power":20}, - {"dac_gain": 3,"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":21}, - {"dac_gain": 3,"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":22}, - {"dac_gain": 3,"dig_gain":0,"mix_gain":11,"pa_gain":3,"rf_power":23}, - {"dac_gain": 3,"dig_gain":2,"mix_gain":14,"pa_gain":3,"rf_power":24}, - {"dac_gain": 3,"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":25} - ] - }, - "station_conf": { - "routerid": "", - "euiprefix": "::0", - "log_file": "stderr", - "log_level": "INFO", - "log_size": 100000, - "log_rotate": 3, - "TC_TIMEOUT": "2s" - } -} diff --git a/recipes-connectivity/lora/lora-basic-station-sx1303/mtcdt-station.conf b/recipes-connectivity/lora/lora-basic-station-sx1303/mtcdt-station.conf deleted file mode 100644 index 8cfa72d..0000000 --- a/recipes-connectivity/lora/lora-basic-station-sx1303/mtcdt-station.conf +++ /dev/null @@ -1,47 +0,0 @@ -{ - "SX1301_conf": { - "lorawan_public": true, - "clksrc": 0, - "pps": true, - "device": "/dev/spidev0.0", - "chan_FSK": {"bandwidth": 125000, "datarate": 50000, "enable": true, "if": 300000, "radio": 0}, - "chan_Lora_std": {"bandwidth": 250000, "enable": true, "if": -200000, "radio": 0, "spread_factor": 7}, - "chan_multiSF_0": {"enable": true, "if": -400000, "radio": 0}, - "chan_multiSF_1": {"enable": true, "if": -200000, "radio": 0}, - "chan_multiSF_2": {"enable": true, "if": 0, "radio": 0}, - "chan_multiSF_3": {"enable": true, "if": -400000, "radio": 1}, - "chan_multiSF_4": {"enable": true, "if": -200000, "radio": 1}, - "chan_multiSF_5": {"enable": true, "if": 0, "radio": 1}, - "chan_multiSF_6": {"enable": true, "if": 200000, "radio": 1}, - "chan_multiSF_7": {"enable": true, "if": 400000, "radio": 1}, - "radio_0": {"enable": true, "freq": 923600000, "rssi_offset": -162, "tx_enable": true, "type": "SX1257"}, - "radio_1": {"enable": true, "freq": 922600000, "rssi_offset": -162, "tx_enable": false, "type": "SX1257"}, - "tx_gain_lut": [ - {"dig_gain": 0, "mix_gain": 11, "pa_gain": 0, "dac_gain": 3, "rf_power": -6}, - {"dig_gain": 0, "mix_gain": 13, "pa_gain": 0, "dac_gain": 3, "rf_power": -3}, - {"dig_gain": 0, "mix_gain": 9, "pa_gain": 1, "dac_gain": 3, "rf_power": 0}, - {"dig_gain": 0, "mix_gain": 10, "pa_gain": 1, "dac_gain": 3, "rf_power": 3}, - {"dig_gain": 0, "mix_gain": 12, "pa_gain": 1, "dac_gain": 3, "rf_power": 6}, - {"dig_gain": 0, "mix_gain": 10, "pa_gain": 2, "dac_gain": 3, "rf_power": 10}, - {"dig_gain": 0, "mix_gain": 11, "pa_gain": 2, "dac_gain": 3, "rf_power": 11}, - {"dig_gain": 0, "mix_gain": 11, "pa_gain": 2, "dac_gain": 3, "rf_power": 12}, - {"dig_gain": 2, "mix_gain": 12, "pa_gain": 2, "dac_gain": 3, "rf_power": 13}, - {"dig_gain": 0, "mix_gain": 13, "pa_gain": 2, "dac_gain": 3, "rf_power": 14}, - {"dig_gain": 0, "mix_gain": 15, "dac_gain": 3, "pa_gain": 2, "rf_power": 16}, - {"dig_gain": 0, "mix_gain": 10, "pa_gain": 3, "dac_gain": 3, "rf_power": 20}, - {"dig_gain": 0, "mix_gain": 12, "dac_gain": 3, "pa_gain": 3, "rf_power": 23}, - {"dig_gain": 0, "dac_gain": 3, "mix_gain": 13, "pa_gain": 3, "rf_power": 25}, - {"dig_gain": 0, "dac_gain": 3, "mix_gain": 15, "pa_gain": 3, "rf_power": 26}, - {"dig_gain": 0, "mix_gain": 15, "dac_gain": 3, "pa_gain": 3, "rf_power": 27} - ] - }, - "station_conf": { - "routerid": "", - "euiprefix": "::0", - "log_file": "stderr", - "log_level": "INFO", - "log_size": 100000, - "log_rotate": 3, - "TC_TIMEOUT": "2s" - } -} diff --git a/recipes-connectivity/lora/lora-basic-station-sx1303/setup.gmk b/recipes-connectivity/lora/lora-basic-station-sx1303/setup.gmk deleted file mode 100644 index 5811673..0000000 --- a/recipes-connectivity/lora/lora-basic-station-sx1303/setup.gmk +++ /dev/null @@ -1,91 +0,0 @@ -# -*- makefile -*- - -# Top dir of s2core -# - override accordingly in makefile including this setup.gmk - -platform ?= mlinux -variant ?= sx1303 - - -ARCH ?= -CROSS_COMPILE ?= -export - -# TOOLPREFIX=${CROSS_COMPILE} - - -BD=build-${platform}-${variant} - -# -- Architecture specific -CFG.arm-linux-gnueabihf = mlinux -# CFG.x86_64-linux-gnu = linux - -# -- Variant specific -# testsim runs libloragw inside master process -# testms uses a master slave model -#CFG.testsim = logini_lvl=DEBUG selftests tlsdebug lgwsim ral_lgw -#CFG.testms = logini_lvl=DEBUG selftests tlsdebug lgwsim ral_master_slave -#CFG.testfs = logini_lvl=DEBUG selftests tlsdebug lgwsim ral_lgw -#CFG.testpin = logini_lvl=INFO tlsdebug ral_lgw testpin -#CFG.std = logini_lvl=INFO tlsdebug ral_lgw -#CFG.stdn = logini_lvl=INFO tlsdebug ral_master_slave -#CFG.debug = logini_lvl=DEBUG selftests tlsdebug ral_lgw -#CFG.debugn = logini_lvl=DEBUG selftests tlsdebug ral_master_slave - -# -- Platform specific -CFG.linux = linux lgw1 no_leds -CFG.rpi = linux lgw1 no_leds -CFG.kerlink = linux lgw1 no_leds -CFG.mlinux = linux no_leds ral_lgw prod sx1302 lgw1 - -SD.default = src-linux - -SD = $(or ${SD.${platform}}, ${SD.default}) - -UTILS.linux = mtuns - -UTILS = $(or ${UTILS.${platform}}, ${UTILS.default}) - -PERSO.default = -PERSO = $(or ${PERSO.${platform}}, ${PERSO.default}) -PERSOH = $(if ${PERSO},perso.h,) - -# Paths to dependencies -MBEDLIBS = -lmbedtls -lmbedx509 -lmbedcrypto - -# -lm: Needed for lgw which uses pow/ceil -ifneq (minihub,$(platform)) -SYSLIBS = -lm -endif - -CFLAGS.linux.testsim = -g -O0 --coverage -CFLAGS.linux.testms = -g -O0 --coverage -CFLAGS.linux.testfs = -g -O0 --coverage -CFLAGS.linux.testpin = -g -O3 -CFLAGS.linux.std = -g -O3 -CFLAGS.mlinux.std = -g -O3 - -LIBS.mlinux = -lloragw ${MBEDLIBS} -lrt -lm -lpthread -LIBS.linux = -llgw ${MBEDLIBS} -lpthread -LIBS.rpi = -llgw ${MBEDLIBS} -lpthread -LIBS.kerlink = -llgw ${MBEDLIBS} -lrt -lpthread - -xCFG = ${CFG.${ARCH}} ${CFG.${platform}} ${CFG.${variant}} ${CFG.${platform}.${variant}} -xCFLAGS = ${CFLAGS.${ARCH}} ${CFLAGS.${platform}} ${CFLAGS.${variant}} ${CFLAGS.${platform}.${variant}} -xINCS = ${INCS.${ARCH}} ${INCS.${platform}} ${INCS.${variant}} -xLDFLAGS = ${LDFLAGS.${ARCH}} ${LDFLAGS.${platform}} ${LDFLAGS.${variant}} -xLIBS = ${LIBS.${ARCH}} ${LIBS.${platform}} ${LIBS.${variant}} -xFILES = ${FILES.${ARCH}} ${FILES.${platform}} ${FILES.${variant}} -xOCFLAGS = ${OCFLAGS.${ARCH}} ${OCFLAGS.${platform}} ${OCFLAGS.${variant}} - -DEFS = -DCFG_platform_${platform} -DCFG_platform=\"${platform}\" -DCFG_variant_${variant} -DCFG_variant=\"${variant}\" -DEFS += -DCFG_bdate='"$(shell date -u '+%Y-%m-%d %H:%M:%S')"' -DEFS += -DCFG_version='"$(shell if [ -f ${TD}/VERSION.txt ]; then cat ${TD}/VERSION.txt; else git describe --tag; fi)(${platform}/${variant})"' -DEFS += -DCFG_commit='"$(shell if git rev-parse --git-dir >/dev/null 2>&1; then git rev-parse --short HEAD; else echo -; fi)"' -DEFS += ${xCFG:%=-DCFG_%} -INCS = ${VPATH:%=-I%} -I ${TD}/${BD}/include ${xINCS} -CFLAGS += -std=gnu11 ${INCS} ${DEFS} ${xCFLAGS} ${MORECFLAGS} -LDFLAGS += -L ${TD}/${BD}/lib ${xLDFLAGS} -LIBS = ${xLIBS} ${SYSLIBS} -FILES = ${xFILES} -OCFLAGS = ${xOCFLAGS} diff --git a/recipes-connectivity/lora/lora-basic-station-sx1303/tc.uri b/recipes-connectivity/lora/lora-basic-station-sx1303/tc.uri deleted file mode 100644 index 62ad13e..0000000 --- a/recipes-connectivity/lora/lora-basic-station-sx1303/tc.uri +++ /dev/null @@ -1 +0,0 @@ -wss://127.0.0.1:9002 diff --git a/recipes-connectivity/lora/lora-basic-station-sx1303_2.0.6-5.bb b/recipes-connectivity/lora/lora-basic-station-sx1303_2.0.6-5.bb deleted file mode 100644 index 35e13a6..0000000 --- a/recipes-connectivity/lora/lora-basic-station-sx1303_2.0.6-5.bb +++ /dev/null @@ -1,56 +0,0 @@ -DESCRIPTION = "LoRa Basic Station" -HOMEPAGE = "https://github.com/lorabasics/basicstation" -PRIORITY = "optional" -SECTION = "console/utils" -# Semtech license is a modified BSD-style license -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://LICENSE;md5=26699ffb0048fefa02c871c2485867ee" -DEPENDS = "lora-gateway-sx1303 logrotate lora-logging mbedtls" -RDEPENDS_${PN} += "bash" -PR = "r4" - -# SRCREV = "9bf824154731cbe78366cbffa1b0c6bd0354b66f" -SRCREV = "${PV}" - -SRC_URI = "git://github.com/MultiTechSystems/basicstation.git;protocol=https;branch=master; \ - file://setup.gmk \ - file://lora-basic-station.init \ - file://lora-basic-station.default \ - file://tc.uri \ - file://mtcap-station.conf \ - file://mtcdt-station.conf \ -" - -S = "${WORKDIR}/git" -B = "${S}" - -LORA_DIR = "/opt/lora" - -export LGW_PATH = "${STAGING_LIBDIR}/lora" -export LGW_INC = "${STAGING_INCDIR}/lora" - -CFLAGS += "-DNODEBUG -I${STAGING_INCDIR} -I${WORKDIR}/git/libtools -I${STAGING_INCDIR}/lora -I${STAGING_INCDIR}/lora/lgw-sx1303 -I${WORKDIR}/git/deps -Iinc -I. -std=gnu11 -L${WORKDIR}/git/libtools -L${STAGING_LIBDIR}/lora/lgw-sx1303/lgw/ -L${STAGING_LIBDIR}/lora" - -do_compile() { - cp ${WORKDIR}/setup.gmk ${S}/setup.gmk - oe_runmake -} - -do_install() { - install -d ${D}${LORA_DIR} - install -m 755 ${S}/build-mlinux-sx1303/bin/station ${D}${LORA_DIR}/station-sx1303 -} - -do_install_append_mtcdt() { - install -d ${D}${LORA_DIR} - install -m 755 ${WORKDIR}/mtcdt-station.conf ${D}${LORA_DIR}/station-sx1303.conf -} - - - -FILES_${PN} += "${LORA_DIR}" - -# disable this on purpose for dev purposes -do_rm_work() { - echo "skipping" -} -- cgit v1.2.3