From 92d4f449a8abc3d8ccbe2911b689ed53fb59c128 Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Wed, 20 Apr 2022 14:29:32 -0500 Subject: Updated lora tags --- .../lora/lora-gateway-sx1303_2.0.19.bb | 93 ----------- .../lora/lora-gateway-sx1303_2.0.20.bb | 93 +++++++++++ recipes-connectivity/lora/lora-gateway_5.0.10.bb | 68 -------- recipes-connectivity/lora/lora-gateway_5.0.11.bb | 68 ++++++++ .../lora/lora-packet-forwarder_4.0.12.bb | 178 --------------------- .../lora/lora-packet-forwarder_4.0.17.bb | 178 +++++++++++++++++++++ 6 files changed, 339 insertions(+), 339 deletions(-) delete mode 100644 recipes-connectivity/lora/lora-gateway-sx1303_2.0.19.bb create mode 100644 recipes-connectivity/lora/lora-gateway-sx1303_2.0.20.bb delete mode 100644 recipes-connectivity/lora/lora-gateway_5.0.10.bb create mode 100644 recipes-connectivity/lora/lora-gateway_5.0.11.bb delete mode 100644 recipes-connectivity/lora/lora-packet-forwarder_4.0.12.bb create mode 100644 recipes-connectivity/lora/lora-packet-forwarder_4.0.17.bb diff --git a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.19.bb b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.19.bb deleted file mode 100644 index 312eda4..0000000 --- a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.19.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.20.bb b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.20.bb new file mode 100644 index 0000000..312eda4 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.20.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" +} diff --git a/recipes-connectivity/lora/lora-gateway_5.0.10.bb b/recipes-connectivity/lora/lora-gateway_5.0.10.bb deleted file mode 100644 index 6be0c47..0000000 --- a/recipes-connectivity/lora/lora-gateway_5.0.10.bb +++ /dev/null @@ -1,68 +0,0 @@ -DESCRIPTION = "LoRa Gateway library" -HOMEPAGE = "https://github.com/Lora-net/lora_gateway" -PRIORITY = "optional" -SECTION = "console/utils" -# Semtech license is a modified BSD-style license -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a2bdef95625509f821ba00460e3ae0eb" -DEPENDS = "gpsd" -RDEPENDS_${PN} = "libgps" - -PR = "r32" -SRCREV = "${PV}" - -SRC_URI = "git://git.multitech.net/lora_gateway_mtac_full;branch=master;protocol=git \ - file://library_4.0.cfg \ - file://ln-lora-spi-dev.sh \ - " - - -S = "${WORKDIR}/git" - -CFLAGS += "-Iinc -I. -idirafter ${STAGING_DIR_TARGET}/usr/include/gps" - -do_configure_append() { - # copy over custom library_4.0.cfg - cp ${WORKDIR}/library_4.0.cfg ${S}/libloragw/library.cfg -} - -do_compile() { - oe_runmake -} - -do_install() { - install -d ${D}${includedir}/lora - install -d ${D}${libdir}/lora - install -m 0644 libloragw/libloragw.a ${D}${libdir}/lora - install -m 0644 libloragw/library.cfg ${D}${libdir}/lora - install -m 0644 libloragw/inc/* ${D}${includedir}/lora - install -m 0644 libloragw/readme.md ${D}${libdir}/lora/lora-gw-readme.md - - install -d ${D}/opt/lora/ - - install -d ${D}/opt/lora/gateway-utils - install -m 0755 libloragw/test_* ${D}/opt/lora/gateway-utils/ - install -m 0755 util_pkt_logger/util_pkt_logger ${D}/opt/lora/gateway-utils/ - install -m 0755 util_spectral_scan/util_spectral_scan ${D}/opt/lora/gateway-utils/ - install -m 0755 util_spi_stress/util_spi_stress ${D}/opt/lora/gateway-utils/ - install -m 0755 util_tx_test/util_tx_test ${D}/opt/lora/gateway-utils/ - install -m 0755 util_tx_continuous/util_tx_continuous ${D}/opt/lora/gateway-utils/ - install -m 0755 util_lbt_test/util_lbt_test ${D}/opt/lora/gateway-utils/ -} - -do_install_append_mtcdt() { - install -m 0755 ${WORKDIR}/ln-lora-spi-dev.sh ${D}/opt/lora/ -} - -PACKAGES += "${PN}-utils ${PN}-utils-dbg" - -FILES_${PN} = "${libdir}/lora/lora-gw-readme.md" -FILES_${PN}-utils = "/opt/lora/gateway-utils/* /opt/lora/ln-lora-spi-dev.sh" -FILES_${PN}-utils-dbg = "/opt/lora/gateway-utils/.debug /opt/lora/ln-lora-spi-dev.sh" -FILES_${PN}-dev = "${includedir}/lora ${libdir}/lora/library.cfg" -FILES_${PN}-staticdev = "${libdir}/lora/libloragw.a" - -# disable this on purpose for dev purposes -do_rm_work() { - echo "skipping" -} diff --git a/recipes-connectivity/lora/lora-gateway_5.0.11.bb b/recipes-connectivity/lora/lora-gateway_5.0.11.bb new file mode 100644 index 0000000..7baa9d2 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway_5.0.11.bb @@ -0,0 +1,68 @@ +DESCRIPTION = "LoRa Gateway library" +HOMEPAGE = "https://github.com/Lora-net/lora_gateway" +PRIORITY = "optional" +SECTION = "console/utils" +# Semtech license is a modified BSD-style license +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a2bdef95625509f821ba00460e3ae0eb" +DEPENDS = "gpsd" +RDEPENDS_${PN} = "libgps" + +PR = "r33" +SRCREV = "${PV}" + +SRC_URI = "git://git.multitech.net/lora_gateway_mtac_full;branch=master;protocol=git \ + file://library_4.0.cfg \ + file://ln-lora-spi-dev.sh \ + " + + +S = "${WORKDIR}/git" + +CFLAGS += "-Iinc -I. -idirafter ${STAGING_DIR_TARGET}/usr/include/gps" + +do_configure_append() { + # copy over custom library_4.0.cfg + cp ${WORKDIR}/library_4.0.cfg ${S}/libloragw/library.cfg +} + +do_compile() { + oe_runmake +} + +do_install() { + install -d ${D}${includedir}/lora + install -d ${D}${libdir}/lora + install -m 0644 libloragw/libloragw.a ${D}${libdir}/lora + install -m 0644 libloragw/library.cfg ${D}${libdir}/lora + install -m 0644 libloragw/inc/* ${D}${includedir}/lora + install -m 0644 libloragw/readme.md ${D}${libdir}/lora/lora-gw-readme.md + + install -d ${D}/opt/lora/ + + install -d ${D}/opt/lora/gateway-utils + install -m 0755 libloragw/test_* ${D}/opt/lora/gateway-utils/ + install -m 0755 util_pkt_logger/util_pkt_logger ${D}/opt/lora/gateway-utils/ + install -m 0755 util_spectral_scan/util_spectral_scan ${D}/opt/lora/gateway-utils/ + install -m 0755 util_spi_stress/util_spi_stress ${D}/opt/lora/gateway-utils/ + install -m 0755 util_tx_test/util_tx_test ${D}/opt/lora/gateway-utils/ + install -m 0755 util_tx_continuous/util_tx_continuous ${D}/opt/lora/gateway-utils/ + install -m 0755 util_lbt_test/util_lbt_test ${D}/opt/lora/gateway-utils/ +} + +do_install_append_mtcdt() { + install -m 0755 ${WORKDIR}/ln-lora-spi-dev.sh ${D}/opt/lora/ +} + +PACKAGES += "${PN}-utils ${PN}-utils-dbg" + +FILES_${PN} = "${libdir}/lora/lora-gw-readme.md" +FILES_${PN}-utils = "/opt/lora/gateway-utils/* /opt/lora/ln-lora-spi-dev.sh" +FILES_${PN}-utils-dbg = "/opt/lora/gateway-utils/.debug /opt/lora/ln-lora-spi-dev.sh" +FILES_${PN}-dev = "${includedir}/lora ${libdir}/lora/library.cfg" +FILES_${PN}-staticdev = "${libdir}/lora/libloragw.a" + +# disable this on purpose for dev purposes +do_rm_work() { + echo "skipping" +} diff --git a/recipes-connectivity/lora/lora-packet-forwarder_4.0.12.bb b/recipes-connectivity/lora/lora-packet-forwarder_4.0.12.bb deleted file mode 100644 index 35ffaf5..0000000 --- a/recipes-connectivity/lora/lora-packet-forwarder_4.0.12.bb +++ /dev/null @@ -1,178 +0,0 @@ -DESCRIPTION = "LoRa Packet Forwarder" -HOMEPAGE = "https://github.com/Lora-net/packet_forwarder" -PRIORITY = "optional" -SECTION = "console/utils" -# Semtech license is a modified BSD-style license -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://LICENSE;md5=22af7693d7b76ef0fc76161c4be76c45" -DEPENDS = "lora-gateway logrotate lora-logging gpsd" -RDEPENDS_${PN} += "bash" -FILESEXTRAPATHS_append_mtcdt3hs := ":${THISDIR}/lora-packet-forwarder/mtcdt3" -PR = "r30" -SRCREV = "${PV}" -PACKAGE_ARCH = "${MACHINE_ARCH}" - -SRC_URI = "git://git.multitech.net/packet_forwarder_mtac_full;branch=master;protocol=git \ - file://README.md \ - file://lora-packet-forwarder.init \ - file://lora-packet-forwarder.default \ - file://global_conf.json.3.0.0.PCB_E336.EU868.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic \ - file://global_conf.json.MTCAP2-LORA-1.5.AS923 \ - file://global_conf.json.MTCAP2-LORA-1.5.AS923-LBT \ - file://global_conf.json.MTCAP2-LORA-1.5.AU915 \ - file://global_conf.json.MTCAP2-LORA-1.5.EU868 \ - file://global_conf.json.MTCAP2-LORA-1.5.IN865 \ - file://global_conf.json.MTCAP2-LORA-1.5.KR920-LBT \ - file://global_conf.json.MTCAP2-LORA-1.5.RU864 \ - file://global_conf.json.MTCAP2-LORA-1.5.US915 \ - file://temp_lut.json.MTCAP2.US915 \ - file://temp_lut.json.MTCAP2.EU868 \ - file://local_conf.json \ -" - - -S = "${WORKDIR}/git" -B = "${S}" -TARGET_CC_ARCH += "${LDFLAGS}" - - -LORA_DIR = "/opt/lora" - -export LGW_PATH = "${STAGING_LIBDIR}/lora" -export LGW_INC = "${STAGING_INCDIR}/lora" - -CFLAGS += "-I${LGW_INC} -Iinc -I. -std=gnu11" - -do_compile() { - oe_runmake -} - -do_install() { - install -d ${D}${LORA_DIR} - install -m 755 lora_pkt_fwd/lora_pkt_fwd ${D}${LORA_DIR}/ - install -m 755 ${WORKDIR}/local_conf.json ${D}${LORA_DIR}/ - - install -d ${D}${LORA_DIR}/forwarder-utils - install -m 755 util_sink/util_sink ${D}${LORA_DIR}/forwarder-utils/ - install -m 755 util_ack/util_ack ${D}${LORA_DIR}/forwarder-utils/ - install -m 755 util_tx_test/util_tx_test ${D}${LORA_DIR}/forwarder-utils/ - install -m 755 ${WORKDIR}/README.md ${D}${LORA_DIR}/ - - install -d ${D}${sysconfdir}/default - install -m 0644 ${WORKDIR}/lora-packet-forwarder.default ${D}${sysconfdir}/default/lora-packet-forwarder - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/lora-packet-forwarder.init ${D}${sysconfdir}/init.d/lora-packet-forwarder -} - -do_install_append_mtcdt() { - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 -} - -do_install_append_mtcap() { - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.RU864 - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.AU915 - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.AS923 - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.AS923-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.KR920-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.IN865 - - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.EU868 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.EU868 - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.RU864 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.RU864 - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.US915 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.US915 - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.AU915 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.AU915 - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.AS923 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.AS923 - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.AS923-LBT ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.AS923-LBT - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.KR920-LBT ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.KR920-LBT - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.IN865 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.IN865 - - install -m 644 ${WORKDIR}/temp_lut.json.MTCAP2.US915 ${D}${LORA_DIR}/ - install -m 644 ${WORKDIR}/temp_lut.json.MTCAP2.EU868 ${D}${LORA_DIR}/ -} - -do_install_append_mtcdt3() { - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 -} - -do_install_append_mtcdt3hs() { - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 -} - -do_install_append_mtcpmhs() { - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 -} - -FILES_${PN} += "${LORA_DIR}" -FILES_${PN}-dbg += "${LORA_DIR}/.debug ${LORA_DIR}/forwarder-utils/.debug" - -# disable this on purpose for dev purposes -do_rm_work() { - echo "skipping" -} diff --git a/recipes-connectivity/lora/lora-packet-forwarder_4.0.17.bb b/recipes-connectivity/lora/lora-packet-forwarder_4.0.17.bb new file mode 100644 index 0000000..cc974ec --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder_4.0.17.bb @@ -0,0 +1,178 @@ +DESCRIPTION = "LoRa Packet Forwarder" +HOMEPAGE = "https://github.com/Lora-net/packet_forwarder" +PRIORITY = "optional" +SECTION = "console/utils" +# Semtech license is a modified BSD-style license +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENSE;md5=22af7693d7b76ef0fc76161c4be76c45" +DEPENDS = "lora-gateway logrotate lora-logging gpsd" +RDEPENDS_${PN} += "bash" +FILESEXTRAPATHS_append_mtcdt3hs := ":${THISDIR}/lora-packet-forwarder/mtcdt3" +PR = "r31" +SRCREV = "${PV}" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +SRC_URI = "git://git.multitech.net/packet_forwarder_mtac_full;branch=master;protocol=git \ + file://README.md \ + file://lora-packet-forwarder.init \ + file://lora-packet-forwarder.default \ + file://global_conf.json.3.0.0.PCB_E336.EU868.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic \ + file://global_conf.json.MTCAP2-LORA-1.5.AS923 \ + file://global_conf.json.MTCAP2-LORA-1.5.AS923-LBT \ + file://global_conf.json.MTCAP2-LORA-1.5.AU915 \ + file://global_conf.json.MTCAP2-LORA-1.5.EU868 \ + file://global_conf.json.MTCAP2-LORA-1.5.IN865 \ + file://global_conf.json.MTCAP2-LORA-1.5.KR920-LBT \ + file://global_conf.json.MTCAP2-LORA-1.5.RU864 \ + file://global_conf.json.MTCAP2-LORA-1.5.US915 \ + file://temp_lut.json.MTCAP2.US915 \ + file://temp_lut.json.MTCAP2.EU868 \ + file://local_conf.json \ +" + + +S = "${WORKDIR}/git" +B = "${S}" +TARGET_CC_ARCH += "${LDFLAGS}" + + +LORA_DIR = "/opt/lora" + +export LGW_PATH = "${STAGING_LIBDIR}/lora" +export LGW_INC = "${STAGING_INCDIR}/lora" + +CFLAGS += "-I${LGW_INC} -Iinc -I. -std=gnu11" + +do_compile() { + oe_runmake +} + +do_install() { + install -d ${D}${LORA_DIR} + install -m 755 lora_pkt_fwd/lora_pkt_fwd ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/local_conf.json ${D}${LORA_DIR}/ + + install -d ${D}${LORA_DIR}/forwarder-utils + install -m 755 util_sink/util_sink ${D}${LORA_DIR}/forwarder-utils/ + install -m 755 util_ack/util_ack ${D}${LORA_DIR}/forwarder-utils/ + install -m 755 util_tx_test/util_tx_test ${D}${LORA_DIR}/forwarder-utils/ + install -m 755 ${WORKDIR}/README.md ${D}${LORA_DIR}/ + + install -d ${D}${sysconfdir}/default + install -m 0644 ${WORKDIR}/lora-packet-forwarder.default ${D}${sysconfdir}/default/lora-packet-forwarder + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/lora-packet-forwarder.init ${D}${sysconfdir}/init.d/lora-packet-forwarder +} + +do_install_append_mtcdt() { + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 +} + +do_install_append_mtcap() { + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.RU864 + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.AU915 + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.AS923 + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.AS923-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.KR920-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.IN865 + + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.EU868 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.EU868 + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.RU864 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.RU864 + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.US915 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.US915 + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.AU915 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.AU915 + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.AS923 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.AS923 + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.AS923-LBT ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.AS923-LBT + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.KR920-LBT ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.KR920-LBT + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.IN865 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.IN865 + + install -m 644 ${WORKDIR}/temp_lut.json.MTCAP2.US915 ${D}${LORA_DIR}/ + install -m 644 ${WORKDIR}/temp_lut.json.MTCAP2.EU868 ${D}${LORA_DIR}/ +} + +do_install_append_mtcdt3() { + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 +} + +do_install_append_mtcdt3hs() { + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 +} + +do_install_append_mtcpmhs() { + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 +} + +FILES_${PN} += "${LORA_DIR}" +FILES_${PN}-dbg += "${LORA_DIR}/.debug ${LORA_DIR}/forwarder-utils/.debug" + +# disable this on purpose for dev purposes +do_rm_work() { + echo "skipping" +} -- cgit v1.2.3 From cf909ecf4fa6d14535e9fcaaace73116558e9321 Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Fri, 22 Apr 2022 10:33:58 -0500 Subject: Updated lora gateway, packet forwarder and network server tags --- recipes-connectivity/lora/lora-gateway_5.0.11.bb | 68 -------- recipes-connectivity/lora/lora-gateway_5.0.12.bb | 68 ++++++++ .../lora/lora-network-server_2.5.35.bb | 48 ------ .../lora/lora-network-server_2.5.47.bb | 48 ++++++ .../lora/lora-packet-forwarder_4.0.17.bb | 178 --------------------- .../lora/lora-packet-forwarder_4.0.18.bb | 178 +++++++++++++++++++++ 6 files changed, 294 insertions(+), 294 deletions(-) delete mode 100644 recipes-connectivity/lora/lora-gateway_5.0.11.bb create mode 100644 recipes-connectivity/lora/lora-gateway_5.0.12.bb delete mode 100644 recipes-connectivity/lora/lora-network-server_2.5.35.bb create mode 100644 recipes-connectivity/lora/lora-network-server_2.5.47.bb delete mode 100644 recipes-connectivity/lora/lora-packet-forwarder_4.0.17.bb create mode 100644 recipes-connectivity/lora/lora-packet-forwarder_4.0.18.bb diff --git a/recipes-connectivity/lora/lora-gateway_5.0.11.bb b/recipes-connectivity/lora/lora-gateway_5.0.11.bb deleted file mode 100644 index 7baa9d2..0000000 --- a/recipes-connectivity/lora/lora-gateway_5.0.11.bb +++ /dev/null @@ -1,68 +0,0 @@ -DESCRIPTION = "LoRa Gateway library" -HOMEPAGE = "https://github.com/Lora-net/lora_gateway" -PRIORITY = "optional" -SECTION = "console/utils" -# Semtech license is a modified BSD-style license -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a2bdef95625509f821ba00460e3ae0eb" -DEPENDS = "gpsd" -RDEPENDS_${PN} = "libgps" - -PR = "r33" -SRCREV = "${PV}" - -SRC_URI = "git://git.multitech.net/lora_gateway_mtac_full;branch=master;protocol=git \ - file://library_4.0.cfg \ - file://ln-lora-spi-dev.sh \ - " - - -S = "${WORKDIR}/git" - -CFLAGS += "-Iinc -I. -idirafter ${STAGING_DIR_TARGET}/usr/include/gps" - -do_configure_append() { - # copy over custom library_4.0.cfg - cp ${WORKDIR}/library_4.0.cfg ${S}/libloragw/library.cfg -} - -do_compile() { - oe_runmake -} - -do_install() { - install -d ${D}${includedir}/lora - install -d ${D}${libdir}/lora - install -m 0644 libloragw/libloragw.a ${D}${libdir}/lora - install -m 0644 libloragw/library.cfg ${D}${libdir}/lora - install -m 0644 libloragw/inc/* ${D}${includedir}/lora - install -m 0644 libloragw/readme.md ${D}${libdir}/lora/lora-gw-readme.md - - install -d ${D}/opt/lora/ - - install -d ${D}/opt/lora/gateway-utils - install -m 0755 libloragw/test_* ${D}/opt/lora/gateway-utils/ - install -m 0755 util_pkt_logger/util_pkt_logger ${D}/opt/lora/gateway-utils/ - install -m 0755 util_spectral_scan/util_spectral_scan ${D}/opt/lora/gateway-utils/ - install -m 0755 util_spi_stress/util_spi_stress ${D}/opt/lora/gateway-utils/ - install -m 0755 util_tx_test/util_tx_test ${D}/opt/lora/gateway-utils/ - install -m 0755 util_tx_continuous/util_tx_continuous ${D}/opt/lora/gateway-utils/ - install -m 0755 util_lbt_test/util_lbt_test ${D}/opt/lora/gateway-utils/ -} - -do_install_append_mtcdt() { - install -m 0755 ${WORKDIR}/ln-lora-spi-dev.sh ${D}/opt/lora/ -} - -PACKAGES += "${PN}-utils ${PN}-utils-dbg" - -FILES_${PN} = "${libdir}/lora/lora-gw-readme.md" -FILES_${PN}-utils = "/opt/lora/gateway-utils/* /opt/lora/ln-lora-spi-dev.sh" -FILES_${PN}-utils-dbg = "/opt/lora/gateway-utils/.debug /opt/lora/ln-lora-spi-dev.sh" -FILES_${PN}-dev = "${includedir}/lora ${libdir}/lora/library.cfg" -FILES_${PN}-staticdev = "${libdir}/lora/libloragw.a" - -# disable this on purpose for dev purposes -do_rm_work() { - echo "skipping" -} diff --git a/recipes-connectivity/lora/lora-gateway_5.0.12.bb b/recipes-connectivity/lora/lora-gateway_5.0.12.bb new file mode 100644 index 0000000..90f3f51 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway_5.0.12.bb @@ -0,0 +1,68 @@ +DESCRIPTION = "LoRa Gateway library" +HOMEPAGE = "https://github.com/Lora-net/lora_gateway" +PRIORITY = "optional" +SECTION = "console/utils" +# Semtech license is a modified BSD-style license +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a2bdef95625509f821ba00460e3ae0eb" +DEPENDS = "gpsd" +RDEPENDS_${PN} = "libgps" + +PR = "r34" +SRCREV = "${PV}" + +SRC_URI = "git://git.multitech.net/lora_gateway_mtac_full;branch=master;protocol=git \ + file://library_4.0.cfg \ + file://ln-lora-spi-dev.sh \ + " + + +S = "${WORKDIR}/git" + +CFLAGS += "-Iinc -I. -idirafter ${STAGING_DIR_TARGET}/usr/include/gps" + +do_configure_append() { + # copy over custom library_4.0.cfg + cp ${WORKDIR}/library_4.0.cfg ${S}/libloragw/library.cfg +} + +do_compile() { + oe_runmake +} + +do_install() { + install -d ${D}${includedir}/lora + install -d ${D}${libdir}/lora + install -m 0644 libloragw/libloragw.a ${D}${libdir}/lora + install -m 0644 libloragw/library.cfg ${D}${libdir}/lora + install -m 0644 libloragw/inc/* ${D}${includedir}/lora + install -m 0644 libloragw/readme.md ${D}${libdir}/lora/lora-gw-readme.md + + install -d ${D}/opt/lora/ + + install -d ${D}/opt/lora/gateway-utils + install -m 0755 libloragw/test_* ${D}/opt/lora/gateway-utils/ + install -m 0755 util_pkt_logger/util_pkt_logger ${D}/opt/lora/gateway-utils/ + install -m 0755 util_spectral_scan/util_spectral_scan ${D}/opt/lora/gateway-utils/ + install -m 0755 util_spi_stress/util_spi_stress ${D}/opt/lora/gateway-utils/ + install -m 0755 util_tx_test/util_tx_test ${D}/opt/lora/gateway-utils/ + install -m 0755 util_tx_continuous/util_tx_continuous ${D}/opt/lora/gateway-utils/ + install -m 0755 util_lbt_test/util_lbt_test ${D}/opt/lora/gateway-utils/ +} + +do_install_append_mtcdt() { + install -m 0755 ${WORKDIR}/ln-lora-spi-dev.sh ${D}/opt/lora/ +} + +PACKAGES += "${PN}-utils ${PN}-utils-dbg" + +FILES_${PN} = "${libdir}/lora/lora-gw-readme.md" +FILES_${PN}-utils = "/opt/lora/gateway-utils/* /opt/lora/ln-lora-spi-dev.sh" +FILES_${PN}-utils-dbg = "/opt/lora/gateway-utils/.debug /opt/lora/ln-lora-spi-dev.sh" +FILES_${PN}-dev = "${includedir}/lora ${libdir}/lora/library.cfg" +FILES_${PN}-staticdev = "${libdir}/lora/libloragw.a" + +# disable this on purpose for dev purposes +do_rm_work() { + echo "skipping" +} diff --git a/recipes-connectivity/lora/lora-network-server_2.5.35.bb b/recipes-connectivity/lora/lora-network-server_2.5.35.bb deleted file mode 100644 index 97a9852..0000000 --- a/recipes-connectivity/lora/lora-network-server_2.5.35.bb +++ /dev/null @@ -1,48 +0,0 @@ -DESCRIPTION = "MultiTech LoRa Network Server" -PRIORITY = "optional" -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" -PR = "r0" -CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server" - -SRC_URI = "https://multitech.net/downloads/lora-network-server_${PV}.tar.gz \ - file://lora-network-server.init \ - file://lora-network-server.default \ - " - -SRC_URI[md5sum] = "94044e85f244776fc3e79afece3f8205" -SRC_URI[sha256sum] = "d905d80f8375c81389a939ec78770c27cc979554bc2618f1ad162c94b3d8d3ce" - -# binaries are already stripped, so suppress warning -INSANE_SKIP_${PN} = "already-stripped" - -S = "${WORKDIR}" - -LORA_DIR = "/opt/lora" - -do_compile() { -} - -inherit update-rc.d - -INITSCRIPT_NAME = "lora-network-server" -INITSCRIPT_PARAMS = "defaults 80 30" - -do_install() { - install -d ${D}${LORA_DIR} - install -m 0755 lora-network-server-arm926ejste-mlinux-6 ${D}${LORA_DIR}/lora-network-server - install -m 0755 lora-v21-keygen-arm926ejste-mlinux-6 ${D}${LORA_DIR}/lora-v21-keygen - install -m 0644 config/lora-network-server.conf.sample ${D}${LORA_DIR}/lora-network-server.conf.sample - install -m 0644 config/lora-network-server.conf.full ${D}${LORA_DIR}/lora-network-server.conf.full - - install -d ${D}${sysconfdir}/default - install -m 0644 ${WORKDIR}/lora-network-server.default ${D}${sysconfdir}/default/lora-network-server - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/lora-network-server.init ${D}${sysconfdir}/init.d/lora-network-server -} - -FILES_${PN} += "${LORA_DIR}" -FILES_${PN}-dbg += "${LORA_DIR}/.debug" diff --git a/recipes-connectivity/lora/lora-network-server_2.5.47.bb b/recipes-connectivity/lora/lora-network-server_2.5.47.bb new file mode 100644 index 0000000..9944cbf --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server_2.5.47.bb @@ -0,0 +1,48 @@ +DESCRIPTION = "MultiTech LoRa Network Server" +PRIORITY = "optional" +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" +PR = "r0" +CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server" + +SRC_URI = "https://multitech.net/downloads/lora-network-server_${PV}.tar.gz \ + file://lora-network-server.init \ + file://lora-network-server.default \ + " + +SRC_URI[md5sum] = "b6d9f84be49bb12971a75db13a31404c" +SRC_URI[sha256sum] = "ec53129b04d8ed5da97c8a710491e038b4e96d1470d8b9d38baf65e37f266784" + +# binaries are already stripped, so suppress warning +INSANE_SKIP_${PN} = "already-stripped" + +S = "${WORKDIR}" + +LORA_DIR = "/opt/lora" + +do_compile() { +} + +inherit update-rc.d + +INITSCRIPT_NAME = "lora-network-server" +INITSCRIPT_PARAMS = "defaults 80 30" + +do_install() { + install -d ${D}${LORA_DIR} + install -m 0755 lora-network-server-arm926ejste-mlinux-6 ${D}${LORA_DIR}/lora-network-server + install -m 0755 lora-v21-keygen-arm926ejste-mlinux-6 ${D}${LORA_DIR}/lora-v21-keygen + install -m 0644 config/lora-network-server.conf.sample ${D}${LORA_DIR}/lora-network-server.conf.sample + install -m 0644 config/lora-network-server.conf.full ${D}${LORA_DIR}/lora-network-server.conf.full + + install -d ${D}${sysconfdir}/default + install -m 0644 ${WORKDIR}/lora-network-server.default ${D}${sysconfdir}/default/lora-network-server + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/lora-network-server.init ${D}${sysconfdir}/init.d/lora-network-server +} + +FILES_${PN} += "${LORA_DIR}" +FILES_${PN}-dbg += "${LORA_DIR}/.debug" diff --git a/recipes-connectivity/lora/lora-packet-forwarder_4.0.17.bb b/recipes-connectivity/lora/lora-packet-forwarder_4.0.17.bb deleted file mode 100644 index cc974ec..0000000 --- a/recipes-connectivity/lora/lora-packet-forwarder_4.0.17.bb +++ /dev/null @@ -1,178 +0,0 @@ -DESCRIPTION = "LoRa Packet Forwarder" -HOMEPAGE = "https://github.com/Lora-net/packet_forwarder" -PRIORITY = "optional" -SECTION = "console/utils" -# Semtech license is a modified BSD-style license -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://LICENSE;md5=22af7693d7b76ef0fc76161c4be76c45" -DEPENDS = "lora-gateway logrotate lora-logging gpsd" -RDEPENDS_${PN} += "bash" -FILESEXTRAPATHS_append_mtcdt3hs := ":${THISDIR}/lora-packet-forwarder/mtcdt3" -PR = "r31" -SRCREV = "${PV}" -PACKAGE_ARCH = "${MACHINE_ARCH}" - -SRC_URI = "git://git.multitech.net/packet_forwarder_mtac_full;branch=master;protocol=git \ - file://README.md \ - file://lora-packet-forwarder.init \ - file://lora-packet-forwarder.default \ - file://global_conf.json.3.0.0.PCB_E336.EU868.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic \ - file://global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic \ - file://global_conf.json.MTCAP2-LORA-1.5.AS923 \ - file://global_conf.json.MTCAP2-LORA-1.5.AS923-LBT \ - file://global_conf.json.MTCAP2-LORA-1.5.AU915 \ - file://global_conf.json.MTCAP2-LORA-1.5.EU868 \ - file://global_conf.json.MTCAP2-LORA-1.5.IN865 \ - file://global_conf.json.MTCAP2-LORA-1.5.KR920-LBT \ - file://global_conf.json.MTCAP2-LORA-1.5.RU864 \ - file://global_conf.json.MTCAP2-LORA-1.5.US915 \ - file://temp_lut.json.MTCAP2.US915 \ - file://temp_lut.json.MTCAP2.EU868 \ - file://local_conf.json \ -" - - -S = "${WORKDIR}/git" -B = "${S}" -TARGET_CC_ARCH += "${LDFLAGS}" - - -LORA_DIR = "/opt/lora" - -export LGW_PATH = "${STAGING_LIBDIR}/lora" -export LGW_INC = "${STAGING_INCDIR}/lora" - -CFLAGS += "-I${LGW_INC} -Iinc -I. -std=gnu11" - -do_compile() { - oe_runmake -} - -do_install() { - install -d ${D}${LORA_DIR} - install -m 755 lora_pkt_fwd/lora_pkt_fwd ${D}${LORA_DIR}/ - install -m 755 ${WORKDIR}/local_conf.json ${D}${LORA_DIR}/ - - install -d ${D}${LORA_DIR}/forwarder-utils - install -m 755 util_sink/util_sink ${D}${LORA_DIR}/forwarder-utils/ - install -m 755 util_ack/util_ack ${D}${LORA_DIR}/forwarder-utils/ - install -m 755 util_tx_test/util_tx_test ${D}${LORA_DIR}/forwarder-utils/ - install -m 755 ${WORKDIR}/README.md ${D}${LORA_DIR}/ - - install -d ${D}${sysconfdir}/default - install -m 0644 ${WORKDIR}/lora-packet-forwarder.default ${D}${sysconfdir}/default/lora-packet-forwarder - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/lora-packet-forwarder.init ${D}${sysconfdir}/init.d/lora-packet-forwarder -} - -do_install_append_mtcdt() { - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 -} - -do_install_append_mtcap() { - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.RU864 - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.AU915 - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.AS923 - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.AS923-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.KR920-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.IN865 - - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.EU868 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.EU868 - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.RU864 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.RU864 - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.US915 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.US915 - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.AU915 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.AU915 - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.AS923 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.AS923 - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.AS923-LBT ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.AS923-LBT - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.KR920-LBT ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.KR920-LBT - install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.IN865 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.IN865 - - install -m 644 ${WORKDIR}/temp_lut.json.MTCAP2.US915 ${D}${LORA_DIR}/ - install -m 644 ${WORKDIR}/temp_lut.json.MTCAP2.EU868 ${D}${LORA_DIR}/ -} - -do_install_append_mtcdt3() { - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 -} - -do_install_append_mtcdt3hs() { - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 -} - -do_install_append_mtcpmhs() { - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT - install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 -} - -FILES_${PN} += "${LORA_DIR}" -FILES_${PN}-dbg += "${LORA_DIR}/.debug ${LORA_DIR}/forwarder-utils/.debug" - -# disable this on purpose for dev purposes -do_rm_work() { - echo "skipping" -} diff --git a/recipes-connectivity/lora/lora-packet-forwarder_4.0.18.bb b/recipes-connectivity/lora/lora-packet-forwarder_4.0.18.bb new file mode 100644 index 0000000..3eaa70a --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder_4.0.18.bb @@ -0,0 +1,178 @@ +DESCRIPTION = "LoRa Packet Forwarder" +HOMEPAGE = "https://github.com/Lora-net/packet_forwarder" +PRIORITY = "optional" +SECTION = "console/utils" +# Semtech license is a modified BSD-style license +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENSE;md5=22af7693d7b76ef0fc76161c4be76c45" +DEPENDS = "lora-gateway logrotate lora-logging gpsd" +RDEPENDS_${PN} += "bash" +FILESEXTRAPATHS_append_mtcdt3hs := ":${THISDIR}/lora-packet-forwarder/mtcdt3" +PR = "r32" +SRCREV = "${PV}" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +SRC_URI = "git://git.multitech.net/packet_forwarder_mtac_full;branch=master;protocol=git \ + file://README.md \ + file://lora-packet-forwarder.init \ + file://lora-packet-forwarder.default \ + file://global_conf.json.3.0.0.PCB_E336.EU868.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic \ + file://global_conf.json.MTCAP2-LORA-1.5.AS923 \ + file://global_conf.json.MTCAP2-LORA-1.5.AS923-LBT \ + file://global_conf.json.MTCAP2-LORA-1.5.AU915 \ + file://global_conf.json.MTCAP2-LORA-1.5.EU868 \ + file://global_conf.json.MTCAP2-LORA-1.5.IN865 \ + file://global_conf.json.MTCAP2-LORA-1.5.KR920-LBT \ + file://global_conf.json.MTCAP2-LORA-1.5.RU864 \ + file://global_conf.json.MTCAP2-LORA-1.5.US915 \ + file://temp_lut.json.MTCAP2.US915 \ + file://temp_lut.json.MTCAP2.EU868 \ + file://local_conf.json \ +" + + +S = "${WORKDIR}/git" +B = "${S}" +TARGET_CC_ARCH += "${LDFLAGS}" + + +LORA_DIR = "/opt/lora" + +export LGW_PATH = "${STAGING_LIBDIR}/lora" +export LGW_INC = "${STAGING_INCDIR}/lora" + +CFLAGS += "-I${LGW_INC} -Iinc -I. -std=gnu11" + +do_compile() { + oe_runmake +} + +do_install() { + install -d ${D}${LORA_DIR} + install -m 755 lora_pkt_fwd/lora_pkt_fwd ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/local_conf.json ${D}${LORA_DIR}/ + + install -d ${D}${LORA_DIR}/forwarder-utils + install -m 755 util_sink/util_sink ${D}${LORA_DIR}/forwarder-utils/ + install -m 755 util_ack/util_ack ${D}${LORA_DIR}/forwarder-utils/ + install -m 755 util_tx_test/util_tx_test ${D}${LORA_DIR}/forwarder-utils/ + install -m 755 ${WORKDIR}/README.md ${D}${LORA_DIR}/ + + install -d ${D}${sysconfdir}/default + install -m 0644 ${WORKDIR}/lora-packet-forwarder.default ${D}${sysconfdir}/default/lora-packet-forwarder + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/lora-packet-forwarder.init ${D}${sysconfdir}/init.d/lora-packet-forwarder +} + +do_install_append_mtcdt() { + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 +} + +do_install_append_mtcap() { + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.RU864 + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.AU915 + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.AS923 + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.AS923-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.KR920-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.IN865 + + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.EU868 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.EU868 + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.RU864 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.RU864 + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.US915 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.US915 + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.AU915 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.AU915 + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.AS923 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.AS923 + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.AS923-LBT ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.AS923-LBT + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.KR920-LBT ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.KR920-LBT + install -m 644 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.IN865 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.IN865 + + install -m 644 ${WORKDIR}/temp_lut.json.MTCAP2.US915 ${D}${LORA_DIR}/ + install -m 644 ${WORKDIR}/temp_lut.json.MTCAP2.EU868 ${D}${LORA_DIR}/ +} + +do_install_append_mtcdt3() { + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 +} + +do_install_append_mtcdt3hs() { + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 +} + +do_install_append_mtcpmhs() { + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT + install -m 644 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 +} + +FILES_${PN} += "${LORA_DIR}" +FILES_${PN}-dbg += "${LORA_DIR}/.debug ${LORA_DIR}/forwarder-utils/.debug" + +# disable this on purpose for dev purposes +do_rm_work() { + echo "skipping" +} -- cgit v1.2.3 From 205d9f31d962931bd33f03f78790fd60b8428b13 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 29 Apr 2022 14:43:42 -0500 Subject: Fix python issues in mLinux --- recipes-connectivity/bluez/bluez5/bt-pan/bt-pan | 2 +- recipes-connectivity/bluez/bluez5/bt-pan/init | 2 +- recipes-connectivity/bluez/bluez5/rfcomm/init | 8 ++-- recipes-connectivity/bluez/bluez5/rfcomm/rfcomm.py | 29 ++++++------- recipes-connectivity/bluez/bluez5_%.bbappend | 4 +- .../bluez/python-gatt-server_1.0.bb | 24 ----------- .../bluez/python3-gatt-server_1.0.bb | 24 +++++++++++ recipes-connectivity/bluez/python3-pygattlib.bb | 38 ++++++++++++++++ ...Fixed-build-with-Python3.8-and-Boost-1.72.patch | 50 ++++++++++++++++++++++ recipes-devtools/python/python3_%.bbappend | 17 ++++++++ recipes-navigation/gpsd/gpsd_3.20.bb | 4 +- 11 files changed, 153 insertions(+), 49 deletions(-) delete mode 100644 recipes-connectivity/bluez/python-gatt-server_1.0.bb create mode 100644 recipes-connectivity/bluez/python3-gatt-server_1.0.bb create mode 100644 recipes-connectivity/bluez/python3-pygattlib.bb create mode 100644 recipes-connectivity/bluez/python3-pygattlib/0001-Fixed-build-with-Python3.8-and-Boost-1.72.patch create mode 100644 recipes-devtools/python/python3_%.bbappend diff --git a/recipes-connectivity/bluez/bluez5/bt-pan/bt-pan b/recipes-connectivity/bluez/bluez5/bt-pan/bt-pan index f142bb1..8d01bdf 100755 --- a/recipes-connectivity/bluez/bluez5/bt-pan/bt-pan +++ b/recipes-connectivity/bluez/bluez5/bt-pan/bt-pan @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python from __future__ import absolute_import, print_function import os, sys, time, types, subprocess, signal diff --git a/recipes-connectivity/bluez/bluez5/bt-pan/init b/recipes-connectivity/bluez/bluez5/bt-pan/init index 2d3d70a..f8ac23f 100755 --- a/recipes-connectivity/bluez/bluez5/bt-pan/init +++ b/recipes-connectivity/bluez/bluez5/bt-pan/init @@ -2,7 +2,7 @@ NAME=bt-pan SERVER=/usr/libexec/bluetooth/${NAME} -PYTHON=$(readlink -f /usr/bin/python2) +PYTHON=$(readlink -f /usr/bin/python) BRIDGE=pan0 DNAME="${NAME}.${BRIDGE}" PIDFILE="/run/${DNAME}.pid" diff --git a/recipes-connectivity/bluez/bluez5/rfcomm/init b/recipes-connectivity/bluez/bluez5/rfcomm/init index 69455d8..08366ea 100755 --- a/recipes-connectivity/bluez/bluez5/rfcomm/init +++ b/recipes-connectivity/bluez/bluez5/rfcomm/init @@ -2,7 +2,7 @@ NAME=rfcomm SERVER=/usr/libexec/bluetooth/${NAME} -PYTHON=$(readlink -f /usr/bin/python2) +PYTHON=$(readlink -f /usr/bin/python) PIDFILE="/run/${NAME}.pid" ENABLED=yes @@ -16,12 +16,12 @@ fi case $1 in start) echo "Starting ${NAME}" - echo /usr/sbin/start-stop-daemon -S -p ${PIDFILE} -x ${PYTHON} -b -- ${SERVER} ${RFCOMMOPTS} - /usr/sbin/start-stop-daemon -S -p ${PIDFILE} -x ${PYTHON} -b -- ${SERVER} ${RFCOMMOPTS} + echo /usr/sbin/start-stop-daemon -S -p ${PIDFILE} -a ${SERVER} -n ${NAME} -b -- ${RFCOMMOPTS} + /usr/sbin/start-stop-daemon -S -p ${PIDFILE} -a ${SERVER} -n ${NAME} -b -- ${RFCOMMOPTS} ;; stop) - /usr/sbin/start-stop-daemon -K -p ${PIDFILE} -x ${PYTHON} + /usr/bin/pkill --ns $(cat "$PIDFILE") -f " ${SERVER} " echo "Stopping ${DNAME}" ;; diff --git a/recipes-connectivity/bluez/bluez5/rfcomm/rfcomm.py b/recipes-connectivity/bluez/bluez5/rfcomm/rfcomm.py index e8f2554..cf8fec4 100644 --- a/recipes-connectivity/bluez/bluez5/rfcomm/rfcomm.py +++ b/recipes-connectivity/bluez/bluez5/rfcomm/rfcomm.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python2 -import thread +#!/usr/bin/env python import os import dbus import dbus.service @@ -16,9 +15,7 @@ import grp import stat import atexit import re -import mmap import subprocess -import threading import struct import fcntl import termios @@ -298,9 +295,9 @@ class Profile(dbus.service.Object): # Bluetooth address portion of the path address = os.path.basename(self.path) - numaddr = address[address.find("_")+1:] + numaddr = address[address.find("_")+1:] # Replace _ with : - Name = bluetooth.lookup_name(numaddr.replace("_",":")) + Name = bluetooth.lookup_name(numaddr.replace("_",":")) print('NewConnection(%s, %s, %s:%d)' % (path,Name,type(fd).__name__,self.fd)) lg.info('NewConnection(%s, %s, %s:%d)' % (path,Name,type(fd).__name__,self.fd)) @@ -316,18 +313,18 @@ class Profile(dbus.service.Object): lg.debug('pseudoterminal major and minor: (%d,%d)' % (os.major(slavestat.st_rdev),self.minor)) if not os.path.isdir(RFCOMMDIR): lg.debug('Before mkdir: RFCOMMDIR %s' % (RFCOMMDIR)) - os.mkdir(RFCOMMDIR,0755) + os.mkdir(RFCOMMDIR,0o755) lg.debug('Address %s' % (address)) self.linkPath = RFCOMMDIR + '/' + address + '_' + Name + '_pts' + str(self.minor) - self.slavePath = SLAVEDIR + '/' + str(self.minor) + self.slavePath = SLAVEDIR + '/' + str(self.minor) lg.debug('termPath %s' % (self.linkPath)) self.removeLink(self.notexiting) # linkPath was removed lg.debug('os.symlink(%s,%s)' % (self.slavePath,self.linkPath)) - old = os.umask(002) + old = os.umask(0o002) lg.debug('past umask') try: os.symlink(self.slavePath,self.linkPath) @@ -471,7 +468,7 @@ class Profile(dbus.service.Object): try: os.write(self.fd,data) except Exception as e: - print '%s' % (e) + print('%s' % e) lg.error('%s' % (e)) self.RequestDisconnection(self.path) return True @@ -563,12 +560,12 @@ if __name__ == '__main__': if opts.pseudoterminal and opts.loopback: msg = 'Cannot have both pseudoterminal and loopback option' - print msg + print(msg) lg.error(msg) exit(1) if not opts.pseudoterminal and not opts.loopback and not opts.login: doterm = True - print "main: doterm is %s" % (str(doterm)) + print("main: doterm is %s" % (str(doterm))) if opts.pseudoterminal or opts.login: needpseudot = True @@ -594,7 +591,7 @@ if __name__ == '__main__': rpipe,wpipe = os.pipe() loginProcess = logins() Profile.w = wpipe - lg.debug('Call threading next') + lg.debug('Call StartLogin threading next') try: StartLoginThread = threading.Thread(target=loginProcess.StartLogin,args=[rpipe,mainloop]) except Exception as e: @@ -621,10 +618,10 @@ if __name__ == '__main__': try: manager.RegisterProfile(profile_path, opts.uuid, SPP_opts) except dbus.exceptions.DBusException as inst: - print 'dbus exception:',inst._dbus_error_name + print('dbus exception:',inst._dbus_error_name) lg.error('dbus exception: %s',inst._dbus_error_name) if inst._dbus_error_name == 'org.freedesktop.DBus.Error.AccessDenied': - print 'Try running as root' + print('Try running as root') exit(1) lg.debug('Completed Register Profile...') @@ -636,7 +633,7 @@ if __name__ == '__main__': pass except Exception as e: lg.error('mainloop exception: %s' % (e)) - print '\nSerial Port Profile: ERROR Goodbye' + print('\nSerial Port Profile: ERROR Goodbye') lg.error('Serial Port Profile: ERROR Goodbye') data = struct.pack('i',-1) os.write(wpipe,data) diff --git a/recipes-connectivity/bluez/bluez5_%.bbappend b/recipes-connectivity/bluez/bluez5_%.bbappend index c484558..191ff00 100644 --- a/recipes-connectivity/bluez/bluez5_%.bbappend +++ b/recipes-connectivity/bluez/bluez5_%.bbappend @@ -6,8 +6,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" EXTRA_OECONF += "--enable-deprecated --enable-experimental" -RDEPENDS_${PN}-pand += "bash python-dbus python-logging python-syslog python-subprocess python-argparse" -RDEPENDS_${PN}-rfcomm += "bash python-pygobject python-syslog python-logging python-dbus python-pybluez" +RDEPENDS_${PN}-pand += "bash python3-dbus python3-logging python3-syslog" +RDEPENDS_${PN}-rfcomm += "bash python3-pygobject python3-syslog python3-logging python3-dbus python3-pybluez python3-mmap" RDEPENDS_bluez5 += "bash" SRC_URI += "\ diff --git a/recipes-connectivity/bluez/python-gatt-server_1.0.bb b/recipes-connectivity/bluez/python-gatt-server_1.0.bb deleted file mode 100644 index d68d9af..0000000 --- a/recipes-connectivity/bluez/python-gatt-server_1.0.bb +++ /dev/null @@ -1,24 +0,0 @@ -inherit allarch -HOMEPAGE = "https://github.com/Jumperr-labs/python-gatt-server" -SRCREV = "a39ef9773e9ba845f4303b1dfd2efddf24b02238" -PR = "r0" - -S = "${WORKDIR}/git" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c53d04442d1a229d62549856b7ec456a" - -SRC_URI = "git://github.com/Jumperr-labs/python-gatt-server.git;protocol=https" - -RDEPENDS_${PN} += "python-dbus python-pygobject" - -DBTEXEC = "${libexecdir}/bluetooth/" -DEST = "${D}${DBTEXEC}" - -FILES_${PN} = "${DBTEXEC}" - - -do_install_append() { - install -d ${DEST}/${PN} - install -m 0755 ${S}/*.py ${DEST}/${PN} -} diff --git a/recipes-connectivity/bluez/python3-gatt-server_1.0.bb b/recipes-connectivity/bluez/python3-gatt-server_1.0.bb new file mode 100644 index 0000000..712ad3e --- /dev/null +++ b/recipes-connectivity/bluez/python3-gatt-server_1.0.bb @@ -0,0 +1,24 @@ +inherit allarch +HOMEPAGE = "https://github.com/Jumperr-labs/python-gatt-server" +SRCREV = "a39ef9773e9ba845f4303b1dfd2efddf24b02238" +PR = "r0" + +S = "${WORKDIR}/git" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c53d04442d1a229d62549856b7ec456a" + +SRC_URI = "git://github.com/Jumperr-labs/python-gatt-server.git;protocol=https" + +RDEPENDS_${PN} += "python3-dbus python3-pygobject" + +DBTEXEC = "${libexecdir}/bluetooth/" +DEST = "${D}${DBTEXEC}" + +FILES_${PN} = "${DBTEXEC}" + + +do_install_append() { + install -d ${DEST}/${PN} + install -m 0755 ${S}/*.py ${DEST}/${PN} +} diff --git a/recipes-connectivity/bluez/python3-pygattlib.bb b/recipes-connectivity/bluez/python3-pygattlib.bb new file mode 100644 index 0000000..0a5aaee --- /dev/null +++ b/recipes-connectivity/bluez/python3-pygattlib.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "Python BLE GATT Library" +HOMEPAGE = "https://bitbucket.org/OscarAcena/pygattlib" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +DEPENDS = "boost bluez5 glib-2.0" + +inherit setuptools3 + +PR = "r3" +SRCREV = "f319522a2e719a9a05220b42ac16eb360be3fe1c" +SRC_URI = "git://git@gitlab.multitech.net/aep/pygattlib.git;protocol=ssh;branch=master \ + file://0001-Fixed-build-with-Python3.8-and-Boost-1.72.patch \ +" + +SRC_URI[md5sum] = "014bf03c4812f74b6c9e86e1e895bb82" +SRC_URI[sha256sum] = "f759070d59597db1f8d10991497f133eddb9d7f990d15571031d93a397a772e2" + +S = "${WORKDIR}/git" + +inherit autotools-brokensep pkgconfig + +# necessary to let the call for python3-config succeed +export BUILD_SYS +export HOST_SYS +export STAGING_INCDIR +export STAGING_LIBDIR + +do_compile() { + oe_runmake +} + +#TODO +# QA Issue: File /usr/lib/python3.8/lib-dynload/gattlib.so in package pygattlib doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags] +do_install() { + install -d ${D}/${libdir}/python3.8/lib-dynload + install -m 0755 ${WORKDIR}/git/src/gattlib.so ${D}/${libdir}/python3.8/lib-dynload/gattlib.so +} diff --git a/recipes-connectivity/bluez/python3-pygattlib/0001-Fixed-build-with-Python3.8-and-Boost-1.72.patch b/recipes-connectivity/bluez/python3-pygattlib/0001-Fixed-build-with-Python3.8-and-Boost-1.72.patch new file mode 100644 index 0000000..7ea253f --- /dev/null +++ b/recipes-connectivity/bluez/python3-pygattlib/0001-Fixed-build-with-Python3.8-and-Boost-1.72.patch @@ -0,0 +1,50 @@ +From 085eb27d2931ffa99a38043ef630107aca1017c9 Mon Sep 17 00:00:00 2001 +From: Mykola Salomatin +Date: Thu, 12 Aug 2021 17:31:15 +0300 +Subject: [PATCH] Fixed build with Python3.8 and Boost 1.72 + +--- + setup.py | 6 ++---- + src/Makefile | 9 ++------- + 2 files changed, 4 insertions(+), 11 deletions(-) + +diff --git a/setup.py b/setup.py +index 3a9f534..19246cf 100755 +--- a/setup.py ++++ b/setup.py +@@ -18,10 +18,8 @@ if sys.platform.startswith('linux'): + glib_libs = glib_libs.strip().split("-l") + glib_libs = [x.strip() for x in glib_libs if x] + +- if sys.version_info.major == 3: +- boost_libs = ["boost_python-py34"] +- else: +- boost_libs = ["boost_python"] ++ boost_libs = ["boost_python38"] ++ + extension_modules = [ + Extension( + 'gattlib', +diff --git a/src/Makefile b/src/Makefile +index 4c742d2..325ee37 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -7,13 +7,8 @@ TARGETS = gattlib.so + OBJECTS = att.o crypto.o uuid.o gatt.o gattrib.o btio.o log.o utils.o \ + gattservices.o gattlib.o bindings.o beacon.o + +-ifeq ($(PYTHON_VER),3) +- PYTHON_CONFIG = python3-config +- BOOST_PYTHON = boost_python-py34 +-else +- PYTHON_CONFIG = python-config +- BOOST_PYTHON = boost_python +-endif ++PYTHON_CONFIG = python3-config ++BOOST_PYTHON = boost_python38 + + CFLAGS += -ggdb -fPIC -Wall $$($(PYTHON_CONFIG) --includes) \ + -Ibluez $$(pkg-config --cflags glib-2.0) +-- +2.25.1 + diff --git a/recipes-devtools/python/python3_%.bbappend b/recipes-devtools/python/python3_%.bbappend new file mode 100644 index 0000000..70b4561 --- /dev/null +++ b/recipes-devtools/python/python3_%.bbappend @@ -0,0 +1,17 @@ +# Make python3 the default +# Remove this stuff if there is ever a python4. + +# Debian and Ubuntu have this (prior levels linked to python2) +PACKAGES_append = " python-is-python3" +ALLOW_EMPTY_python-is-python3 = "1" +pkg_postinst_python-is-python3_append() { + ln -sf python3 $D/usr/bin/python +} + +pkg_prerm_python-is-python3_append() { + if [ -L "$D/usr/bin/python" ] ; then + if [ "$(basename $(readlink $D/usr/bin/python))" == "python3" ] ; then + rm $D/usr/bin/python + fi + fi +} diff --git a/recipes-navigation/gpsd/gpsd_3.20.bb b/recipes-navigation/gpsd/gpsd_3.20.bb index 9afe0fe..cc8bd27 100644 --- a/recipes-navigation/gpsd/gpsd_3.20.bb +++ b/recipes-navigation/gpsd/gpsd_3.20.bb @@ -148,6 +148,7 @@ do_install_append() { #support for python install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps + python3 -m compileall ${D}/${PYTHON_SITEPACKAGES_DIR}/gps #support for systemd install -d ${D}${systemd_unitdir}/system/ @@ -184,7 +185,7 @@ pkg_postrm_${PN}-conf() { } -PACKAGES =+ "libgps libgpsd gpsd-udev gpsd-conf gpsd-gpsctl gpspipe gps-utils python3-pygps-dbg python3-pygps" +PACKAGES =+ "libgps libgpsd gpsd-udev gpsd-conf gpsd-gpsctl gpspipe gps-utils python3-pygps-pyc python3-pygps-dbg python3-pygps" # PACKAGES =+ "${PN} ${PN}-dbg ${PN}-dev" # File does not exist: ${libdir}/libQgpsmm.prl @@ -196,6 +197,7 @@ FILES_${PN} += "${sbindir}/gpsd_*" FILES_${PN}-doc += "${docdir}" FILES_${PN}-conf = "${sysconfdir}/default ${sysconfdir}/init.d" +FILES_python3-pygps-pyc = "${PYTHON_SITEPACKAGES_DIR}/gps/__pycache__" RDEPENDS_${PN}-conf = "gpsd-gpsctl bash" -- cgit v1.2.3 From 0ab21e40fa70c6ffc0d3057d4b87b4365d004c89 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 29 Apr 2022 17:04:44 -0500 Subject: python3-pygattlib is not yet ready --- recipes-connectivity/bluez/python3-pygattlib.bb | 38 ---------------------- .../bluez/python3-pygattlib.unused | 38 ++++++++++++++++++++++ 2 files changed, 38 insertions(+), 38 deletions(-) delete mode 100644 recipes-connectivity/bluez/python3-pygattlib.bb create mode 100644 recipes-connectivity/bluez/python3-pygattlib.unused diff --git a/recipes-connectivity/bluez/python3-pygattlib.bb b/recipes-connectivity/bluez/python3-pygattlib.bb deleted file mode 100644 index 0a5aaee..0000000 --- a/recipes-connectivity/bluez/python3-pygattlib.bb +++ /dev/null @@ -1,38 +0,0 @@ -DESCRIPTION = "Python BLE GATT Library" -HOMEPAGE = "https://bitbucket.org/OscarAcena/pygattlib" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" - -DEPENDS = "boost bluez5 glib-2.0" - -inherit setuptools3 - -PR = "r3" -SRCREV = "f319522a2e719a9a05220b42ac16eb360be3fe1c" -SRC_URI = "git://git@gitlab.multitech.net/aep/pygattlib.git;protocol=ssh;branch=master \ - file://0001-Fixed-build-with-Python3.8-and-Boost-1.72.patch \ -" - -SRC_URI[md5sum] = "014bf03c4812f74b6c9e86e1e895bb82" -SRC_URI[sha256sum] = "f759070d59597db1f8d10991497f133eddb9d7f990d15571031d93a397a772e2" - -S = "${WORKDIR}/git" - -inherit autotools-brokensep pkgconfig - -# necessary to let the call for python3-config succeed -export BUILD_SYS -export HOST_SYS -export STAGING_INCDIR -export STAGING_LIBDIR - -do_compile() { - oe_runmake -} - -#TODO -# QA Issue: File /usr/lib/python3.8/lib-dynload/gattlib.so in package pygattlib doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags] -do_install() { - install -d ${D}/${libdir}/python3.8/lib-dynload - install -m 0755 ${WORKDIR}/git/src/gattlib.so ${D}/${libdir}/python3.8/lib-dynload/gattlib.so -} diff --git a/recipes-connectivity/bluez/python3-pygattlib.unused b/recipes-connectivity/bluez/python3-pygattlib.unused new file mode 100644 index 0000000..0a5aaee --- /dev/null +++ b/recipes-connectivity/bluez/python3-pygattlib.unused @@ -0,0 +1,38 @@ +DESCRIPTION = "Python BLE GATT Library" +HOMEPAGE = "https://bitbucket.org/OscarAcena/pygattlib" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +DEPENDS = "boost bluez5 glib-2.0" + +inherit setuptools3 + +PR = "r3" +SRCREV = "f319522a2e719a9a05220b42ac16eb360be3fe1c" +SRC_URI = "git://git@gitlab.multitech.net/aep/pygattlib.git;protocol=ssh;branch=master \ + file://0001-Fixed-build-with-Python3.8-and-Boost-1.72.patch \ +" + +SRC_URI[md5sum] = "014bf03c4812f74b6c9e86e1e895bb82" +SRC_URI[sha256sum] = "f759070d59597db1f8d10991497f133eddb9d7f990d15571031d93a397a772e2" + +S = "${WORKDIR}/git" + +inherit autotools-brokensep pkgconfig + +# necessary to let the call for python3-config succeed +export BUILD_SYS +export HOST_SYS +export STAGING_INCDIR +export STAGING_LIBDIR + +do_compile() { + oe_runmake +} + +#TODO +# QA Issue: File /usr/lib/python3.8/lib-dynload/gattlib.so in package pygattlib doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags] +do_install() { + install -d ${D}/${libdir}/python3.8/lib-dynload + install -m 0755 ${WORKDIR}/git/src/gattlib.so ${D}/${libdir}/python3.8/lib-dynload/gattlib.so +} -- cgit v1.2.3 From 91f8408a28e64da6608112c091864a1b103c862f Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 2 May 2022 11:28:42 -0500 Subject: Fix bt-pan tabbing for Python 3 --- recipes-connectivity/bluez/bluez5/bt-pan/bt-pan | 400 ++++++++++++------------ 1 file changed, 200 insertions(+), 200 deletions(-) diff --git a/recipes-connectivity/bluez/bluez5/bt-pan/bt-pan b/recipes-connectivity/bluez/bluez5/bt-pan/bt-pan index 8d01bdf..07fa125 100755 --- a/recipes-connectivity/bluez/bluez5/bt-pan/bt-pan +++ b/recipes-connectivity/bluez/bluez5/bt-pan/bt-pan @@ -134,17 +134,17 @@ global lg class BTError(Exception): pass def get_bus(): - bus = getattr(get_bus, 'cached_obj', None) - if not bus: bus = get_bus.cached_obj = dbus.SystemBus() - return bus + bus = getattr(get_bus, 'cached_obj', None) + if not bus: bus = get_bus.cached_obj = dbus.SystemBus() + return bus def get_manager(): - manager = getattr(get_manager, 'cached_obj', None) - if not manager: + manager = getattr(get_manager, 'cached_obj', None) + if not manager: try: - manager = get_manager.cached_obj = dbus.Interface( - get_bus().get_object(iface_base, '/'), - 'org.freedesktop.DBus.ObjectManager' ) + manager = get_manager.cached_obj = dbus.Interface( + get_bus().get_object(iface_base, '/'), + 'org.freedesktop.DBus.ObjectManager' ) except dbus.exceptions.DBusException as e: s="" try: @@ -160,14 +160,14 @@ def get_manager(): exit(1) else: raise - return manager + return manager def prop_get(obj, k, iface=None): - if iface is None: iface = obj.dbus_interface - return obj.Get(iface, k, dbus_interface=iface_props) + if iface is None: iface = obj.dbus_interface + return obj.Get(iface, k, dbus_interface=iface_props) def prop_set(obj, k, v, iface=None): - if iface is None: iface = obj.dbus_interface - return obj.Set(iface, k, v, dbus_interface=iface_props) + if iface is None: iface = obj.dbus_interface + return obj.Set(iface, k, v, dbus_interface=iface_props) msg='' def find_adapter(pattern=None): @@ -195,40 +195,40 @@ def find_adapter(pattern=None): exit(1) else: raise - return adapter + return adapter def find_adapter_in_objects(objects, pattern=None): - bus, obj = get_bus(), None - for path, ifaces in objects.iteritems(): - adapter = ifaces.get(iface_adapter) - if adapter is None: continue - if not pattern or pattern == adapter['Address'] or path.endswith(pattern): - obj = bus.get_object(iface_base, path) - yield dbus.Interface(obj, iface_adapter) - if obj is None: + bus, obj = get_bus(), None + for path, ifaces in objects.items(): + adapter = ifaces.get(iface_adapter) + if adapter is None: continue + if not pattern or pattern == adapter['Address'] or path.endswith(pattern): + obj = bus.get_object(iface_base, path) + yield dbus.Interface(obj, iface_adapter) + if obj is None: msg = 'Bluetooth adapter not found' - lg.error(msg) - raise BTError(msg) + lg.error(msg) + raise BTError(msg) def find_device(device_address, adapter_pattern=None): - return find_device_in_objects(get_manager().GetManagedObjects(), device_address, adapter_pattern) + return find_device_in_objects(get_manager().GetManagedObjects(), device_address, adapter_pattern) def find_device_in_objects(objects, device_address, adapter_pattern=None): - bus = get_bus() - path_prefix = '' - if adapter_pattern: - if not isinstance(adapter_pattern, types.StringTypes): adapter = adapter_pattern - else: adapter = find_adapter_in_objects(objects, adapter_pattern) - path_prefix = adapter.object_path - for path, ifaces in objects.iteritems(): - device = ifaces.get(iface_dev) - if device is None: continue - if device['Address'] == device_address and path.startswith(path_prefix): - obj = bus.get_object(iface_base, path) - return dbus.Interface(obj, iface_dev) + bus = get_bus() + path_prefix = '' + if adapter_pattern: + if not isinstance(adapter_pattern, types.StringTypes): adapter = adapter_pattern + else: adapter = find_adapter_in_objects(objects, adapter_pattern) + path_prefix = adapter.object_path + for path, ifaces in objects.items(): + device = ifaces.get(iface_dev) + if device is None: continue + if device['Address'] == device_address and path.startswith(path_prefix): + obj = bus.get_object(iface_base, path) + return dbus.Interface(obj, iface_dev) msg = 'Bluetooth device not found' - lg.error(msg) - raise BTError(msg) + lg.error(msg) + raise BTError(msg) pidPath = "" @@ -246,177 +246,177 @@ def hexdump(string): ### bt-pan def main(args=None): - import argparse - global lg + import argparse + global lg - # Set up logging initially info and above - lg = flog(myscript,'daemon','info') + # Set up logging initially info and above + lg = flog(myscript,'daemon','info') # cgitb.enable(format='text') - - parser = argparse.ArgumentParser( - description='BlueZ bluetooth PAN network server/client.') - - parser.add_argument('-i', '--device', metavar='local-addr/pattern', - help='Local device address/pattern to use (if not default).') - parser.add_argument('-a', '--device-all', action='store_true', - help='Use all local hci devices, not just default one.' - ' Only valid with "server" mode, mutually exclusive with --device option.') - parser.add_argument('-u', '--uuid', - metavar='uuid_or_shortcut', default='nap', - help='Service UUID to use. Can be either full UUID' - ' or one of the shortcuts: gn, panu, nap. Default: %(default)s.') - parser.add_argument('--systemd', action='store_true', - help='Use systemd service' - ' notification/watchdog mechanisms in daemon modes, if available.') - parser.add_argument('--debug', - action='store_true', help='Verbose operation mode.') - - cmds = parser.add_subparsers( dest='call', - title='Supported operations (have their own suboptions as well)' ) - - cmd = cmds.add_parser('server', help='Run infinitely as a NAP network server.') - cmd.add_argument('iface_name', - help='Bridge interface name to which each link will be added by bluez.' - ' It must be created and configured before starting the server.') - - cmd = cmds.add_parser('client', help='Connect to a PAN network.') - cmd.add_argument('remote_addr', help='Remote device address to connect to.') - cmd.add_argument('-d', '--disconnect', action='store_true', - help='Instead of connecting (default action), disconnect' - ' (if connected) and exit. Overrides all other options for this command.') - cmd.add_argument('-w', '--wait', action='store_true', - help='Go into an endless wait-loop after connection, terminating it on exit.') - cmd.add_argument('-c', '--if-not-connected', action='store_true', - help='Dont raise error if connection is already established.') - cmd.add_argument('-r', '--reconnect', action='store_true', - help='Force reconnection if some connection is already established.') - - opts = parser.parse_args() + + parser = argparse.ArgumentParser( + description='BlueZ bluetooth PAN network server/client.') + + parser.add_argument('-i', '--device', metavar='local-addr/pattern', + help='Local device address/pattern to use (if not default).') + parser.add_argument('-a', '--device-all', action='store_true', + help='Use all local hci devices, not just default one.' + ' Only valid with "server" mode, mutually exclusive with --device option.') + parser.add_argument('-u', '--uuid', + metavar='uuid_or_shortcut', default='nap', + help='Service UUID to use. Can be either full UUID' + ' or one of the shortcuts: gn, panu, nap. Default: %(default)s.') + parser.add_argument('--systemd', action='store_true', + help='Use systemd service' + ' notification/watchdog mechanisms in daemon modes, if available.') + parser.add_argument('--debug', + action='store_true', help='Verbose operation mode.') + + cmds = parser.add_subparsers( dest='call', + title='Supported operations (have their own suboptions as well)' ) + + cmd = cmds.add_parser('server', help='Run infinitely as a NAP network server.') + cmd.add_argument('iface_name', + help='Bridge interface name to which each link will be added by bluez.' + ' It must be created and configured before starting the server.') + + cmd = cmds.add_parser('client', help='Connect to a PAN network.') + cmd.add_argument('remote_addr', help='Remote device address to connect to.') + cmd.add_argument('-d', '--disconnect', action='store_true', + help='Instead of connecting (default action), disconnect' + ' (if connected) and exit. Overrides all other options for this command.') + cmd.add_argument('-w', '--wait', action='store_true', + help='Go into an endless wait-loop after connection, terminating it on exit.') + cmd.add_argument('-c', '--if-not-connected', action='store_true', + help='Dont raise error if connection is already established.') + cmd.add_argument('-r', '--reconnect', action='store_true', + help='Force reconnection if some connection is already established.') + + opts = parser.parse_args() if opts.debug: lg.setThreshold('debug') - if not opts.device_all: devs = [next(iter(find_adapter(opts.device)))] - else: - if opts.call != 'server': - parser.error('--device-all option is only valid with "server" mode.') - devs = list(find_adapter()) - devs = dict((prop_get(dev, 'Address'), dev) for dev in devs) - for dev_addr, dev in devs.viewitems(): - prop_set(dev, 'Powered', True) - lg.debug('Using local device (addr: %s): %s', dev_addr, dev.object_path) - - wait_iter_noop = 3600 - if opts.systemd: - from systemd import daemon - def wait_iter(): - if not wait_iter.sd_ready: - daemon.notify('READY=1') - daemon.notify('STATUS=Running in {} mode...'.format(opts.call)) - wait_iter.sd_ready = True - time.sleep(wait_iter.timeout) - if wait_iter.sd_wdt: daemon.notify('WATCHDOG=1') - wd_pid, wd_usec = (os.environ.get(k) for k in ['WATCHDOG_PID', 'WATCHDOG_USEC']) - if wd_pid and wd_pid.isdigit() and int(wd_pid) == os.getpid(): - wd_interval = float(wd_usec) / 2e6 # half of interval in seconds - assert wd_interval > 0, wd_interval - else: wd_interval = None - if wd_interval: - lg.debug('Initializing systemd watchdog pinger with interval: %ss', wd_interval) - wait_iter.sd_wdt, wait_iter.timeout = True, min(wd_interval, wait_iter_noop) - else: wait_iter.sd_wdt, wait_iter.timeout = False, wait_iter_noop - wait_iter.sd_ready = False - else: wait_iter = lambda: time.sleep(wait_iter_noop) - signal.signal(signal.SIGTERM, lambda sig,frm: sys.exit(0)) - - - if opts.call == 'server': + if not opts.device_all: devs = [next(iter(find_adapter(opts.device)))] + else: + if opts.call != 'server': + parser.error('--device-all option is only valid with "server" mode.') + devs = list(find_adapter()) + devs = dict((prop_get(dev, 'Address'), dev) for dev in devs) + for dev_addr, dev in devs.items(): + prop_set(dev, 'Powered', True) + lg.debug('Using local device (addr: %s): %s', dev_addr, dev.object_path) + + wait_iter_noop = 3600 + if opts.systemd: + from systemd import daemon + def wait_iter(): + if not wait_iter.sd_ready: + daemon.notify('READY=1') + daemon.notify('STATUS=Running in {} mode...'.format(opts.call)) + wait_iter.sd_ready = True + time.sleep(wait_iter.timeout) + if wait_iter.sd_wdt: daemon.notify('WATCHDOG=1') + wd_pid, wd_usec = (os.environ.get(k) for k in ['WATCHDOG_PID', 'WATCHDOG_USEC']) + if wd_pid and wd_pid.isdigit() and int(wd_pid) == os.getpid(): + wd_interval = float(wd_usec) / 2e6 # half of interval in seconds + assert wd_interval > 0, wd_interval + else: wd_interval = None + if wd_interval: + lg.debug('Initializing systemd watchdog pinger with interval: %ss', wd_interval) + wait_iter.sd_wdt, wait_iter.timeout = True, min(wd_interval, wait_iter_noop) + else: wait_iter.sd_wdt, wait_iter.timeout = False, wait_iter_noop + wait_iter.sd_ready = False + else: wait_iter = lambda: time.sleep(wait_iter_noop) + signal.signal(signal.SIGTERM, lambda sig,frm: sys.exit(0)) + + + if opts.call == 'server': inm = opts.iface_name - brctl = subprocess.Popen( - ['brctl', 'show', inm], - stdout=open(os.devnull, 'wb'), stderr=subprocess.PIPE ) - brctl_stderr = brctl.stderr.read() + brctl = subprocess.Popen( + ['brctl', 'show', inm], + stdout=open(os.devnull, 'wb'), stderr=subprocess.PIPE ) + brctl_stderr = brctl.stderr.read() writePidFile(opts.iface_name) - if brctl.wait() or brctl_stderr: - lg.error('brctl check failed for interface (missing?): {}'.format(inm)) - lg.error('Bridge interface must be added and configured before starting server, e.g. with:') - lg.error(' brctl addbr {}'.format(inm)) - lg.error(' brctl setfd {} 0'.format(inm)) - lg.error(' brctl stp {} off'.format(inm)) - lg.error(' ip addr add 10.101.225.84/24 dev {}'.format(inm)) - lg.error(' ip link set {} up'.format(inm)) - return 1 - - servers = list() - try: - for dev_addr, dev in devs.viewitems(): - server = dbus.Interface(dev, 'org.bluez.NetworkServer1') - server.Unregister(opts.uuid) # in case already registered - server.Register(opts.uuid, opts.iface_name) - servers.append(server) - lg.debug( 'Registered uuid %r with' - ' bridge/dev: %s / %s', opts.uuid, opts.iface_name, dev_addr ) - while True: wait_iter() - except KeyboardInterrupt: pass - finally: - if servers: - for server in servers: server.Unregister(opts.uuid) - lg.debug('Unregistered server uuids') - - - elif opts.call == 'client': - dev_remote = find_device(opts.remote_addr, devs.values()[0]) - lg.debug( 'Using remote device (addr: %s): %s', - prop_get(dev_remote, 'Address'), dev_remote.object_path ) - try: dev_remote.ConnectProfile(opts.uuid) - except: pass # no idea why it fails sometimes, but still creates dbus interface - net = dbus.Interface(dev_remote, 'org.bluez.Network1') - - if opts.disconnect: - try: net.Disconnect() - except dbus.exceptions.DBusException as err: - if err.get_dbus_name() != 'org.bluez.Error.Failed': raise - connected = prop_get(net, 'Connected') - if connected: raise - lg.debug( - 'Disconnected from network' - ' (dev_remote: %s, addr: %s) uuid %r, by explicit command', - dev_remote.object_path, prop_get(dev_remote, 'Address'), opts.uuid ) - return - - for n in xrange(2): - try: iface = net.Connect(opts.uuid) - except dbus.exceptions.DBusException as err: - if err.get_dbus_name() != 'org.bluez.Error.Failed': raise - connected = prop_get(net, 'Connected') - if not connected: raise - if opts.reconnect: - lg.debug( 'Detected pre-established connection' - ' (iface: %s), reconnecting', prop_get(net, 'Interface') ) - net.Disconnect() - continue - if not opts.if_not_connected: raise - else: break - lg.debug( - 'Connected to network (dev_remote: %s, addr: %s) uuid %r with iface: %s', - dev_remote.object_path, prop_get(dev_remote, 'Address'), opts.uuid, iface ) - - if opts.wait: - try: - while True: wait_iter() - except KeyboardInterrupt: pass - finally: - net.Disconnect() - lg.debug('Disconnected from network') - - - else: raise ValueError(opts.call) + if brctl.wait() or brctl_stderr: + lg.error('brctl check failed for interface (missing?): {}'.format(inm)) + lg.error('Bridge interface must be added and configured before starting server, e.g. with:') + lg.error(' brctl addbr {}'.format(inm)) + lg.error(' brctl setfd {} 0'.format(inm)) + lg.error(' brctl stp {} off'.format(inm)) + lg.error(' ip addr add 10.101.225.84/24 dev {}'.format(inm)) + lg.error(' ip link set {} up'.format(inm)) + return 1 + + servers = list() + try: + for dev_addr, dev in devs.items(): + server = dbus.Interface(dev, 'org.bluez.NetworkServer1') + server.Unregister(opts.uuid) # in case already registered + server.Register(opts.uuid, opts.iface_name) + servers.append(server) + lg.debug( 'Registered uuid %r with' + ' bridge/dev: %s / %s', opts.uuid, opts.iface_name, dev_addr ) + while True: wait_iter() + except KeyboardInterrupt: pass + finally: + if servers: + for server in servers: server.Unregister(opts.uuid) + lg.debug('Unregistered server uuids') + + + elif opts.call == 'client': + dev_remote = find_device(opts.remote_addr, devs.values()[0]) + lg.debug( 'Using remote device (addr: %s): %s', + prop_get(dev_remote, 'Address'), dev_remote.object_path ) + try: dev_remote.ConnectProfile(opts.uuid) + except: pass # no idea why it fails sometimes, but still creates dbus interface + net = dbus.Interface(dev_remote, 'org.bluez.Network1') + + if opts.disconnect: + try: net.Disconnect() + except dbus.exceptions.DBusException as err: + if err.get_dbus_name() != 'org.bluez.Error.Failed': raise + connected = prop_get(net, 'Connected') + if connected: raise + lg.debug( + 'Disconnected from network' + ' (dev_remote: %s, addr: %s) uuid %r, by explicit command', + dev_remote.object_path, prop_get(dev_remote, 'Address'), opts.uuid ) + return + + for n in xrange(2): + try: iface = net.Connect(opts.uuid) + except dbus.exceptions.DBusException as err: + if err.get_dbus_name() != 'org.bluez.Error.Failed': raise + connected = prop_get(net, 'Connected') + if not connected: raise + if opts.reconnect: + lg.debug( 'Detected pre-established connection' + ' (iface: %s), reconnecting', prop_get(net, 'Interface') ) + net.Disconnect() + continue + if not opts.if_not_connected: raise + else: break + lg.debug( + 'Connected to network (dev_remote: %s, addr: %s) uuid %r with iface: %s', + dev_remote.object_path, prop_get(dev_remote, 'Address'), opts.uuid, iface ) + + if opts.wait: + try: + while True: wait_iter() + except KeyboardInterrupt: pass + finally: + net.Disconnect() + lg.debug('Disconnected from network') + + + else: raise ValueError(opts.call) global pidPath - try: - os.remove(pidPath) + try: + os.remove(pidPath) except OSError: - pass - lg.debug('Finished') + pass + lg.debug('Finished') if __name__ == '__main__': sys.exit(main()) -- cgit v1.2.3 From ca1aadba53b3683386bc034451212b8317492a83 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 3 May 2022 17:30:00 -0500 Subject: Remove pycparser from python3-cffi --- recipes-devtools/python/python3-cffi_%.bbappend | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 recipes-devtools/python/python3-cffi_%.bbappend diff --git a/recipes-devtools/python/python3-cffi_%.bbappend b/recipes-devtools/python/python3-cffi_%.bbappend new file mode 100644 index 0000000..59cde4e --- /dev/null +++ b/recipes-devtools/python/python3-cffi_%.bbappend @@ -0,0 +1,5 @@ +# pycparser is for doing build of C or C++ code and +# should not be on an embedded device +RDEPENDS_${PN}_class-target_remove = " \ + ${PYTHON_PN}-pycparser \ +" -- cgit v1.2.3