59 Commits

Author SHA1 Message Date
af8e3cce38 yocto: use libubootenv replace uboot-tools 2025-07-09 09:01:31 +08:00
4a1758c7cd machine: add ext4.gz file type 2025-07-09 08:59:22 +08:00
0610d1091d feat: update rtl8188fu wifi module driver 2025-04-13 16:16:27 +08:00
6f0ee2ce32 bsp: add gw102d256n256 machine 2025-04-10 11:40:58 +08:00
82265dcabd bsp: add linux kernel 4.14 version 2025-04-10 11:33:56 +08:00
05009ffa6e yocto: systemd replace resolv.conf 2025-04-10 11:28:27 +08:00
35d005784c yocto: add config for busybox 2025-04-10 09:11:30 +08:00
7dc692ebb3 yocto: base-files package add fstab 2025-04-10 08:58:23 +08:00
7f4b6b4691 yocto: add ltetool package 2025-04-10 08:44:17 +08:00
d9d2c4e92e bsp: add gw102d512e4 machine 2025-04-10 00:55:54 +08:00
9e21e48f2d yocto: fix syntax 2025-04-10 00:53:56 +08:00
7268f0b12f yocto: add chirpstack-mqtt-forwarder package 2024-12-03 18:01:33 +08:00
8efec4ddbf yocto: add nanomq package 2024-12-03 18:00:36 +08:00
443213b6cb bsp:uboot update uboot package 2024-12-03 17:50:37 +08:00
e584d4e552 bsp: update rtl8188fu driver 2024-12-03 17:22:13 +08:00
ce5d22b47b yocto:tzdata set timezone use shanghai as default 2023-09-13 16:46:14 +08:00
0286d9c6a7 bsp: fix filename with dtb 2022-05-06 16:20:59 +08:00
9be1d4409b bsp: rtl8188fu disable debug log 2022-05-04 17:30:05 +08:00
cb29c1f472 yocto: add packet forward for sx1302 2022-05-04 17:11:47 +08:00
fa846b7e9b bsp:module rtl8188fu add option into conf file 2022-04-03 09:20:18 +08:00
3ffe70edc1 bsp: support define bootloader and offset on arch
Signed-off-by: Steve Chen <steve.chen@i2som.com>
2022-01-19 23:39:00 +08:00
e697c92b91 bsp: add imx8mm platform
Signed-off-by: Steve Chen <steve.chen@i2som.com>
2022-01-19 23:38:50 +08:00
addbf334db yocto: add lora packetforward package
Signed-off-by: Steve Chen <steve.chen@i2som.com>
2022-01-19 23:38:43 +08:00
d57784808b yocto: add gdbserver to debug packagegroup
Signed-off-by: Steve Chen <steve.chen@i2som.com>
2022-01-19 23:38:09 +08:00
1e687cffb1 yocto: add gateway system image
Signed-off-by: Steve Chen <steve.chen@i2som.com>
2022-01-19 23:38:01 +08:00
dc5c4549e2 yocto: use libubootenv as u-boot-fw-util
Signed-off-by: Steve Chen <steve.chen@i2som.com>
2022-01-19 23:37:53 +08:00
f0c8f81486 yocto: add network interface files on systemd
Signed-off-by: Steve Chen <steve.chen@i2som.com>
2022-01-19 23:37:41 +08:00
f4c7925ded yocto: initscript remove mountnfs service
Signed-off-by: Steve Chen <steve.chen@i2som.com>
2022-01-19 23:37:34 +08:00
c5eba99c8a bsp: update imx-boot and imx-mkimage version
Those packages use 4.14 version from nxp repo.

Signed-off-by: Steve Chen <steve.chen@i2som.com>
2022-01-19 23:37:17 +08:00
2fdf588c16 bsp: upgrade firmware-imx version to 8.1.1
Signed-off-by: Steve Chen <steve.chen@i2som.com>
2022-01-19 23:37:01 +08:00
d870d02631 yocto: vsftpd disable auto boot 2022-01-17 23:22:43 +08:00
ceb3819670 yocto: peripherylua support imx platform 2022-01-17 23:21:38 +08:00
03ed75c22a yocto: add nps proxy tool client and server 2022-01-11 11:00:56 +08:00
e0d458e4e4 yocto: add igh-ethernet package 2022-01-11 10:39:33 +08:00
a3bdbb4c05 yocto: upgrade swudpate to 2018.11 version 2022-01-11 00:51:06 +08:00
efdb93cd35 yocto: add lora gateway library 2022-01-11 00:26:13 +08:00
5f21322c66 yocto: add libopen62541 package 2022-01-11 00:14:28 +08:00
ac1334175c yocto: add libiec61850 package 2022-01-11 00:13:19 +08:00
5477374b83 yocto: add soem package 2022-01-11 00:12:07 +08:00
a7a22cffd9 bsp: add sdma for imx6ull/imx6ul from firmware-imx 2022-01-11 00:03:33 +08:00
a2ce6763ad yocto: enable systemd and use chrony instead ntp 2022-01-10 23:56:07 +08:00
a4dc4070a9 bsp: add TrustFirmware-A 2022-01-10 23:35:50 +08:00
e6f481994d bsp: support thud release 2022-01-10 23:28:09 +08:00
271571f459 yocto: support thud release 2022-01-10 23:27:26 +08:00
80fa7d41fb yocto: add service for chirpstack gateway bridge 2022-01-10 22:58:14 +08:00
bdb4f00b34 yocto: add chirpstack gateway bridge 2022-01-10 22:57:46 +08:00
a66ae03d62 yocto: ookla speedtest 2022-01-10 22:48:39 +08:00
04826b2afc yocto: add speedtest from ookla-speedtest 2022-01-10 22:47:20 +08:00
35e0817d05 yocto: auto disable mosquitto 2022-01-10 22:40:11 +08:00
5625c28189 add firmware and kernel module with rtl8188fu wifi module 2022-01-10 20:31:21 +08:00
d10baeaf65 yocto: remove iperf and enable snmp 2022-01-10 20:25:15 +08:00
e617e42bcf yocto: remove wireless-tools package 2022-01-10 20:19:06 +08:00
b3b5a9705f yocto:images remove image_types_uboot
It has replaced with images_types.
2022-01-10 20:14:50 +08:00
5bac791f66 bsp: enable imx dma firmware and systemd 2022-01-10 19:50:44 +08:00
7b47068678 yocto: fix grammer usage 2022-01-10 19:47:46 +08:00
04318f5e65 bsp: support unpack binary file from NXP 2022-01-10 19:41:14 +08:00
9c801c8913 bsp: upgrade thud grammer 2022-01-10 17:17:14 +08:00
2e36c00266 yocto:distro add systemd feature 2022-01-10 16:30:35 +08:00
daa5d0ab0a bsp:machine: add graphics options for imx6ull chip 2022-01-10 16:26:41 +08:00
113 changed files with 8448 additions and 349 deletions

View File

@ -0,0 +1,68 @@
# fsl-eula-unpack.bbclass provides the mechanism used for unpacking
# the .bin file downloaded by HTTP and handle the EULA acceptance.
#
# To use it, the 'fsl-eula' parameter needs to be added to the
# SRC_URI entry, e.g:
#
# SRC_URI = "${FSL_MIRROR}/firmware-imx-${PV};fsl-eula=true"
LIC_FILES_CHKSUM_append = " file://${FSL_EULA_FILE};md5=ab61cab9599935bfe9f700405ef00f28"
LIC_FILES_CHKSUM[vardepsexclude] += "FSL_EULA_FILE"
python fsl_bin_do_unpack() {
src_uri = (d.getVar('SRC_URI', True) or "").split()
if len(src_uri) == 0:
return
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
rootdir = localdata.getVar('WORKDIR', True)
fetcher = bb.fetch2.Fetch(src_uri, localdata)
for url in fetcher.ud.values():
save_cwd = os.getcwd()
# Check for supported fetchers
if url.type in ['http', 'https', 'ftp', 'file']:
if url.parm.get('fsl-eula', False):
# If download has failed, do nothing
if not os.path.exists(url.localpath):
bb.debug(1, "Exiting as '%s' cannot be found" % url.basename)
return
# Change to the working directory
bb.note("Handling file '%s' as a Freescale's EULA binary." % url.basename)
save_cwd = os.getcwd()
os.chdir(rootdir)
cmd = "sh %s --auto-accept --force" % (url.localpath)
bb.fetch2.runfetchcmd(cmd, d, quiet=True)
# Return to the previous directory
os.chdir(save_cwd)
}
python do_unpack() {
eula = d.getVar('ACCEPT_FSL_EULA', True)
eula_file = d.getVar('FSL_EULA_FILE', True)
pkg = d.getVar('PN', True)
if eula == None:
bb.fatal("To use '%s' you need to accept the Freescale EULA at '%s'. "
"Please read it and in case you accept it, write: "
"ACCEPT_FSL_EULA = \"1\" in your local.conf." % (pkg, eula_file))
elif eula == '0':
bb.fatal("To use '%s' you need to accept the Freescale EULA." % pkg)
else:
bb.note("Freescale EULA has been accepted for '%s'" % pkg)
# The binary unpack needs to be done first so 'S' is valid
bb.build.exec_func('fsl_bin_do_unpack', d)
try:
bb.build.exec_func('base_do_unpack', d)
except:
raise
}
do_unpack[vardepsexclude] += "FSL_EULA_FILE"

View File

@ -3,8 +3,10 @@ inherit image_types
################################################################################
# BOOT IMAGES #
################################################################################
BOOTLOADER_IMAGE_RECIPE ?= "u-boot"
IMAGE_DEPENDS_boot.vfat = " \
do_image_boot_vfat[depends] += " \
coreutils-native:do_populate_sysroot \
dosfstools-native:do_populate_sysroot \
mtools-native:do_populate_sysroot \
u-boot:do_deploy \
@ -16,9 +18,10 @@ IMAGE_CMD_boot.vfat() {
BOOTIMG_FILES_SYMLINK="${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin"
if [ -n "${KERNEL_DEVICETREE}" ]; then
for DTB in ${KERNEL_DEVICETREE}; do
if [ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB}" ]; then
BOOTIMG_FILES="${BOOTIMG_FILES} $(readlink -e ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB})"
BOOTIMG_FILES_SYMLINK="${BOOTIMG_FILES_SYMLINK} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB}"
DTB="$(basename ${DTB})"
if [ -e "${DEPLOY_DIR_IMAGE}/${DTB}" ]; then
BOOTIMG_FILES="${BOOTIMG_FILES} $(readlink -e ${DEPLOY_DIR_IMAGE}/${DTB})"
BOOTIMG_FILES_SYMLINK="${BOOTIMG_FILES_SYMLINK} ${DEPLOY_DIR_IMAGE}/${DTB}"
fi
done
fi
@ -59,7 +62,7 @@ IMAGE_CMD_boot.vfat() {
# Remove the default ".rootfs." suffix for 'boot.vfat' images
do_image_boot_vfat[imgsuffix] = "."
IMAGE_DEPENDS_boot.ubifs = " \
do_image_boot_ubifs[depends] += " \
mtd-utils-native:do_populate_sysroot \
u-boot:do_deploy \
virtual/kernel:do_deploy \
@ -69,8 +72,10 @@ IMAGE_CMD_boot.ubifs() {
BOOTIMG_FILES_SYMLINK="${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin"
if [ -n "${KERNEL_DEVICETREE}" ]; then
for DTB in ${KERNEL_DEVICETREE}; do
if [ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB}" ]; then
BOOTIMG_FILES_SYMLINK="${BOOTIMG_FILES_SYMLINK} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB}"
DTB="$(basename ${DTB})"
if [ -e "${DEPLOY_DIR_IMAGE}/${DTB}" ]; then
BOOTIMG_FILES="${BOOTIMG_FILES} $(readlink -e ${DEPLOY_DIR_IMAGE}/${DTB})"
BOOTIMG_FILES_SYMLINK="${BOOTIMG_FILES_SYMLINK} ${DEPLOY_DIR_IMAGE}/${DTB}"
fi
done
fi
@ -106,16 +111,16 @@ do_image_boot_ubifs[imgsuffix] = "."
#
# This is needed because otherwise the IMAGE_DEPENDS_<actualtype> is not used and the build fails.
#
IMAGE_DEPENDS_boot = " \
${@bb.utils.contains('IMAGE_FSTYPES', 'boot.ubifs', '${IMAGE_DEPENDS_boot.ubifs}', '', d)} \
${@bb.utils.contains('IMAGE_FSTYPES', 'boot.vfat', '${IMAGE_DEPENDS_boot.vfat}', '', d)} \
"
#do_image_boot[depends] = " \
# ${@bb.utils.contains('IMAGE_FSTYPES', 'boot.ubifs', '${IMAGE_DEPENDS_boot.ubifs}', '', d)} \
# ${@bb.utils.contains('IMAGE_FSTYPES', 'boot.vfat', '${IMAGE_DEPENDS_boot.vfat}', '', d)} \
#"
################################################################################
# RECOVERY IMAGES #
################################################################################
IMAGE_DEPENDS_recovery.vfat = " \
${RECOVERY_INITRAMFS_IMAGE}:do_image_complete \
do_image_recovery_vfat[depends] += " \
${RECOVERY_INITRAMFS_IMAGE}:do_image_complete \
"
IMAGE_CMD_recovery.vfat() {
@ -131,7 +136,7 @@ do_image_recovery_vfat[imgsuffix] = "."
IMAGE_TYPEDEP_recovery.vfat = "boot.vfat"
IMAGE_DEPENDS_recovery.ubifs = " \
do_image_recovery_ubifs[depends] += " \
mtd-utils-native:do_populate_sysroot \
u-boot:do_deploy \
virtual/kernel:do_deploy \
@ -142,8 +147,10 @@ IMAGE_CMD_recovery.ubifs() {
RECOVERYIMG_FILES_SYMLINK="${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin"
if [ -n "${KERNEL_DEVICETREE}" ]; then
for DTB in ${KERNEL_DEVICETREE}; do
if [ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB}" ]; then
RECOVERYIMG_FILES_SYMLINK="${RECOVERYIMG_FILES_SYMLINK} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB}"
# Remove potential sub-folders
DTB="$(basename ${DTB})"
if [ -e "${DEPLOY_DIR_IMAGE}/${DTB}" ]; then
RECOVERYIMG_FILES_SYMLINK="${RECOVERYIMG_FILES_SYMLINK} ${DEPLOY_DIR_IMAGE}/${DTB}"
fi
done
fi
@ -182,10 +189,10 @@ do_image_recovery_ubifs[imgsuffix] = "."
#
# This is needed because otherwise the IMAGE_DEPENDS_<actualtype> is not used and the build fails.
#
IMAGE_DEPENDS_recovery = " \
${@bb.utils.contains('IMAGE_FSTYPES', 'recovery.ubifs', '${IMAGE_DEPENDS_recovery.ubifs}', '', d)} \
${@bb.utils.contains('IMAGE_FSTYPES', 'recovery.vfat', '${IMAGE_DEPENDS_recovery.vfat}', '', d)} \
"
#do_image_recovery[depends] = " \
# ${@bb.utils.contains('IMAGE_FSTYPES', 'recovery.ubifs', '${do_image_recovery.ubifs[depends]}', '', d)} \
# ${@bb.utils.contains('IMAGE_FSTYPES', 'recovery.vfat', '${do_image_recovery.vfat[depends]}', '', d)} \
#"
################################################################################
# SDCARD IMAGES #
@ -199,12 +206,16 @@ BOARD_BOOTIMAGE_PARTITION_SIZE ??= "65536"
# SD card image name
SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.sdcard"
# the bootloader default offset is 1KB
BOOTLOADER_SEEK ?= "1"
SDIMG_BOOTLOADER ?= "${DEPLOY_DIR_IMAGE}/${UBOOT_SYMLINK}"
SDIMG_BOOTFS_TYPE ?= "boot.vfat"
SDIMG_BOOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.${SDIMG_BOOTFS_TYPE}"
SDIMG_ROOTFS_TYPE ?= "ext4"
SDIMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}"
IMAGE_DEPENDS_sdcard = " \
do_image_sdcard[depends] = " \
dosfstools-native:do_populate_sysroot \
mtools-native:do_populate_sysroot \
parted-native:do_populate_sysroot \
@ -245,10 +256,10 @@ IMAGE_CMD_sdcard() {
parted -s ${SDIMG} -- unit KiB mkpart primary ext2 $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED}) -1s
parted -s ${SDIMG} unit KiB print
SDIMG_UBOOT="${DEPLOY_DIR_IMAGE}/${UBOOT_SYMLINK}"
#SDIMG_UBOOT="${DEPLOY_DIR_IMAGE}/${UBOOT_SYMLINK}"
# Burn bootloader, boot and rootfs partitions
dd if=${SDIMG_UBOOT} of=${SDIMG} conv=notrunc,fsync seek=2 bs=512
dd if=${SDIMG_BOOTLOADER} of=${SDIMG} conv=notrunc,fsync seek=${BOOTLOADER_SEEK} bs=1K
dd if=${SDIMG_BOOTFS} of=${SDIMG} conv=notrunc,fsync seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024)
dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc,fsync seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024 + ${BOOT_SPACE_ALIGNED} \* 1024)
}

View File

@ -10,3 +10,5 @@ BBFILE_PATTERN_i2som-nxp := "^${LAYERDIR}/"
BBFILE_PRIORITY_i2som-nxp = "5"
LAYERDEPENDS_i2som-nxp = "core freescale-layer"
LAYERSERIES_COMPAT_i2som-nxp = "thud"

View File

@ -0,0 +1,34 @@
# TYPE: Machine
# NAME: i2C-6ULX-B board with i2S-6ULY2 eMMC Variant
# DESCRIPTION: Board configuration for i2SOM's i2C-6ULX-B.
# Include the SOM i2S-6UL configuration.
include conf/machine/include/i2s-6ull.inc
MACHINE_FEATURES += "usbgadget usbhost alsa touchscreen"
# U-Boot configurations
UBOOT_CONFIG ??= "nand"
UBOOT_CONFIG[nand] = "i2som_imx6ull_14x14_nand_defconfig"
# U-Boot environment offset (within partition)
UBOOT_ENV_OFFSET ?= "0x0"
# U-Boot environment size
UBOOT_ENV_SIZE ?= "0x100000"
# U-Boot environment range: size (in hex) in the environment partition that
# the U-Boot environment can take up (if undefined, it will take up all the
# available space in the environment partition)
UBOOT_ENV_RANGE ?= ""
KERNEL_DEVICETREE ?= " \
i2som-gw102n.dtb \
"
KERNEL_DEFCONFIG ?= "arch/arm/configs/i2som_ecgw_defconfig"
SERIAL_CONSOLE = "115200 ttymxc0"
# U-Boot script to be copied to the boot image
BOOT_SCRIPTS = "boot.scr:boot.scr"
# Flash image types
IMAGE_FSTYPES ?= "tar.bz2 ubifs boot.ubifs recovery.ubifs"

View File

@ -0,0 +1,32 @@
# TYPE: Machine
# NAME: i2SOM GW102D512E4 board with i2S-6UBY2 eMMC Variant SOM
# DESCRIPTION: Board configuration for i2SOM's GW102 EMMC variant.
# Include the SOM i2S-6UL configuration.
include conf/machine/include/i2s-6ull.inc
MACHINE_FEATURES += "i2s-serial-usb usbgadget usbhost vfat rtc wifi"
MACHINE_EXTRA_RRECOMMENDS += " kernel-module-rtl8188fu"
#MACHINE_FIRMWARE_append = " firmware-rtl8188fu"
# U-Boot configurations
#UBOOT_CONFIG ??= "emmc sd"
UBOOT_CONFIG ??= "emmc"
UBOOT_CONFIG[emmc] = "i2som_gw102_emmc_defconfig"
#UBOOT_CONFIG[emmc] = "mx6ull_14x14_evk_emmc_config,,u-boot-dtb.${UBOOT_SUFFIX}"
#UBOOT_CONFIG[sd] = "i2som_imx6ull_14x14_emmc_defconfig"
KERNEL_DEVICETREE ?= " \
i2som-gw102e.dtb \
"
KERNEL_DEFCONFIG ?= "arch/arm/configs/i2som_ecgw_defconfig"
SERIAL_CONSOLE = "115200 ttymxc0"
# U-Boot script to be copied to the boot image
BOOT_SCRIPTS = "boot.scr:boot.scr"
# Flash image types
IMAGE_FSTYPES ?= " boot.vfat recovery.vfat ext4 tar.bz2 ext4.gz"

View File

@ -10,7 +10,7 @@ include conf/machine/include/tune-cortexa7.inc
# Platform u-boot settings
UBOOT_SUFFIX = "imx"
UBOOT_SYMLINK = "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
UBOOT_SYMLINK = "u-boot-${MACHINE}-dtb.${UBOOT_SUFFIX}"
# Wireless external module
WIRELESS_MODULE ?= ""
@ -21,21 +21,26 @@ USB_DEVICE_MODULE ?= ""
USB_DEVICE_MODULE_append = "${@bb.utils.contains('MACHINE_FEATURES', 'i2s-serial-usb', 'kernel-module-exar', '', d)}"
# Firmware
MACHINE_FIRMWARE ?= ""
MACHINE_FIRMWARE ?= "firmware-imx-sdma"
MACHINE_FIRMWARE_append = "${@bb.utils.contains('MACHINE_FEATURES', 'i2s-wifi-sdio', 'firmware-brcm43362', '', d)}"
MACHINE_FIRMWARE_append = "${@bb.utils.contains('MACHINE_FEATURES', 'i2s-wifi-usb', 'firmware-rtl8188eu', '', d)}"
MACHINE_EXTRA_RDEPENDS += " \
imx-kobs \
mtd-utils-ubifs \
libubootenv \
"
#u-boot-fw-utils
EXTRA_IMAGEDEPENDS_append = " gdb-cross-arm "
MACHINE_EXTRA_RRECOMMENDS += "${MACHINE_FIRMWARE} ${WIRELESS_MODULE} ${USB_DEVICE_MODULE}"
MACHINE_EXTRA_RRECOMMENDS += "cryptodev-module"
MACHINE_EXTRA_RRECOMMENDS += "${@bb.utils.contains('MACHINE_FEATURES', 'alsa', 'imx-alsa-plugins', '', d)}"
MACHINE_EXTRA_RRECOMMENDS += " \
${MACHINE_FIRMWARE} \
${WIRELESS_MODULE} \
${USB_DEVICE_MODULE} \
cryptodev-module \
${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'imx-alsa-plugins', '', d)} \
"
# MACHINE_FEATURES += "wifi bluetooth"
KERNEL_IMAGETYPE = "zImage"
@ -46,3 +51,6 @@ MKUBIFS_RECOVERY_ARGS ?= "-m 2048 -e 126976 -c 158"
# mkfs.ubifs parameters for rootfs partition
MKUBIFS_ARGS ?= "-m 2048 -e 126976 -c 8191"
DISTRO_FEATURES_append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"

View File

@ -0,0 +1,61 @@
#@TYPE: Machine
#@NAME: i2SOM iMX8M Mini.
#@DESCRIPTION: Machine configuration for i2SOM iMX8M Mini module.
I2SOM_FAMILY = "i2simx8mm"
MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:${I2SOM_FAMILY}:"
DEFAULTTUNE_mx8 = "aarch64"
include conf/machine/include/imx-i2som-base.inc
include conf/machine/include/arm/arch-arm64.inc
# Platform u-boot settings
UBOOT_PREFIX = "u-boot"
UBOOT_SUFFIX = "bin"
IMXBOOT_TARGETS = "flash_ddr4_evk"
# The bootloader image that gets flashed consists of U-Boot and several fw binaries
EXTRA_IMAGEDEPENDS = "imx-boot"
BOOTLOADER_IMAGE_RECIPE = "imx-boot"
BOOTLOADER_SEEK = "33"
#BOOTABLE_FILENAME = "${UBOOT_PREFIX}-${MACHINE}.bin"
BOOTABLE_FILENAME = "imx-boot"
SDIMG_BOOTLOADER = "${DEPLOY_DIR_IMAGE}/${BOOTABLE_FILENAME}"
# Set LPDDR4 FIRMWARE
#DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin"
DDR_FIRMWARE_NAME = "ddr4_imem_1d.bin ddr4_dmem_1d.bin ddr4_imem_2d.bin ddr4_dmem_2d.bin"
STORAGE_MEDIA = "mmc"
MACHINE_GSTREAMER_1_0_PLUGIN ?= ""
# Firmware
MACHINE_FIRMWARE ?= "firmware-imx-sdma"
MACHINE_EXTRA_RDEPENDS += " \
e2fsprogs-mke2fs \
e2fsprogs-resize2fs \
parted \
libubootenv \
"
MACHINE_EXTRA_RRECOMMENDS += " \
${MACHINE_FIRMWARE} \
cryptodev-module \
"
MACHINE_FEATURES += "wifi bluetooth cryptochip"
# AARCH64 doesn't support self-extracting zImage
KERNEL_IMAGETYPE = "Image"
VIRTUAL-RUNTIME_init_manager ?= "systemd"
VIRTUAL-RUNTIME_initscripts ?= "initscripts"
# Adding 'wayland' along with 'x11' enables the xwayland backend
# Vulkan is necessary for wayland to build
DISTRO_FEATURES_append = " wayland vulkan systemd pam"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"

View File

@ -23,13 +23,15 @@ MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
DEFAULTTUNE_mx6 ?= "cortexa9thf-neon"
DEFAULTTUNE_mx6ul ?= "cortexa7thf-neon"
DEFAULTTUNE_mx6ull ?= "cortexa7thf-neon"
DEFAULTTUNE_mx8 ?= "aarch64"
INHERIT += "machine-overrides-extender"
MACHINEOVERRIDES_EXTENDER_mx6q = "imxipu:imxvpu:imxgpu2d:imxgpu3d"
MACHINEOVERRIDES_EXTENDER_mx6dl = "imxpxp:imxipu:imxvpu:imxgpu2d:imxgpu3d:imxepdc"
MACHINEOVERRIDES_EXTENDER_mx6ul = "imxpxp"
MACHINEOVERRIDES_EXTENDER_mx6ull = "imxpxp"
MACHINEOVERRIDES_EXTENDER_mx6ul = "imxfbdev:imxpxp"
MACHINEOVERRIDES_EXTENDER_mx6ull = "imxfbdev:imxpxp"
MACHINEOVERRIDES_EXTENDER_mx8mm = "imxdrm:imxvpu:imxgpu:imxgpu2d:imxgpu3d"
# Sub-architecture support
MACHINE_SOCARCH_SUFFIX ?= ""
@ -37,12 +39,30 @@ MACHINE_SOCARCH_SUFFIX_mx6q = "-mx6qdl"
MACHINE_SOCARCH_SUFFIX_mx6dl = "-mx6qdl"
MACHINE_SOCARCH_SUFFIX_mx6ul = "-mx6ul"
MACHINE_SOCARCH_SUFFIX_mx6ull = "-mx6ull"
MACHINE_SOCARCH_SUFFIX_mx8mm = "-mx8mm"
MACHINE_ARCH_FILTER = "virtual/kernel"
MACHINE_SOCARCH_FILTER_append_imxvpu = " imx-vpu libimxvpuapi imx-codec imx-vpuwrap imx-parser"
MACHINE_SOCARCH_FILTER_append_imxgpu2d = " virtual/libopenvg virtual/libgles1 virtual/libgles2 virtual/egl virtual/mesa virtual/libgl virtual/libg2d cairo pango"
MACHINE_SOCARCH_FILTER_append_imxpxp = " imx-codec imx-parser"
MACHINE_SOCARCH_FILTER_append_imxgpu = " \
virtual/egl \
virtual/mesa \
virtual/libg2d \
libgal-imx \
virtual/libopenvg \
cairo \
opencv \
pango \
"
MACHINE_SOCARCH_FILTER_append_imxgpu3d = " \
virtual/libgl \
virtual/libgles1 \
virtual/libgles2 \
"
INHERIT += "fsl-dynamic-packagearch"
SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS_append = " \
@ -61,11 +81,13 @@ MACHINE_GSTREAMER_1_0_PLUGIN ?= ""
MACHINE_GSTREAMER_1_0_PLUGIN_mx6q ?= "imx-gst1.0-plugin imx-gst1.0-plugin-gplay imx-gst1.0-plugin-grecorder"
MACHINE_GSTREAMER_1_0_PLUGIN_mx6dl ?= "imx-gst1.0-plugin imx-gst1.0-plugin-gplay imx-gst1.0-plugin-grecorder"
MACHINE_GSTREAMER_1_0_PLUGIN_mx6ul ?= "imx-gst1.0-plugin imx-gst1.0-plugin-gplay imx-gst1.0-plugin-grecorder"
MACHINE_GSTREAMER_1_0_PLUGIN_mx8 ?= "imx-gst1.0-plugin imx-gst1.0-plugin-gplay imx-gst1.0-plugin-grecorder"
# Determines if the SoC has support for Vivante kernel driver
SOC_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT = "0"
SOC_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT_mx6q = "1"
SOC_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT_mx6dl = "1"
SOC_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT_mx8 = "1"
# Handle Vivante kernel driver setting:
# 0 - machine does not have Vivante GPU driver support
@ -76,28 +98,40 @@ MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT ?= "${SOC_HAS_VIVANTE_KERNEL_DRIVER_SU
PREFERRED_PROVIDER_virtual/egl_mx6q ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/egl_mx6dl ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/egl_mx6ul ?= "mesa"
PREFERRED_PROVIDER_virtual/egl_mx6ull ?= "mesa"
PREFERRED_PROVIDER_virtual/egl_mx8 ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/libgles1_mx6q ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/libgles1_mx6dl ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/libgles1_mx6ul ?= "mesa"
PREFERRED_PROVIDER_virtual/libgles1_mx6ull ?= "mesa"
PREFERRED_PROVIDER_virtual/libgles1_mx8 ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/libgles2_mx6q ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/libgles2_mx6dl ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/libgles2_mx6ul ?= "mesa"
PREFERRED_PROVIDER_virtual/libgles2_mx6ull ?= "mesa"
PREFERRED_PROVIDER_virtual/libgles2_mx8 ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/libgl_mx6q ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/libgl_mx6dl ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/libgl_mx6ul ?= "mesa"
PREFERRED_PROVIDER_virtual/libgl_mx6ull ?= "mesa"
PREFERRED_PROVIDER_virtual/libgl_mx8 ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/libg2d_mx6 ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/libg2d_mx6ul = ""
PREFERRED_PROVIDER_virtual/libg2d_mx6ull = ""
PREFERRED_PROVIDER_virtual/libg2d_mx8 = "imx-dpu-g2d"
EXTRA_IMAGEDEPENDS = "u-boot"
KERNEL_IMAGETYPE = "uImage"
KERNEL_IMAGETYPE = "zImage"
#MACHINE_FEATURES = "usbgadget usbhost vfat alsa touchscreen"
MACHINE_FEATURES = "vfat rtc"
# Add the ability to specify _imx machines
MACHINEOVERRIDES =. "imx:"
UBOOT_SYMLINK ?= "${UBOOT_PREFIX}-${MACHINE}.${UBOOT_SUFFIX}"

View File

@ -0,0 +1,18 @@
# Copyright (C) 2012-2016 Freescale Semiconductor
# Copyright 2017-2019 NXP
# Copyright (C) 2018 O.S. Systems Software LTDA.
SECTION = "base"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=fb0303e4ee8b0e71c094171e2272bd44"
SRCBRANCH ?= "master"
SRC_URI = " \
${FSL_MIRROR}/firmware-imx-${PV}.bin;fsl-eula=true \
"
SRC_URI[md5sum] = "b494c9a2ba9f8906de73ac33068789a2"
SRC_URI[sha256sum] = "c115d5d0d115fc14754671bd2428f672f9f99677988588accef2fbca2c3f749c"
S = "${WORKDIR}/firmware-imx-${PV}"
inherit fsl-eula-unpack

View File

@ -0,0 +1,24 @@
# Copyright 2018 NXP
SUMMARY = "Freescale i.MX firmware for 8M and 8M Mini family"
DESCRIPTION = "Freescale i.MX firmware for 8M and 8M Mini family"
require firmware-imx-${PV}.inc
inherit deploy
do_install[noexec] = "1"
do_deploy() {
# Synopsys DDR
for ddr_firmware in ${DDR_FIRMWARE_NAME}; do
install -m 0644 ${S}/firmware/ddr/synopsys/${ddr_firmware} ${DEPLOYDIR}
done
# Cadence DP and HDMI
install -m 0644 ${S}/firmware/hdmi/cadence/signed_dp_imx8m.bin ${DEPLOYDIR}
install -m 0644 ${S}/firmware/hdmi/cadence/signed_hdmi_imx8m.bin ${DEPLOYDIR}
}
addtask deploy after do_install before do_build
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
COMPATIBLE_MACHINE = "(mx8m)"

View File

@ -0,0 +1,55 @@
SUMMARY = "Freescale IMX firmware"
DESCRIPTION = "Freescale IMX firmware such as for the VPU"
PE = "1"
require firmware-imx-${PV}.inc
inherit fsl-eula-unpack allarch
do_install() {
install -d ${D}${base_libdir}/firmware/imx
#cp -rfv firmware/* ${D}${base_libdir}/firmware/
# Install SDMA Firmware: sdma-imx6q.bin & sdma-imx7d.bin into lib/firmware/imx/sdma
install -d ${D}${base_libdir}/firmware/imx/sdma
install -m 0644 ${S}/firmware/sdma/sdma-imx6q.bin ${D}${base_libdir}/firmware/imx/sdma
#mv ${D}${base_libdir}/firmware/sdma/sdma-imx6q.bin ${D}${base_libdir}/firmware/imx/sdma
#mv ${D}${base_libdir}/firmware/sdma/sdma-imx7d.bin ${D}${base_libdir}/firmware/imx/sdma
find ${D}${base_libdir}/firmware -type f -exec chmod 644 '{}' ';'
find ${D}${base_libdir}/firmware -type f -exec chown root:root '{}' ';'
# Remove files not going to be installed
find ${D}${base_libdir}/firmware/ -name '*.mk' -exec rm '{}' ';'
}
python populate_packages_prepend() {
vpudir = bb.data.expand('${base_libdir}/firmware/vpu', d)
do_split_packages(d, vpudir, '^vpu_fw_([^_]*).*\.bin',
output_pattern='firmware-imx-vpu-%s',
description='Freescale IMX Firmware %s',
extra_depends='',
prepend=True)
sdmadir = bb.data.expand('${base_libdir}/firmware/sdma', d)
do_split_packages(d, sdmadir, '^sdma-([^-]*).*\.bin',
output_pattern='firmware-imx-sdma-%s',
description='Freescale IMX Firmware %s',
extra_depends='',
prepend=True)
}
ALLOW_EMPTY_${PN} = "1"
PACKAGES_DYNAMIC = "${PN}-vpu-* ${PN}-sdma-*"
PACKAGES =+ "${PN}-epdc ${PN}-scfw ${PN}-sdma ${PN}-easrc"
FILES_${PN}-epdc = "${base_libdir}/firmware/imx/epdc/"
FILES_${PN}-scfw = "${base_libdir}/firmware/scfw/"
FILES_${PN}-sdma = " ${base_libdir}/firmware/imx/sdma"
FILES_${PN}-easrc = "${base_libdir}/firmware/imx/easrc/"
COMPATIBLE_MACHINE = "(mx6ul|mx6ull)"

View File

@ -0,0 +1,63 @@
# Copyright (C) 2012-2016 Freescale Semiconductor
# Copyright (C) 2018 O.S. Systems Software LTDA.
# Copyright 2017-2019 NXP
SUMMARY = "Freescale IMX firmware"
DESCRIPTION = "Freescale IMX firmware such as for the VPU"
SECTION = "base"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=fd4b227530cd88a82af6a5982cfb724d"
PE = "1"
SRC_URI = "${FSL_MIRROR}/firmware-imx-${PV}.bin;fsl-eula=true "
SRC_URI[md5sum] = "70bdefdd7fb58f782237acf4c648f5cd"
SRC_URI[sha256sum] = "f04b2deb4f126e6b6cd4460462292acd72183b9f799e3b873fb390ff0f18eb55"
inherit fsl-eula-unpack allarch
do_install() {
install -d ${D}${base_libdir}/firmware/imx
#cp -rfv firmware/* ${D}${base_libdir}/firmware/
# Install SDMA Firmware: sdma-imx6q.bin & sdma-imx7d.bin into lib/firmware/imx/sdma
install -d ${D}${base_libdir}/firmware/imx/sdma
install -m 0644 ${S}/firmware/sdma/sdma-imx6q.bin ${D}${base_libdir}/firmware/imx/sdma
#mv ${D}${base_libdir}/firmware/sdma/sdma-imx6q.bin ${D}${base_libdir}/firmware/imx/sdma
#mv ${D}${base_libdir}/firmware/sdma/sdma-imx7d.bin ${D}${base_libdir}/firmware/imx/sdma
find ${D}${base_libdir}/firmware -type f -exec chmod 644 '{}' ';'
find ${D}${base_libdir}/firmware -type f -exec chown root:root '{}' ';'
# Remove files not going to be installed
find ${D}${base_libdir}/firmware/ -name '*.mk' -exec rm '{}' ';'
}
python populate_packages_prepend() {
vpudir = bb.data.expand('${base_libdir}/firmware/vpu', d)
do_split_packages(d, vpudir, '^vpu_fw_([^_]*).*\.bin',
output_pattern='firmware-imx-vpu-%s',
description='Freescale IMX Firmware %s',
extra_depends='',
prepend=True)
sdmadir = bb.data.expand('${base_libdir}/firmware/sdma', d)
do_split_packages(d, sdmadir, '^sdma-([^-]*).*\.bin',
output_pattern='firmware-imx-sdma-%s',
description='Freescale IMX Firmware %s',
extra_depends='',
prepend=True)
}
ALLOW_EMPTY_${PN} = "1"
PACKAGES_DYNAMIC = "${PN}-vpu-* ${PN}-sdma-*"
PACKAGES =+ "${PN}-epdc ${PN}-scfw ${PN}-sdma ${PN}-easrc"
FILES_${PN}-epdc = "${base_libdir}/firmware/imx/epdc/"
FILES_${PN}-scfw = "${base_libdir}/firmware/scfw/"
FILES_${PN}-sdma = " ${base_libdir}/firmware/imx/sdma"
FILES_${PN}-easrc = "${base_libdir}/firmware/imx/easrc/"

View File

@ -0,0 +1,21 @@
SUMMARY = "The firemware for RTL8188FU module"
LICENSE = "GPLv2"
PV = "0.1"
LIC_FILES_CHKSUM = "file://LICENCE;md5=3578920d6ebbe512b039a334114b29a5"
SRC_URI = " \
file://rtl8188fufw.bin \
file://LICENCE \
"
S = "${WORKDIR}"
do_install (){
install -d ${D}${base_libdir}/firmware/rtlwifi
cp -rfv rtl8188fufw.bin ${D}${base_libdir}/firmware/rtlwifi/
}
FILES_${PN} = " \
${base_libdir}/firmware/rtlwifi \
"

View File

@ -0,0 +1 @@
The firmware file from RealTech.

View File

@ -0,0 +1,83 @@
# Copyright 2017-2018 NXP
DESCRIPTION = "i.MX ARM Trusted Firmware"
SECTION = "BSP"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
inherit fsl-eula-unpack pkgconfig deploy
PV = "2.0+git${SRCPV}"
ATF_SRC ?= "git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https"
SRCBRANCH = "imx_4.14.98_2.3.0"
SRC_URI = "${ATF_SRC};branch=${SRCBRANCH}"
SRCREV = "09c5cc994634060ad7dfef4620866838d19694a4"
S = "${WORKDIR}/git"
BOOT_TOOLS = "imx-boot-tools"
SOC_ATF ?= "imx8qm"
SOC_ATF_mx8qm = "imx8qm"
SOC_ATF_mx8qxp = "imx8qx"
SOC_ATF_mx8mq = "imx8mq"
SOC_ATF_mx8mm = "imx8mm"
SOC_ATF_mx8mn = "imx8mn"
SYSROOT_DIRS += "/boot"
BUILD_OPTEE = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'true', 'false', d)}"
do_compile () {
export CROSS_COMPILE="${TARGET_PREFIX}"
cd ${S}
# Clear LDFLAGS to avoid the option -Wl recognize issue
unset LDFLAGS
echo "-> Build ${SOC_ATF} bl31.bin"
# Set BUIL_STRING with the revision info
BUILD_STRING=""
if [ -e ${S}/.revision ]; then
cur_rev=`cat ${S}/.revision`
echo " Current revision is ${cur_rev} ."
BUILD_STRING="BUILD_STRING=${cur_rev}"
else
echo " No .revision found! "
fi
oe_runmake clean PLAT=${SOC_ATF}
oe_runmake ${BUILD_STRING} PLAT=${SOC_ATF} bl31
# Build opteee version
if [ "${BUILD_OPTEE}" = "true" ]; then
oe_runmake clean PLAT=${SOC_ATF} BUILD_BASE=build-optee
oe_runmake ${BUILD_STRING} PLAT=${SOC_ATF} BUILD_BASE=build-optee SPD=opteed bl31
fi
unset CROSS_COMPILE
}
do_install () {
install -d ${D}/boot
install -m 0644 ${S}/build/${SOC_ATF}/release/bl31.bin ${D}/boot/bl31-${SOC_ATF}.bin
# Install opteee version
if [ "${BUILD_OPTEE}" = "true" ]; then
install -m 0644 ${S}/build-optee/${SOC_ATF}/release/bl31.bin ${D}/boot/bl31-${SOC_ATF}.bin-optee
fi
}
do_deploy () {
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0644 ${S}/build/${SOC_ATF}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${SOC_ATF}.bin
# Deploy opteee version
if [ "${BUILD_OPTEE}" = "true" ]; then
install -m 0644 ${S}/build-optee/${SOC_ATF}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${SOC_ATF}.bin-optee
fi
}
addtask deploy before do_install after do_compile
FILES_${PN} = "/boot"
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(mx8)"

View File

@ -0,0 +1,54 @@
# Copyright 2019,2021 i2SOM Tech.
# Use the v4.14 latest BSP branch
SRCBRANCH = "imx_4.14.98_2.3.0"
SRCREV = "2556000499f667123094af22326cfd8e4cbadaac"
# This package aggregates output deployed by other packages,
# so set the appropriate dependencies
do_compile[depends] += " \
firmware-imx-8m:do_deploy \
"
# This package aggregates dependencies with other packages,
# so also define the license dependencies.
do_populate_lic[depends] += " \
virtual/bootloader:do_populate_lic \
imx-atf:do_populate_lic \
firmware-imx-8m:do_populate_lic \
"
IMXBOOT_TARGETS_i2simx8mm = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_ddr4_evk_flexspi', 'flash_ddr4_evk', d)}"
compile_mx8m() {
bbnote 8MQ/8MM boot binary build
for ddr_firmware in ${DDR_FIRMWARE_NAME}; do
bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${BOOT_STAGING} "
cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${BOOT_STAGING}
done
cp ${DEPLOY_DIR_IMAGE}/signed_dp_imx8m.bin ${BOOT_STAGING}
cp ${DEPLOY_DIR_IMAGE}/signed_hdmi_imx8m.bin ${BOOT_STAGING}
cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ${BOOT_STAGING}/u-boot-spl.bin
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING}
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} ${BOOT_STAGING}/u-boot-nodtb.bin
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/mkimage_uboot ${BOOT_STAGING}
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin
bbnote "copy dtb to default filename"
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING}/fsl-imx8mm-ddr4-evk.dtb
}
deploy_mx8m() {
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
#install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ${DEPLOYDIR}/${BOOT_TOOLS}
for ddr_firmware in ${DDR_FIRMWARE_NAME}; do
install -m 0644 ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${DEPLOYDIR}/${BOOT_TOOLS}
done
install -m 0644 ${BOOT_STAGING}/signed_dp_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0644 ${BOOT_STAGING}/signed_hdmi_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0755 ${BOOT_STAGING}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0755 ${BOOT_STAGING}/mkimage_fit_atf.sh ${DEPLOYDIR}/${BOOT_TOOLS}
}
COMPATIBLE_MACHINE = "(mx8m)"

View File

@ -0,0 +1,11 @@
# Copyright (C) 2018-2020 i2SOM Team.
# Use the v4.14 ga BSP branch
SRCBRANCH = "imx_4.14.98_2.3.0"
SRCREV = "2556000499f667123094af22326cfd8e4cbadaac"
do_deploy_append () {
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0755 ${S}/iMX8M/mkimage_imx8 ${DEPLOYDIR}/${BOOT_TOOLS}/mkimage_imx8m
install -m 0755 ${S}/mkimage_imx8 ${DEPLOYDIR}/${BOOT_TOOLS}/mkimage_imx8
}

View File

@ -0,0 +1,25 @@
setenv fdt_file i2som-gw102e.dtb
setenv zimage zimage-gw102d512e4.bin
part uuid mmc ${mmcdev}:${mmcpart} bootpart
# Check the boot source.
if test "${bootpart}" = "${part2_uuid}"; then
# booting recovery on eMMC
setenv initrd_file uramdisk-recovery.img
if mmc dev ${mmcdev}:${mmcpart}; then
if fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${zimage} && fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file} && fatload mmc ${mmcdev}:${mmcpart} ${initrd_addr} ${initrd_file}; then
run bootargs_mmc_linux
bootz ${loadaddr} ${initrd_addr} ${fdt_addr}
fi;
fi;
elif test "${bootpart}" = "${part1_uuid}"; then
# booting linux on eMMC
if mmc dev ${mmcdev}:${mmcpart}; then
if fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${zimage} && fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}; then
run bootargs_mmc_linux
bootz ${loadaddr} - ${fdt_addr}
fi;
fi;
fi

View File

@ -3,26 +3,36 @@
SUMMARY = "U-Boot bootloader with support for i2SOM System-On-Modules"
require recipes-bsp/u-boot/u-boot.inc
PROVIDES += "u-boot"
PACKAGE_BEFORE_PN += "${PN}-env"
RPROVIDES_${PN}-env += "u-boot-default-env"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
DEPENDS += "dtc-native u-boot-mkimage-native"
#DEPENDS += "dtc-native u-boot-mkimage-native"
DEPENDS += "u-boot-mkimage-native"
PROVIDES += "u-boot"
SRCREV = "f7b65711097261b067b04c031e04a7d7e1e8baf3"
SRCBRANCH = "master"
SRCREV = "b4d71ff13b3e392b6e1c6a67f852ec59bc43ef65"
SRCBRANCH = "i2SOM-6ulx"
SRC_URI = "git:///${HOME}/i2SOM/i2SOM-iMX-uboot;protocol=file;branch=${SRCBRANCH}"
#SRCREV = "0d6d8807793e74402e23772062469aeb4808dd48"
#SRCBRANCH = "imx_v2018.03_4.14.98_2.0.0_ga"
#SRC_URI = "git:///${HOME}/i2SOM/uboot-imx;protocol=file;branch=${SRCBRANCH}"
SRC_URI_append = " \
file://boot.txt \
"
S = "${WORKDIR}/git"
LOCALVERSION ?= ""
inherit fsl-u-boot-localversion
LOCALVERSION ?= ""
BOOT_TOOLS = "imx-boot-tools"
do_deploy_append() {
TMP_BOOTSCR="$(mktemp ${WORKDIR}/bootscr.XXXXXX)"
cat ${WORKDIR}/boot.txt > ${TMP_BOOTSCR}

View File

@ -1,290 +0,0 @@
SUMMARY = "Universal Boot Loader for embedded devices"
HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
SECTION = "bootloaders"
PROVIDES = "virtual/bootloader"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://Licenses/README;md5=0507cd7da8e7ad6d6701926ec9b84c95"
SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
S = "${WORKDIR}/git"
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit uboot-config deploy
EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1'
EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
PACKAGECONFIG ??= "openssl"
# u-boot will compile its own tools during the build, with specific
# configurations (aka when CONFIG_FIT_SIGNATURE is enabled) openssl is needed as
# a host build dependency.
PACKAGECONFIG[openssl] = ",,openssl-native"
# Allow setting an additional version string that will be picked up by the
# u-boot build system and appended to the u-boot version. If the .scmversion
# file already exists it will not be overwritten.
UBOOT_LOCALVERSION ?= ""
# Some versions of u-boot use .bin and others use .img. By default use .bin
# but enable individual recipes to change this value.
UBOOT_SUFFIX ??= "bin"
UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
UBOOT_MAKE_TARGET ?= "all"
# Output the ELF generated. Some platforms can use the ELF file and directly
# load it (JTAG booting, QEMU) additionally the ELF can be used for debugging
# purposes.
UBOOT_ELF ?= ""
UBOOT_ELF_SUFFIX ?= "elf"
UBOOT_ELF_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}"
UBOOT_ELF_BINARY ?= "u-boot.${UBOOT_ELF_SUFFIX}"
UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}"
# Some versions of u-boot build an SPL (Second Program Loader) image that
# should be packaged along with the u-boot binary as well as placed in the
# deploy directory. For those versions they can set the following variables
# to allow packaging the SPL.
SPL_BINARY ?= ""
SPL_IMAGE ?= "${SPL_BINARY}-${MACHINE}-${PV}-${PR}"
SPL_SYMLINK ?= "${SPL_BINARY}-${MACHINE}"
# Additional environment variables or a script can be installed alongside
# u-boot to be used automatically on boot. This file, typically 'uEnv.txt'
# or 'boot.scr', should be packaged along with u-boot as well as placed in the
# deploy directory. Machine configurations needing one of these files should
# include it in the SRC_URI and set the UBOOT_ENV parameter.
UBOOT_ENV_SUFFIX ?= "txt"
UBOOT_ENV ?= ""
UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}"
UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}"
UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}"
do_compile () {
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then
sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' config.mk
fi
unset LDFLAGS
unset CFLAGS
unset CPPFLAGS
if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]
then
echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion
echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
fi
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
i=`expr $i + 1`;
for type in ${UBOOT_CONFIG}; do
j=`expr $j + 1`;
if [ $j -eq $i ]
then
oe_runmake O=build_${config} ${config}
oe_runmake O=build_${config} ${UBOOT_MAKE_TARGET}
cp ${S}/build_${config}/${UBOOT_BINARY} ${S}/buidl_${config}/u-boot-${type}.${UBOOT_SUFFIX}
fi
done
unset j
done
unset i
else
oe_runmake ${UBOOT_MACHINE}
oe_runmake ${UBOOT_MAKE_TARGET}
fi
}
do_install () {
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
i=`expr $i + 1`;
for type in ${UBOOT_CONFIG}; do
j=`expr $j + 1`;
if [ $j -eq $i ]
then
install -d ${D}/boot
install ${S}/build_${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
fi
done
unset j
done
unset i
else
install -d ${D}/boot
install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
fi
if [ "x${UBOOT_ELF}" != "x" ]
then
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
i=`expr $i + 1`;
for type in ${UBOOT_CONFIG}; do
j=`expr $j + 1`;
if [ $j -eq $i ]
then
install ${S}/build_${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}
fi
done
unset j
done
unset i
else
install ${S}/${UBOOT_ELF} ${D}/boot/${UBOOT_ELF_IMAGE}
ln -sf ${UBOOT_ELF_IMAGE} ${D}/boot/${UBOOT_ELF_BINARY}
fi
fi
if [ -e ${WORKDIR}/fw_env.config ] ; then
install -d ${D}${sysconfdir}
install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
fi
if [ "x${SPL_BINARY}" != "x" ]
then
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
i=`expr $i + 1`;
for type in ${UBOOT_CONFIG}; do
j=`expr $j + 1`;
if [ $j -eq $i ]
then
install ${S}/build_${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY}-${type}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY}
fi
done
unset j
done
unset i
else
install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY}
fi
fi
if [ "x${UBOOT_ENV}" != "x" ]
then
install ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE}
ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY}
fi
}
FILES_${PN} = "/boot ${sysconfdir}"
# Ensure the split debug part of any elf files are put into dbg
FILES_${PN}-dbg += "/boot/.debug"
do_deploy () {
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
i=`expr $i + 1`;
for type in ${UBOOT_CONFIG}; do
j=`expr $j + 1`;
if [ $j -eq $i ]
then
install -d ${DEPLOYDIR}
install ${S}/build_${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
cd ${DEPLOYDIR}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
fi
done
unset j
done
unset i
else
install -d ${DEPLOYDIR}
install ${S}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
cd ${DEPLOYDIR}
rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
fi
if [ "x${UBOOT_ELF}" != "x" ]
then
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
i=`expr $i + 1`;
for type in ${UBOOT_CONFIG}; do
j=`expr $j + 1`;
if [ $j -eq $i ]
then
install ${S}/build_${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}
fi
done
unset j
done
unset i
else
install ${S}/${UBOOT_ELF} ${DEPLOYDIR}/${UBOOT_ELF_IMAGE}
ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}
ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}
fi
fi
if [ "x${SPL_BINARY}" != "x" ]
then
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
i=`expr $i + 1`;
for type in ${UBOOT_CONFIG}; do
j=`expr $j + 1`;
if [ $j -eq $i ]
then
install ${S}/build_${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR}
rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY}-${type}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}
fi
done
unset j
done
unset i
else
install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}
ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY}
ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
fi
fi
if [ "x${UBOOT_ENV}" != "x" ]
then
install ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE}
rm -f ${DEPLOYDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK}
ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY}
ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK}
fi
}
addtask deploy before do_build after do_compile

View File

@ -0,0 +1,26 @@
# Copyright (C) 2017 i2SOM Team.
SUMMARY = "The driver for RTL8188FU USB WiFi"
DESCRIPTION = "rtl8188fu USB WiFi"
LICENSE = "GPLv2"
#PV = "v2017.01.11"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
inherit module
SRCBRANCH = "master"
SRCREV = "8df97008dd2696e9cb880bc3e388894edddb3a38"
#GIT_URI = "git://github.com/i2som/RTL8188FU.git"
GIT_URI = "git://github.com/i2som/rtl8188fu-linux.git"
SRC_URI = " \
${GIT_URI};branch=${SRCBRANCH} \
"
S = "${WORKDIR}/git"
#KERNEL_MODULE_PROBECONF += "rtl8188fu"
#module_conf_rtl8188fu = "options rtl8188fu rtw_power_mgnt=0 rtw_enusbss=0"
EXTRA_OEMAKE += "KSRC=${STAGING_KERNEL_DIR}"

View File

@ -0,0 +1,464 @@
CONFIG_KERNEL_LZO=y
CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=18
CONFIG_CGROUPS=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PERF_EVENTS=y
# CONFIG_SLUB_DEBUG is not set
# CONFIG_COMPAT_BRK is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_ARCH_MXC=y
CONFIG_SOC_IMX50=y
CONFIG_SOC_IMX53=y
CONFIG_SOC_IMX6Q=y
CONFIG_SOC_IMX6SL=y
CONFIG_SOC_IMX6SX=y
CONFIG_SOC_IMX6ULL=y
CONFIG_SOC_IMX7D=y
CONFIG_SOC_IMX6SLL=y
CONFIG_SOC_IMX7ULP=y
CONFIG_SOC_VF610=y
# CONFIG_SWP_EMULATE is not set
CONFIG_SMP=y
CONFIG_VMSPLIT_2G=y
CONFIG_ARM_PSCI=y
CONFIG_PREEMPT=y
CONFIG_HIGHMEM=y
CONFIG_CMA=y
CONFIG_CMDLINE="noinitrd console=ttymxc0,115200"
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_INTERACTIVE=y
CONFIG_CPUFREQ_DT=y
CONFIG_ARM_IMX6Q_CPUFREQ=y
CONFIG_ARM_IMX7ULP_CPUFREQ=y
CONFIG_CPU_IDLE=y
CONFIG_VFP=y
CONFIG_NEON=y
CONFIG_BINFMT_MISC=m
CONFIG_PM_DEBUG=y
CONFIG_PM_TEST_SUSPEND=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
CONFIG_VLAN_8021Q=y
CONFIG_LLC2=y
CONFIG_CAN=y
CONFIG_CAN_FLEXCAN=y
CONFIG_CAN_M_CAN=y
CONFIG_BT=y
CONFIG_BT_RFCOMM=y
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=y
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_HIDP=y
CONFIG_BT_HCIBTUSB=y
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_BCSP=y
CONFIG_BT_HCIUART_ATH3K=y
CONFIG_BT_HCIBCM203X=y
CONFIG_BT_ATH3K=y
CONFIG_CFG80211=y
CONFIG_NL80211_TESTMODE=y
CONFIG_CFG80211_INTERNAL_REGDB=y
CONFIG_CFG80211_WEXT=y
CONFIG_MAC80211=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_STANDALONE is not set
CONFIG_DMA_CMA=y
CONFIG_CMA_SIZE_MBYTES=0
CONFIG_IMX_WEIM=y
CONFIG_CONNECTOR=y
CONFIG_MTD=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=y
CONFIG_MTD_JEDECPROBE=y
CONFIG_MTD_CFI_INTELEXT=y
CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_CFI_STAA=y
CONFIG_MTD_PHYSMAP_OF=y
CONFIG_MTD_DATAFLASH=y
CONFIG_MTD_M25P80=y
CONFIG_MTD_SST25L=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_GPMI_NAND=y
CONFIG_MTD_NAND_MXC=y
CONFIG_MTD_SPI_NOR=y
# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set
CONFIG_SPI_FSL_QUADSPI=y
CONFIG_MTD_UBI=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=65536
CONFIG_SENSORS_FXOS8700=y
CONFIG_SENSORS_FXAS2100X=y
CONFIG_EEPROM_AT24=y
CONFIG_EEPROM_AT25=y
# CONFIG_SCSI_PROC_FS is not set
CONFIG_BLK_DEV_SD=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SCAN_ASYNC=y
# CONFIG_SCSI_LOWLEVEL is not set
CONFIG_ATA=y
CONFIG_SATA_AHCI_PLATFORM=y
CONFIG_AHCI_IMX=y
CONFIG_PATA_IMX=y
CONFIG_NETDEVICES=y
# CONFIG_NET_VENDOR_BROADCOM is not set
CONFIG_CS89x0=y
CONFIG_CS89x0_PLATFORM=y
# CONFIG_NET_VENDOR_FARADAY is not set
# CONFIG_NET_VENDOR_INTEL is not set
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_MICROCHIP is not set
# CONFIG_NET_VENDOR_NATSEMI is not set
# CONFIG_NET_VENDOR_SEEQ is not set
CONFIG_SMC91X=y
CONFIG_SMC911X=y
CONFIG_SMSC911X=y
# CONFIG_NET_VENDOR_STMICRO is not set
CONFIG_MICREL_PHY=y
CONFIG_USB_KAWETH=y
CONFIG_USB_PEGASUS=y
CONFIG_USB_RTL8150=y
CONFIG_USB_RTL8152=y
CONFIG_USB_USBNET=y
CONFIG_USB_NET_CDC_EEM=m
CONFIG_ATH6KL=m
CONFIG_ATH6KL_SDIO=m
CONFIG_BRCMFMAC=m
CONFIG_HOSTAP=y
CONFIG_INPUT_EVDEV=y
CONFIG_INPUT_EVBUG=m
CONFIG_KEYBOARD_GPIO=y
CONFIG_KEYBOARD_RPMSG=y
CONFIG_KEYBOARD_PF1550_ONKEY=y
CONFIG_KEYBOARD_IMX=y
CONFIG_MOUSE_PS2=m
CONFIG_MOUSE_PS2_ELANTECH=y
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_ADS7846=y
CONFIG_TOUCHSCREEN_EGALAX=y
CONFIG_TOUCHSCREEN_ELAN_TS=y
CONFIG_TOUCHSCREEN_GOODIX=y
CONFIG_TOUCHSCREEN_MAX11801=y
CONFIG_TOUCHSCREEN_IMX6UL_TSC=y
CONFIG_TOUCHSCREEN_MC13783=y
CONFIG_TOUCHSCREEN_TSC2007=y
CONFIG_TOUCHSCREEN_STMPE=y
CONFIG_TOUCHSCREEN_FTS=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_MMA8450=y
CONFIG_INPUT_MPL3115=y
CONFIG_SENSOR_FXLS8471=y
CONFIG_SENSOR_IMX_RPMSG=y
CONFIG_INPUT_ISL29023=y
CONFIG_SERIO_SERPORT=m
# CONFIG_LEGACY_PTYS is not set
CONFIG_SERIAL_IMX=y
CONFIG_SERIAL_IMX_CONSOLE=y
CONFIG_SERIAL_FSL_LPUART=y
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
CONFIG_FSL_OTP=y
CONFIG_HW_RANDOM_IMX_RNG=y
# CONFIG_I2C_COMPAT is not set
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MUX_GPIO=y
# CONFIG_I2C_HELPER_AUTO is not set
CONFIG_I2C_ALGOPCF=m
CONFIG_I2C_ALGOPCA=m
CONFIG_I2C_IMX=y
CONFIG_I2C_IMX_LPI2C=y
CONFIG_SPI=y
CONFIG_SPI_FSL_LPSPI=y
CONFIG_SPI_GPIO=y
CONFIG_SPI_IMX=y
CONFIG_SPI_SPIDEV=y
CONFIG_SPI_SLAVE=y
CONFIG_SPI_SLAVE_TIME=y
CONFIG_SPI_SLAVE_SYSTEM_CONTROL=y
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_IMX_RPMSG=y
CONFIG_GPIO_MAX732X=y
CONFIG_GPIO_PCA953X=y
CONFIG_GPIO_74X164=y
CONFIG_POWER_RESET=y
CONFIG_POWER_RESET_SYSCON_POWEROFF=y
CONFIG_POWER_SUPPLY=y
CONFIG_CHARGER_PF1550=y
CONFIG_SABRESD_MAX8903=y
CONFIG_SENSORS_MAX17135=y
CONFIG_SENSORS_MAG3110=y
CONFIG_THERMAL=y
CONFIG_THERMAL_WRITABLE_TRIPS=y
CONFIG_CPU_THERMAL=y
CONFIG_IMX_THERMAL=y
CONFIG_DEVICE_THERMAL=y
CONFIG_WATCHDOG=y
CONFIG_IMX2_WDT=y
CONFIG_IMX7ULP_WDT=y
CONFIG_MFD_DA9052_I2C=y
CONFIG_MFD_MC13XXX_SPI=y
CONFIG_MFD_MC13XXX_I2C=y
CONFIG_MFD_PF1550=y
CONFIG_MFD_MAX17135=y
CONFIG_MFD_SI476X_CORE=y
CONFIG_MFD_STMPE=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_ANATOP=y
CONFIG_REGULATOR_DA9052=y
CONFIG_REGULATOR_GPIO=y
CONFIG_REGULATOR_MAX17135=y
CONFIG_REGULATOR_MC13783=y
CONFIG_REGULATOR_MC13892=y
CONFIG_REGULATOR_PFUZE100=y
CONFIG_REGULATOR_PF1550=y
CONFIG_REGULATOR_PF1550_RPMSG=y
CONFIG_RC_DEVICES=y
CONFIG_IR_GPIO_CIR=y
CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_RADIO_SUPPORT=y
CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_USB_VIDEO_CLASS=m
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_VIDEO_MXC_OUTPUT=y
CONFIG_VIDEO_MXC_CAPTURE=m
CONFIG_VIDEO_MXC_CSI_CAMERA=m
CONFIG_MXC_VADC=m
CONFIG_MXC_MIPI_CSI=m
CONFIG_MXC_CAMERA_OV5640=m
CONFIG_MXC_CAMERA_OV5640_V2=m
CONFIG_MXC_CAMERA_OV5642=m
CONFIG_MXC_CAMERA_OV5640_MIPI=m
CONFIG_MXC_CAMERA_OV5640_MIPI_V2=m
CONFIG_MXC_CAMERA_OV5647_MIPI=m
CONFIG_MXC_TVIN_ADV7180=m
CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m
CONFIG_VIDEO_MXC_IPU_OUTPUT=y
CONFIG_VIDEO_MXC_PXP_V4L2=y
CONFIG_SOC_CAMERA=y
CONFIG_V4L_MEM2MEM_DRIVERS=y
CONFIG_VIDEO_CODA=y
CONFIG_RADIO_SI476X=y
CONFIG_DRM=y
CONFIG_DRM_VIVANTE=y
CONFIG_FB_MXS=y
CONFIG_FB_MXC_SYNC_PANEL=y
CONFIG_FB_MXC_OVERLAY=y
CONFIG_FB_MXC_MIPI_DSI=y
CONFIG_FB_MXC_MIPI_DSI_SAMSUNG=y
CONFIG_FB_MXC_MIPI_DSI_NORTHWEST=y
CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y
CONFIG_FB_MXC_TRULY_PANEL_TFT3P5079E=y
CONFIG_FB_MXC_TRULY_PANEL_TFT3P5581E=y
CONFIG_FB_MXC_RK_PANEL_RK055AHD042=y
CONFIG_FB_MXC_RK_PANEL_RK055IQH042=y
CONFIG_FB_MXC_LDB=y
CONFIG_FB_MXC_HDMI=y
CONFIG_FB_MXS_SII902X=y
CONFIG_FB_MXC_DCIC=m
CONFIG_FB_MXC_ADV7535=y
CONFIG_HANNSTAR_CABC=y
CONFIG_FB_MXC_EINK_PANEL=y
CONFIG_FB_MXC_EINK_V2_PANEL=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_LCD_L4F00242T03=y
CONFIG_LCD_PLATFORM=y
CONFIG_BACKLIGHT_PWM=y
CONFIG_BACKLIGHT_GPIO=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_LOGO=y
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_USB_AUDIO=m
CONFIG_SND_SOC=y
CONFIG_SND_IMX_SOC=y
CONFIG_SND_SOC_EUKREA_TLV320=y
CONFIG_SND_SOC_IMX_WM8960=y
CONFIG_SND_SOC_IMX_SII902X=y
CONFIG_SND_SOC_IMX_WM8958=y
CONFIG_SND_SOC_IMX_CS42888=y
CONFIG_SND_SOC_IMX_WM8962=y
CONFIG_SND_SOC_IMX_RPMSG=y
CONFIG_SND_SOC_IMX_SGTL5000=y
CONFIG_SND_SOC_IMX_MQS=y
CONFIG_SND_SOC_IMX_SPDIF=y
CONFIG_SND_SOC_IMX_MC13783=y
CONFIG_SND_SOC_IMX_SI476X=y
CONFIG_SND_SOC_IMX_HDMI=y
CONFIG_USB=y
CONFIG_USB_OTG_WHITELIST=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_MXC=y
CONFIG_USB_HCD_TEST_MODE=y
CONFIG_USB_ACM=m
CONFIG_USB_STORAGE=y
CONFIG_USB_CHIPIDEA=y
CONFIG_USB_CHIPIDEA_UDC=y
CONFIG_USB_CHIPIDEA_HOST=y
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_FTDI_SIO=m
CONFIG_USB_SERIAL_OPTION=m
CONFIG_USB_TEST=m
CONFIG_USB_EHSET_TEST_FIXTURE=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_USB_MXS_PHY=y
CONFIG_USB_GADGET=y
CONFIG_USB_CONFIGFS=y
CONFIG_USB_CONFIGFS_SERIAL=y
CONFIG_USB_CONFIGFS_ACM=y
CONFIG_USB_CONFIGFS_OBEX=y
CONFIG_USB_CONFIGFS_NCM=y
CONFIG_USB_CONFIGFS_ECM=y
CONFIG_USB_CONFIGFS_ECM_SUBSET=y
CONFIG_USB_CONFIGFS_RNDIS=y
CONFIG_USB_CONFIGFS_EEM=y
CONFIG_USB_CONFIGFS_MASS_STORAGE=y
CONFIG_FSL_UTP=y
CONFIG_USB_CONFIGFS_F_LB_SS=y
CONFIG_USB_CONFIGFS_F_FS=y
CONFIG_USB_ZERO=m
CONFIG_USB_ETH=m
CONFIG_USB_G_NCM=m
CONFIG_USB_GADGETFS=m
CONFIG_USB_MASS_STORAGE=m
CONFIG_USB_G_SERIAL=m
CONFIG_MMC=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SDHCI_ESDHC_IMX=y
CONFIG_MXC_SIM=y
CONFIG_MXC_SIMv2=y
CONFIG_MXC_IPU=y
CONFIG_MXC_IPU_V3_PRE=y
CONFIG_MXC_MIPI_CSI2=y
CONFIG_MXC_HDMI_CEC=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_TRIGGER_ONESHOT=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_BACKLIGHT=y
CONFIG_LEDS_TRIGGER_GPIO=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_INTF_DEV_UIE_EMUL=y
CONFIG_RTC_DRV_MC13XXX=y
CONFIG_RTC_DRV_MXC=y
CONFIG_RTC_DRV_SNVS=y
CONFIG_RTC_DRV_IMX_RPMSG=y
CONFIG_DMADEVICES=y
CONFIG_FSL_EDMA=y
CONFIG_IMX_SDMA=y
CONFIG_MXS_DMA=y
CONFIG_MXC_PXP_V2=y
CONFIG_MXC_PXP_V3=y
CONFIG_DMATEST=m
CONFIG_STAGING=y
CONFIG_STAGING_MEDIA=y
# CONFIG_IOMMU_SUPPORT is not set
CONFIG_EXTCON_USB_GPIO=y
CONFIG_IIO=y
CONFIG_IMX7D_ADC=y
CONFIG_VF610_ADC=y
CONFIG_PWM=y
CONFIG_PWM_IMX=y
CONFIG_PWM_TPM=y
CONFIG_TEE=y
CONFIG_OPTEE=y
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_PRINT_QUOTA_WARNING is not set
CONFIG_AUTOFS4_FS=y
CONFIG_FUSE_FS=y
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_UDF_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
CONFIG_JFFS2_FS=y
CONFIG_UBIFS_FS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_ROOT_NFS=y
CONFIG_NLS_DEFAULT="cp437"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_UTF8=y
CONFIG_DEBUG_FS=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_SCHED_DEBUG is not set
# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_FTRACE is not set
CONFIG_SECURITYFS=y
CONFIG_CRYPTO_USER=y
CONFIG_CRYPTO_TEST=m
CONFIG_CRYPTO_CTS=y
CONFIG_CRYPTO_LRW=y
CONFIG_CRYPTO_XTS=y
CONFIG_CRYPTO_MD4=y
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_RMD128=y
CONFIG_CRYPTO_RMD160=y
CONFIG_CRYPTO_RMD256=y
CONFIG_CRYPTO_RMD320=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_TGR192=y
CONFIG_CRYPTO_WP512=y
CONFIG_CRYPTO_BLOWFISH=y
CONFIG_CRYPTO_CAMELLIA=y
CONFIG_CRYPTO_TWOFISH=y
CONFIG_CRYPTO_DEV_FSL_CAAM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=y
CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y
CONFIG_CRYPTO_DEV_MXS_DCP=y
CONFIG_CRC_CCITT=m
CONFIG_CRC_T10DIF=y
CONFIG_CRC7=m
CONFIG_LIBCRC32C=m
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y

View File

@ -0,0 +1,39 @@
SUMMARY = "Linux kernel for i2SOM system on modules"
require recipes-kernel/linux/linux-imx.inc
#require recipes-kernel/linux/linux-dtb.inc
DEPENDS += "lzop-native bc-native"
LOCALVERSION = "-v1.0"
#SRCREV = "1175b59611537b0b451e0d1071b1666873a8ec32"
#SRCBRANCH = "imx_4.14.98_2.0.0_ga"
#SRCREV = "807971320f4a7ee5b1f194403d715ff41e73a1bb"
#SRCBRANCH = "yunkong-imdc"
SRCREV = "4e3c47e38e9b0b2d6bf2766f1d39071564f8a378"
SRCBRANCH = "i2som_imx_4.14.98_2.3.0"
SRC_URI = "git:///${HOME}/i2SOM/i2SOM-iMX-Linux-4.14;protocol=file;branch=${SRCBRANCH}"
#SRC_URI = "git:///${HOME}/i2SOM/i2SOM-iMX-Linux;protocol=file;branch=${SRCBRANCH}
#SRC_URI = "git:///${HOME}/i2SOM/linux-imx;protocol=file;branch=${SRCBRANCH} \
# file://defconfig"
SRC_URI += "${@oe.utils.conditional('KERNEL_DEFCONFIG', '', 'file://defconfig', '', d)}"
#KBUILD_DEFCONFIG ?= "i2som_imx6_defconfig"
# Load USB functions configurable through configfs (CONFIG_USB_CONFIGFS)
KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('COMBINED_FEATURES', 'usbgadget', ' libcomposite', '',d)}"
S = "${WORKDIR}/git"
do_copy_defconfig[vardeps] += "KERNEL_DEFCONFIG"
do_copy_defconfig[dirs] = "${S}"
do_copy_defconfig () {
if [ -n "${KERNEL_DEFCONFIG}" ]; then
cp -f ${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig
fi
}
addtask copy_defconfig after do_patch before do_preconfigure
COMPATIBLE_MACHINE = "(mx8mm|mx6ul|mx6ull)"

View File

@ -31,4 +31,4 @@ inherit ${@bb.utils.contains("IMAGE_FEATURES", "i2som-qt", "populate_sdk_qt5", "
# Generate ZIP installer if configured in the project's local.conf
#
I2SOM_IMAGE_INSTALLER ?= "0"
inherit ${@base_conditional("I2SOM_IMAGE_INSTALLER", "1", "i2som-image-installer", "", d)}
inherit ${@oe.utils.conditional("I2SOM_IMAGE_INSTALLER", "1", "i2som-image-installer", "", d)}

View File

@ -15,7 +15,7 @@ DISTRO_VERSION[vardepsexclude] = "DATE"
SDK_VERSION[vardepsexclude] = "DATE"
# Override these in poky based distros
POKY_DEFAULT_DISTRO_FEATURES = "largefile opengl ptest multiarch wayland bluez5 cellular"
POKY_DEFAULT_DISTRO_FEATURES = "largefile opengl ptest multiarch wayland bluez5 cellular systemd"
POKY_DEFAULT_EXTRA_RDEPENDS = "packagegroup-i2som-core"
POKY_DEFAULT_EXTRA_RRECOMMENDS = ""
@ -47,6 +47,11 @@ FEATURE_PACKAGES_i2som-wireless = "packagegroup-i2som-wireless"
PREFERRED_PROVIDER_jpeg ?= "jpeg"
PREFERRED_PROVIDER_jpeg_armv7a ?= "libjpeg-turbo"
# Some features (swupdate, environment encryption) depends on this specific
# provider for u-boot-fw-tools
#PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-fw-utils"
PREFERRED_PROVIDER_u-boot-fw-utils ?= "libubootenv"
PREFERRED_VERSION_linux-yocto ?= "4.8%"
PREFERRED_VERSION_linux-yocto_qemux86 ?= "4.8%"
PREFERRED_VERSION_linux-yocto_qemux86-64 ?= "4.8%"

View File

@ -16,3 +16,5 @@ BBFILE_PRIORITY_i2som-yocto = "6"
LAYERDEPENDS_i2som-yocto = "core i2som-nxp"
LAYERDEPENDS_i2som-yocto += "openembedded-layer networking-layer webserver qt5-layer swupdate"
LAYERSERIES_COMPAT_i2som-yocto = "thud"

View File

@ -0,0 +1,28 @@
DESCRIPTION = "Chirpstack Gateway Bridge"
HOMEPAGE = "https://www.chirpstack.io/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=99e425257f8a67b7efd81dc0009ed8ff"
SRC_URI = "https://artifacts.chirpstack.io/downloads/chirpstack-gateway-bridge/chirpstack-gateway-bridge_3.10.0_linux_armv7.tar.gz"
SRC_URI[md5sum] = "46b0a4db6e9105d6756e9bb744cd9ad9"
SRC_URI[sha256sum] = "4a486559fbe04f30f6aaad939a4009f457e76e4c0c65613f753a129909a33f7f"
SRC_URI += "file://chirpstack-gateway-bridge.service"
SRC_URI += "file://chirpstack-gateway-bridge.toml"
INSANE_SKIP_${PN} += "already-stripped"
S = "${WORKDIR}"
do_install_append() {
install -d ${D}${bindir}
install -m 0755 ${S}/chirpstack-gateway-bridge ${D}${bindir}
install -d ${D}/etc/chirpstack-gateway-bridge
install -m 0640 ${S}/chirpstack-gateway-bridge.toml ${D}/etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml
install -d ${D}/etc/systemd/system/
install -m 0755 ${S}/chirpstack-gateway-bridge.service ${D}/etc/systemd/system/
}
FILES_${PN} += "${bindir}"

View File

@ -0,0 +1,12 @@
[Unit]
Description=Chirpstack Gateway Bridge
Documentation=https://www.chirpstack.io/
[Service]
WorkingDirectory=/usr/bin/
ExecStart=/usr/bin/chirpstack-gateway-bridge
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,59 @@
# This configuration provides a Semtech UDP packet-forwarder backend and
# integrates with a MQTT broker. Many options and defaults have been omitted
# for simplicity.
#
# See https://www.loraserver.io/lora-gateway-bridge/install/config/ for a full
# configuration example and documentation.
# Gateway backend configuration.
[backend]
# Backend type.
type="semtech_udp"
# Semtech UDP packet-forwarder backend.
[backend.semtech_udp]
# ip:port to bind the UDP listener to
#
# Example: 0.0.0.0:1700 to listen on port 1700 for all network interfaces.
# This is the listeren to which the packet-forwarder forwards its data
# so make sure the 'serv_port_up' and 'serv_port_down' from your
# packet-forwarder matches this port.
udp_bind = "0.0.0.0:1700"
# Integration configuration.
[integration]
# Payload marshaler.
#
# This defines how the MQTT payloads are encoded. Valid options are:
# * protobuf: Protobuf encoding (this will become the LoRa Gateway Bridge v3 default)
# * json: JSON encoding (easier for debugging, but less compact than 'protobuf')
marshaler="protobuf"
# MQTT integration configuration.
[integration.mqtt]
# Event topic template.
event_topic_template="gateway/{{ .GatewayID }}/event/{{ .EventType }}"
# Command topic template.
command_topic_template="gateway/{{ .GatewayID }}/command/#"
# MQTT authentication.
[integration.mqtt.auth]
# Type defines the MQTT authentication type to use.
#
# Set this to the name of one of the sections below.
type="generic"
# Generic MQTT authentication.
[integration.mqtt.auth.generic]
# MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws)
server="tcp://127.0.0.1:1883"
# Connect with the given username (optional)
username=""
# Connect with the given password (optional)
password=""

View File

@ -0,0 +1,28 @@
DESCRIPTION = "Chirpstack Gateway MQTT Forwarder"
HOMEPAGE = "https://www.chirpstack.io/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "https://artifacts.chirpstack.io/downloads/chirpstack-mqtt-forwarder/chirpstack-mqtt-forwarder_4.1.0_linux_armv7hf.tar.gz"
SRC_URI[md5sum] = "7e9ea59f5efd4f1f8124f27edd2e8f9a"
SRC_URI[sha256sum] = "078c430bf27e66f37a944724668d2ccea3953a556f52fdc0ce544408e85b6c6e"
SRC_URI += "file://chirpstack-mqtt-forwarder.service"
SRC_URI += "file://chirpstack-mqtt-forwarder.toml"
INSANE_SKIP_${PN} += "already-stripped"
S = "${WORKDIR}"
do_install_append() {
install -d ${D}${bindir}
install -m 0755 ${S}/chirpstack-mqtt-forwarder ${D}${bindir}
install -d ${D}/etc/
install -m 0640 ${S}/chirpstack-mqtt-forwarder.toml ${D}/etc/
install -d ${D}/lib/systemd/system/
install -m 0755 ${S}/chirpstack-mqtt-forwarder.service ${D}/${base_libdir}/systemd/system/
}
FILES_${PN} += "${bindir} ${base_libdir}"

View File

@ -0,0 +1,12 @@
[Unit]
Description=Chirpstack MQTT Forwarder
Documentation=https://www.chirpstack.io/
[Service]
WorkingDirectory=/etc
ExecStart=/usr/bin/chirpstack-mqtt-forwarder -c /etc/chirpstack-mqtt-forwarder.toml
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,191 @@
# Logging settings.
[logging]
# Log level.
#
# Valid options are:
# * TRACE
# * DEBUG
# * INFO
# * WARN
# * ERROR
# * OFF
level="info"
# Log to syslog.
#
# If set to true, log messages are being written to syslog instead of stdout.
log_to_syslog=false
# MQTT settings.
[mqtt]
# Topic prefix.
#
# ChirpStack MQTT Forwarder publishes to the following topics:
#
# * [Prefix/]gateway/[Gateway ID]/event/[Event]
# * [Prefix/]gateway/[Gateway ID]/state/[State]
#
# And subscribes to the following topic:
#
# * [Prefix/]gateway/[Gateway ID]/command/[Command]
#
# The topic prefix can be used to define the region of the gateway.
# Note, there is no need to add a trailing '/' to the prefix. The trailing
# '/' is automatically added to the prefix if it is configured.
topic_prefix="cn470"
# Use JSON encoding instead of Protobuf (binary).
#
# Note, only use this for debugging purposes.
json=true
# MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws)
server="tcp://broker.emqx.io:1883"
# Connect with the given username (optional)
username=""
# Connect with the given password (optional)
password=""
# Quality of service level
#
# 0: at most once
# 1: at least once
# 2: exactly once
#
# Note: an increase of this value will decrease the performance.
# For more information: https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels
qos=0
# Clean session
#
# Set the "clean session" flag in the connect message when this client
# connects to an MQTT broker. By setting this flag you are indicating
# that no messages saved by the broker for this client should be delivered.
clean_session=false
# Client ID
#
# Set the client id to be used by this client when connecting to the MQTT
# broker. A client id must be no longer than 23 characters. If left blank,
# a random id will be generated by ChirpStack.
client_id="gw102lorawan"
# CA certificate file (optional)
#
# Use this when setting up a secure connection (when server uses ssl://...)
# but the certificate used by the server is not trusted by any CA certificate
# on the server (e.g. when self generated).
ca_cert=""
# TLS certificate file (optional)
tls_cert=""
# TLS key file (optional)
tls_key=""
# Backend configuration.
[backend]
# Enabled backend.
#
# Set this to the backend that must be used by the ChirpStack MQTT Forwarder.
# Valid options are:
# * concentratord
# * semtech_udp
enabled="semtech_udp"
# Filters.
[backend.filters]
# Forward CRC ok.
forward_crc_ok=true
# Forward CRC invalid.
forward_crc_invalid=false
# Forward CRC missing.
forward_crc_missing=false
# DevAddr prefix filters.
#
# Example configuration:
# dev_addr_prefixes=["0000ff00/24"]
#
# The above filter means that the 24MSB of 0000ff00 will be used to
# filter DevAddrs. Uplinks with DevAddrs that do not match any of the
# configured filters will not be forwarded. Leaving this option empty
# disables filtering on DevAddr.
dev_addr_prefixes=[
]
# JoinEUI prefix filters.
#
# Example configuration:
# join_eui_prefixes=["0000ff0000000000/24"]
#
# The above filter means that the 24MSB of 0000ff0000000000 will be used
# to filter JoinEUIs. Uplinks with JoinEUIs that do not match any of the
# configured filters will not be forwarded. Leaving this option empty
# disables filtering on JoinEUI.
join_eui_prefixes=[
]
# ChirpStack Concentratord backend configuration.
[backend.concentratord]
# Event API URL.
event_url="ipc:///tmp/concentratord_event"
# Command API URL.
command_url="ipc:///tmp/concentratord_command"
# Semtech UDP backend configuration.
[backend.semtech_udp]
# ip:port to bind the UDP listener to.
#
# Example: 0.0.0.0:1700 to listen on port 1700 for all network interfaces.
# This is the listener to which the packet-forwarder forwards its data
# so make sure the 'serv_port_up' and 'serv_port_down' from your
# packet-forwarder matches this port.
bind="127.0.0.1:1700"
# Time fallback.
#
# In case the UDP packet-forwarder does not set the 'time' field, then the
# server-time will be used as fallback if this option is enabled.
time_fallback_enabled=false
# Gateway metadata configuration.
[metadata]
# Static key / value metadata.
[metadata.static]
# Example:
# serial_number="1234"
# Commands returning metadata.
[metadata.commands]
# Example:
# datetime=["date", "-R"]
# Executable commands.
[commands]
# Example:
# reboot=["/usr/bin/reboot"]

View File

@ -0,0 +1,68 @@
SUMMARY = "LoRa Gateway project"
SECTION = "libs/network"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a2bdef95625509f821ba00460e3ae0eb"
SRC_URI = "https://github.com/Lora-net/lora_gateway/archive/v${PV}.tar.gz"
SRC_URI[md5sum] = "5d07f8471e1a67920787e3879afe0cb6"
SRC_URI[sha256sum] = "1a0447d5e8183d08e6dce5f739f6872b9c57824b98f4078830d5ee21b15782c1"
S = "${WORKDIR}/lora_gateway-${PV}"
CFLAGS_append = "-I ${S}/libloragw/inc -I ${S}/libloragw -I ${S}/util_pkt_logger/inc "
do_install() {
install -d ${D}${bindir}
install -d ${D}${docdir}
install -d ${D}${libdir}/libloragw/inc
install -d ${D}${includedir}/libloragw
install -D -m 0644 ${B}/libloragw/inc/* ${D}${includedir}/libloragw
install -D -m 0644 ${B}/libloragw/inc/* ${D}${libdir}/libloragw/inc
install -D -m 0644 ${B}/libloragw/libloragw.a ${D}${libdir}/libloragw/libloragw.a
install -D -m 0644 ${S}/libloragw/library.cfg ${D}${libdir}/libloragw/library.cfg
install ${B}/libloragw/test_* ${D}${bindir}
install ${B}/util_*/util_* ${D}${bindir}
install ${S}/*.sh ${D}${bindir}
install -D -m 0644 ${S}/readme.md ${D}${docdir}/libloragw/changelog.md
install -D -m 0644 ${S}/libloragw/readme.md ${D}${docdir}/libloragw/README.md
install -D -m 0644 ${S}/util_lbt_test/readme.md ${D}${docdir}/libloragw/util_lbt_test.md
install -D -m 0644 ${S}/util_pkt_logger/readme.md ${D}${docdir}/libloragw/util_pkt_logger.md
install -D -m 0644 ${S}/util_spectral_scan/readme.md ${D}${docdir}/libloragw/util_spectral_scan.md
install -D -m 0644 ${S}/util_spi_stress/readme.md ${D}${docdir}/libloragw/util_spi_stress.md
install -D -m 0644 ${S}/util_tx_continuous/readme.md ${D}${docdir}/libloragw/util_tx_continuous.md
install -D -m 0644 ${S}/util_tx_test/readme.md ${D}${docdir}/libloragw/util_tx_test.md
install -D -m 0644 ${S}/util_pkt_logger/global_conf.json ${D}${docdir}/libloragw/global_conf.json
install -D -m 0644 ${S}/util_pkt_logger/local_conf.json ${D}${docdir}/libloragw/local_conf.json
}
PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-dev ${PN}-staticdev"
# Avoid QA Issue: No GNU_HASH in the elf binary
INSANE_SKIP_${PN} = "ldflags"
FILES_${PN}-dbg = " \
${bindir}/.debug \
${libdir}/libloragw/.debug \
"
FILES_${PN} = " \
${bindir}/* \
"
FILES_${PN}-dev = " \
${includedir}/libloragw/* \
"
FILES_${PN}-staticdev = " \
${libdir}/libloragw/inc/*.h \
${libdir}/libloragw/*.a \
${libdir}/libloragw/*.cfg \
"
FILES_${PN}-doc = " \
${docdir} \
"

View File

@ -0,0 +1,99 @@
{
"SX130x_conf": {
"com_type": "SPI",
"com_path": "/dev/spidev0.0",
"lorawan_public": true,
"clksrc": 0,
"antenna_gain": 0, /* antenna gain, in dBi */
"full_duplex": false,
"fine_timestamp": {
"enable": false,
"mode": "all_sf" /* high_capacity or all_sf */
},
"radio_0": {
"enable": true,
"type": "SX1250",
"single_input_mode": true,
"freq": 486600000,
"rssi_offset": -207.0,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": true,
"tx_freq_min": 486290000,
"tx_freq_max": 510000000,
"tx_gain_lut":[
{"rf_power": -6, "pa_gain": 0, "pwr_idx": 0},
{"rf_power": -3, "pa_gain": 0, "pwr_idx": 1},
{"rf_power": 0, "pa_gain": 0, "pwr_idx": 2},
{"rf_power": 3, "pa_gain": 1, "pwr_idx": 3},
{"rf_power": 6, "pa_gain": 1, "pwr_idx": 4},
{"rf_power": 10, "pa_gain": 1, "pwr_idx": 5},
{"rf_power": 11, "pa_gain": 1, "pwr_idx": 6},
{"rf_power": 12, "pa_gain": 1, "pwr_idx": 7},
{"rf_power": 13, "pa_gain": 1, "pwr_idx": 8},
{"rf_power": 14, "pa_gain": 1, "pwr_idx": 9},
{"rf_power": 16, "pa_gain": 1, "pwr_idx": 10},
{"rf_power": 20, "pa_gain": 1, "pwr_idx": 11},
{"rf_power": 23, "pa_gain": 1, "pwr_idx": 12},
{"rf_power": 25, "pa_gain": 1, "pwr_idx": 13},
{"rf_power": 26, "pa_gain": 1, "pwr_idx": 14},
{"rf_power": 27, "pa_gain": 1, "pwr_idx": 15}
]
},
"radio_1": {
"enable": true,
"type": "SX1250",
"single_input_mode": true,
"freq": 487400000,
"rssi_offset": -207.0,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": false
},
"chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]},
"chan_multiSF_0": {"enable": true, "radio": 0, "if": -300000},
"chan_multiSF_1": {"enable": true, "radio": 0, "if": -100000},
"chan_multiSF_2": {"enable": true, "radio": 0, "if": 100000},
"chan_multiSF_3": {"enable": true, "radio": 0, "if": 300000},
"chan_multiSF_4": {"enable": true, "radio": 1, "if": -300000},
"chan_multiSF_5": {"enable": true, "radio": 1, "if": -100000},
"chan_multiSF_6": {"enable": true, "radio": 1, "if": 100000},
"chan_multiSF_7": {"enable": true, "radio": 1, "if": 300000},
"chan_Lora_std": {"enable": true, "radio": 1, "if": -200000, "bandwidth": 250000, "spread_factor": 7,
"implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1},
"chan_FSK": {"enable": true, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000}
},
"gateway_conf": {
"gateway_ID": "AA555A0000000000",
"server_address": "localhost",
"serv_port_up": 1730,
"serv_port_down": 1730,
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
"gps_tty_path": "/dev/ttyS0",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
"ref_altitude": 0,
/* Beaconing parameters */
"beacon_period": 0,
"beacon_freq_hz": 869525000,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 14,
"beacon_infodesc": 0
},
"debug_conf": {
"ref_payload":[
{"id": "0xCAFE1234"},
{"id": "0xCAFE2345"}
],
"log_file": "loragw_hal.log"
}
}

View File

@ -0,0 +1,122 @@
{
"SX130x_conf": {
"com_type": "USB",
"com_path": "/dev/ttyACM0",
"lorawan_public": true,
"clksrc": 0,
"antenna_gain": 0, /* antenna gain, in dBi */
"full_duplex": false,
"fine_timestamp": {
"enable": false,
"mode": "all_sf" /* high_capacity or all_sf */
},
"sx1261_conf": {
"rssi_offset": 0, /* dB */
"spectral_scan": {
"enable": false,
"freq_start": 922000000,
"nb_chan": 8,
"nb_scan": 2000,
"pace_s": 10
},
"lbt": {
"enable": true,
"rssi_target": -80, /* dBm */
"channels":[ /* 16 channels maximum */
{ "freq_hz": 920600000, "bandwidth": 125000, "scan_time_us": 5000, "transmit_time_ms": 4000 },
{ "freq_hz": 920800000, "bandwidth": 125000, "scan_time_us": 5000, "transmit_time_ms": 4000 },
{ "freq_hz": 921000000, "bandwidth": 125000, "scan_time_us": 5000, "transmit_time_ms": 4000 },
{ "freq_hz": 921200000, "bandwidth": 125000, "scan_time_us": 5000, "transmit_time_ms": 4000 },
{ "freq_hz": 921400000, "bandwidth": 125000, "scan_time_us": 5000, "transmit_time_ms": 4000 },
{ "freq_hz": 921600000, "bandwidth": 125000, "scan_time_us": 5000, "transmit_time_ms": 4000 },
{ "freq_hz": 921800000, "bandwidth": 125000, "scan_time_us": 5000, "transmit_time_ms": 4000 },
{ "freq_hz": 923200000, "bandwidth": 125000, "scan_time_us": 5000, "transmit_time_ms": 4000 },
{ "freq_hz": 923400000, "bandwidth": 125000, "scan_time_us": 5000, "transmit_time_ms": 4000 }
]
}
},
"radio_0": {
"enable": true,
"type": "SX1250",
"freq": 922300000,
"rssi_offset": -215.4,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": true,
"tx_freq_min": 920000000,
"tx_freq_max": 924000000,
"tx_gain_lut":[
{"rf_power": 0, "pa_gain": 0, "pwr_idx": 0},
{"rf_power": 12, "pa_gain": 0, "pwr_idx": 15},
{"rf_power": 13, "pa_gain": 0, "pwr_idx": 16},
{"rf_power": 14, "pa_gain": 0, "pwr_idx": 17},
{"rf_power": 15, "pa_gain": 0, "pwr_idx": 19},
{"rf_power": 16, "pa_gain": 0, "pwr_idx": 20},
{"rf_power": 17, "pa_gain": 0, "pwr_idx": 22},
{"rf_power": 18, "pa_gain": 1, "pwr_idx": 1},
{"rf_power": 19, "pa_gain": 1, "pwr_idx": 2},
{"rf_power": 20, "pa_gain": 1, "pwr_idx": 3},
{"rf_power": 21, "pa_gain": 1, "pwr_idx": 4},
{"rf_power": 22, "pa_gain": 1, "pwr_idx": 5},
{"rf_power": 23, "pa_gain": 1, "pwr_idx": 6},
{"rf_power": 24, "pa_gain": 1, "pwr_idx": 9}
]
},
"radio_1": {
"enable": true,
"type": "SX1250",
"freq": 923100000,
"rssi_offset": -215.4,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": false
},
"chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]},
"chan_multiSF_0": {"enable": true, "radio": 0, "if": -300000},
"chan_multiSF_1": {"enable": true, "radio": 0, "if": -100000},
"chan_multiSF_2": {"enable": true, "radio": 0, "if": 100000},
"chan_multiSF_3": {"enable": true, "radio": 0, "if": 300000},
"chan_multiSF_4": {"enable": true, "radio": 1, "if": -300000},
"chan_multiSF_5": {"enable": true, "radio": 1, "if": -100000},
"chan_multiSF_6": {"enable": true, "radio": 1, "if": 100000},
"chan_multiSF_7": {"enable": true, "radio": 1, "if": 300000},
"chan_Lora_std": {"enable": true, "radio": 0, "if": 300000, "bandwidth": 500000, "spread_factor": 8,
"implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1},
"chan_FSK": {"enable": false, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000}
},
"gateway_conf": {
"gateway_ID": "AA555A0000000000",
/* change with default server address/ports */
"server_address": "localhost",
"serv_port_up": 1730,
"serv_port_down": 1730,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
"gps_tty_path": "/dev/ttyS0",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
"ref_altitude": 0,
/* Beaconing parameters */
"beacon_period": 0, /* disable class B beacon */
"beacon_freq_hz": 923400000,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 14,
"beacon_infodesc": 0
},
"debug_conf": {
"ref_payload":[
{"id": "0xCAFE1234"},
{"id": "0xCAFE2345"}
],
"log_file": "loragw_hal.log"
}
}

View File

@ -0,0 +1,99 @@
{
"SX130x_conf": {
"com_type": "SPI",
"com_path": "/dev/spidev0.0",
"lorawan_public": true,
"clksrc": 0,
"antenna_gain": 0, /* antenna gain, in dBi */
"full_duplex": false,
"fine_timestamp": {
"enable": false,
"mode": "all_sf" /* high_capacity or all_sf */
},
"radio_0": {
"enable": true,
"type": "SX1250",
"single_input_mode": true,
"freq": 486600000,
"rssi_offset": -207.0,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": true,
"tx_freq_min": 486290000,
"tx_freq_max": 510000000,
"tx_gain_lut":[
{"rf_power": -6, "pa_gain": 0, "pwr_idx": 0},
{"rf_power": -3, "pa_gain": 0, "pwr_idx": 1},
{"rf_power": 0, "pa_gain": 0, "pwr_idx": 2},
{"rf_power": 3, "pa_gain": 1, "pwr_idx": 3},
{"rf_power": 6, "pa_gain": 1, "pwr_idx": 4},
{"rf_power": 10, "pa_gain": 1, "pwr_idx": 5},
{"rf_power": 11, "pa_gain": 1, "pwr_idx": 6},
{"rf_power": 12, "pa_gain": 1, "pwr_idx": 7},
{"rf_power": 13, "pa_gain": 1, "pwr_idx": 8},
{"rf_power": 14, "pa_gain": 1, "pwr_idx": 9},
{"rf_power": 16, "pa_gain": 1, "pwr_idx": 10},
{"rf_power": 20, "pa_gain": 1, "pwr_idx": 11},
{"rf_power": 23, "pa_gain": 1, "pwr_idx": 12},
{"rf_power": 25, "pa_gain": 1, "pwr_idx": 13},
{"rf_power": 26, "pa_gain": 1, "pwr_idx": 14},
{"rf_power": 27, "pa_gain": 1, "pwr_idx": 15}
]
},
"radio_1": {
"enable": true,
"type": "SX1250",
"single_input_mode": true,
"freq": 487400000,
"rssi_offset": -207.0,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": false
},
"chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]},
"chan_multiSF_0": {"enable": true, "radio": 0, "if": -300000},
"chan_multiSF_1": {"enable": true, "radio": 0, "if": -100000},
"chan_multiSF_2": {"enable": true, "radio": 0, "if": 100000},
"chan_multiSF_3": {"enable": true, "radio": 0, "if": 300000},
"chan_multiSF_4": {"enable": true, "radio": 1, "if": -300000},
"chan_multiSF_5": {"enable": true, "radio": 1, "if": -100000},
"chan_multiSF_6": {"enable": true, "radio": 1, "if": 100000},
"chan_multiSF_7": {"enable": true, "radio": 1, "if": 300000},
"chan_Lora_std": {"enable": true, "radio": 1, "if": -200000, "bandwidth": 250000, "spread_factor": 7,
"implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1},
"chan_FSK": {"enable": true, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000}
},
"gateway_conf": {
"gateway_ID": "AA555A0000000000",
"server_address": "localhost",
"serv_port_up": 1730,
"serv_port_down": 1730,
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
"gps_tty_path": "/dev/ttyS0",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
"ref_altitude": 0,
/* Beaconing parameters */
"beacon_period": 0,
"beacon_freq_hz": 869525000,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 14,
"beacon_infodesc": 0
},
"debug_conf": {
"ref_payload":[
{"id": "0xCAFE1234"},
{"id": "0xCAFE2345"}
],
"log_file": "loragw_hal.log"
}
}

View File

@ -0,0 +1,101 @@
{
"SX130x_conf": {
"com_type": "SPI",
"com_path": "/dev/spidev0.0",
"lorawan_public": true,
"clksrc": 0,
"antenna_gain": 0, /* antenna gain, in dBi */
"full_duplex": false,
"fine_timestamp": {
"enable": false,
"mode": "all_sf" /* high_capacity or all_sf */
},
"radio_0": {
"enable": true,
"type": "SX1250",
"single_input_mode": true,
"freq": 488200000,
"rssi_offset": -207.0,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": true,
"tx_freq_min": 508300000,
"tx_freq_max": 510000000,
"tx_gain_lut":[
{"rf_power": -6, "pa_gain": 0, "pwr_idx": 0},
{"rf_power": -3, "pa_gain": 0, "pwr_idx": 1},
{"rf_power": 0, "pa_gain": 0, "pwr_idx": 2},
{"rf_power": 3, "pa_gain": 1, "pwr_idx": 3},
{"rf_power": 6, "pa_gain": 1, "pwr_idx": 4},
{"rf_power": 10, "pa_gain": 1, "pwr_idx": 5},
{"rf_power": 11, "pa_gain": 1, "pwr_idx": 6},
{"rf_power": 12, "pa_gain": 1, "pwr_idx": 7},
{"rf_power": 13, "pa_gain": 1, "pwr_idx": 8},
{"rf_power": 14, "pa_gain": 1, "pwr_idx": 9},
{"rf_power": 16, "pa_gain": 1, "pwr_idx": 10},
{"rf_power": 20, "pa_gain": 1, "pwr_idx": 11},
{"rf_power": 23, "pa_gain": 1, "pwr_idx": 12},
{"rf_power": 25, "pa_gain": 1, "pwr_idx": 13},
{"rf_power": 26, "pa_gain": 1, "pwr_idx": 14},
{"rf_power": 27, "pa_gain": 1, "pwr_idx": 15}
]
},
"radio_1": {
"enable": true,
"type": "SX1250",
"single_input_mode": true,
"freq": 489000000,
"rssi_offset": -207.0,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": false
},
"chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]},
"chan_multiSF_0": {"enable": true, "radio": 0, "if": -300000},
"chan_multiSF_1": {"enable": true, "radio": 0, "if": -100000},
"chan_multiSF_2": {"enable": true, "radio": 0, "if": 100000},
"chan_multiSF_3": {"enable": true, "radio": 0, "if": 300000},
"chan_multiSF_4": {"enable": true, "radio": 1, "if": -300000},
"chan_multiSF_5": {"enable": true, "radio": 1, "if": -100000},
"chan_multiSF_6": {"enable": true, "radio": 1, "if": 100000},
"chan_multiSF_7": {"enable": true, "radio": 1, "if": 300000},
"chan_Lora_std": {"enable": true, "radio": 1, "if": -200000, "bandwidth": 250000, "spread_factor": 7,
"implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1},
"chan_FSK": {"enable": true, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000}
},
"gateway_conf": {
"gateway_ID": "AA555A0000000000",
/* change with default server address/ports */
"server_address": "localhost",
"serv_port_up": 1730,
"serv_port_down": 1730,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
"gps_tty_path": "/dev/ttyS0",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
"ref_altitude": 0,
/* Beaconing parameters */
"beacon_period": 0,
"beacon_freq_hz": 869525000,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 14,
"beacon_infodesc": 0
},
"debug_conf": {
"ref_payload":[
{"id": "0xCAFE1234"},
{"id": "0xCAFE2345"}
],
"log_file": "loragw_hal.log"
}
}

View File

@ -0,0 +1,126 @@
{
"SX130x_conf": {
"com_type": "USB",
"com_path": "/dev/ttyACM0",
"lorawan_public": true,
"clksrc": 0,
"antenna_gain": 0, /* antenna gain, in dBi */
"full_duplex": false,
"fine_timestamp": {
"enable": false,
"mode": "all_sf" /* high_capacity or all_sf */
},
"sx1261_conf": {
"rssi_offset": 0, /* dB */
"spectral_scan": {
"enable": false,
"freq_start": 473100000,
"nb_chan": 8,
"nb_scan": 2000,
"pace_s": 10
},
"lbt": {
"enable": false,
"rssi_target": -70, /* dBm */
"channels":[ /* 16 channels maximum */
{ "freq_hz": 500300000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 500500000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 500700000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 500900000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 501100000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 501300000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 501500000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 501700000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 505300000, "bandwidth": 125000, "scan_time_us": 5000, "transmit_time_ms": 4000 }
]
}
},
"radio_0": {
"enable": true,
"type": "SX1250",
"single_input_mode": true,
"freq": 473400000,
"rssi_offset": -218.0,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": true,
"tx_freq_min": 500000000,
"tx_freq_max": 510000000,
"tx_gain_lut":[
{"rf_power": 3, "pa_gain": 0, "pwr_idx": 7},
{"rf_power": 4, "pa_gain": 0, "pwr_idx": 8},
{"rf_power": 5, "pa_gain": 0, "pwr_idx": 9},
{"rf_power": 6, "pa_gain": 1, "pwr_idx": 10},
{"rf_power": 7, "pa_gain": 1, "pwr_idx": 11},
{"rf_power": 8, "pa_gain": 1, "pwr_idx": 12},
{"rf_power": 9, "pa_gain": 1, "pwr_idx": 13},
{"rf_power": 10, "pa_gain": 1, "pwr_idx": 14},
{"rf_power": 11, "pa_gain": 1, "pwr_idx": 15},
{"rf_power": 12, "pa_gain": 1, "pwr_idx": 16},
{"rf_power": 13, "pa_gain": 1, "pwr_idx": 17},
{"rf_power": 14, "pa_gain": 1, "pwr_idx": 18},
{"rf_power": 15, "pa_gain": 1, "pwr_idx": 19},
{"rf_power": 16, "pa_gain": 1, "pwr_idx": 20},
{"rf_power": 17, "pa_gain": 1, "pwr_idx": 21},
{"rf_power": 18, "pa_gain": 1, "pwr_idx": 22}
]
},
"radio_1": {
"enable": true,
"type": "SX1250",
"single_input_mode": true,
"freq": 474200000,
"rssi_offset": -218.0,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": false
},
"chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]},
"chan_multiSF_0": {"enable": true, "radio": 0, "if": -300000},
"chan_multiSF_1": {"enable": true, "radio": 0, "if": -100000},
"chan_multiSF_2": {"enable": true, "radio": 0, "if": 100000},
"chan_multiSF_3": {"enable": true, "radio": 0, "if": 300000},
"chan_multiSF_4": {"enable": true, "radio": 1, "if": -300000},
"chan_multiSF_5": {"enable": true, "radio": 1, "if": -100000},
"chan_multiSF_6": {"enable": true, "radio": 1, "if": 100000},
"chan_multiSF_7": {"enable": true, "radio": 1, "if": 300000},
"chan_Lora_std": {"enable": true, "radio": 1, "if": -200000, "bandwidth": 250000, "spread_factor": 7,
"implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1},
"chan_FSK": {"enable": true, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000}
},
"gateway_conf": {
"gateway_ID": "AA555A0000000000",
/* change with default server address/ports */
"server_address": "localhost",
"serv_port_up": 1730,
"serv_port_down": 1730,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
"gps_tty_path": "/dev/ttyS0",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
"ref_altitude": 0,
/* Beaconing parameters */
"beacon_period": 0,
"beacon_freq_hz": 500000000,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 14,
"beacon_infodesc": 0
},
"debug_conf": {
"ref_payload":[
{"id": "0xCAFE1234"},
{"id": "0xCAFE2345"}
],
"log_file": "loragw_hal.log"
}
}

View File

@ -0,0 +1,126 @@
{
"SX130x_conf": {
"com_type": "SPI",
"com_path": "/dev/spidev0.0",
"lorawan_public": true,
"clksrc": 0,
"antenna_gain": 0, /* antenna gain, in dBi */
"full_duplex": false,
"fine_timestamp": {
"enable": false,
"mode": "all_sf" /* high_capacity or all_sf */
},
"sx1261_conf": {
"spi_path": "/dev/spidev0.1",
"rssi_offset": 0, /* dB */
"spectral_scan": {
"enable": false,
"freq_start": 867100000,
"nb_chan": 8,
"nb_scan": 2000,
"pace_s": 10
},
"lbt": {
"enable": false,
"rssi_target": -70, /* dBm */
"channels":[ /* 16 channels maximum */
{ "freq_hz": 867100000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 867300000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 867500000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 867700000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 867900000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 868100000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 868300000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 868500000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 },
{ "freq_hz": 869525000, "bandwidth": 125000, "scan_time_us": 5000, "transmit_time_ms": 4000 },
{ "freq_hz": 868300000, "bandwidth": 250000, "scan_time_us": 128, "transmit_time_ms": 400 }
]
}
},
"radio_0": {
"enable": true,
"type": "SX1250",
"freq": 867500000,
"rssi_offset": -215.4,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": true,
"tx_freq_min": 863000000,
"tx_freq_max": 870000000,
"tx_gain_lut":[
{"rf_power": 12, "pa_gain": 0, "pwr_idx": 15},
{"rf_power": 13, "pa_gain": 0, "pwr_idx": 16},
{"rf_power": 14, "pa_gain": 0, "pwr_idx": 17},
{"rf_power": 15, "pa_gain": 0, "pwr_idx": 19},
{"rf_power": 16, "pa_gain": 0, "pwr_idx": 20},
{"rf_power": 17, "pa_gain": 0, "pwr_idx": 22},
{"rf_power": 18, "pa_gain": 1, "pwr_idx": 1},
{"rf_power": 19, "pa_gain": 1, "pwr_idx": 2},
{"rf_power": 20, "pa_gain": 1, "pwr_idx": 3},
{"rf_power": 21, "pa_gain": 1, "pwr_idx": 4},
{"rf_power": 22, "pa_gain": 1, "pwr_idx": 5},
{"rf_power": 23, "pa_gain": 1, "pwr_idx": 6},
{"rf_power": 24, "pa_gain": 1, "pwr_idx": 7},
{"rf_power": 25, "pa_gain": 1, "pwr_idx": 9},
{"rf_power": 26, "pa_gain": 1, "pwr_idx": 11},
{"rf_power": 27, "pa_gain": 1, "pwr_idx": 14}
]
},
"radio_1": {
"enable": true,
"type": "SX1250",
"freq": 868500000,
"rssi_offset": -215.4,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": false
},
"chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]},
"chan_multiSF_0": {"enable": true, "radio": 1, "if": -400000},
"chan_multiSF_1": {"enable": true, "radio": 1, "if": -200000},
"chan_multiSF_2": {"enable": true, "radio": 1, "if": 0},
"chan_multiSF_3": {"enable": true, "radio": 0, "if": -400000},
"chan_multiSF_4": {"enable": true, "radio": 0, "if": -200000},
"chan_multiSF_5": {"enable": true, "radio": 0, "if": 0},
"chan_multiSF_6": {"enable": true, "radio": 0, "if": 200000},
"chan_multiSF_7": {"enable": true, "radio": 0, "if": 400000},
"chan_Lora_std": {"enable": true, "radio": 1, "if": -200000, "bandwidth": 250000, "spread_factor": 7,
"implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1},
"chan_FSK": {"enable": true, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000}
},
"gateway_conf": {
"gateway_ID": "AA555A0000000000",
/* change with default server address/ports */
"server_address": "localhost",
"serv_port_up": 1730,
"serv_port_down": 1730,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
"gps_tty_path": "/dev/ttyS0",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
"ref_altitude": 0,
/* Beaconing parameters */
"beacon_period": 0,
"beacon_freq_hz": 869525000,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 14,
"beacon_infodesc": 0
},
"debug_conf": {
"ref_payload":[
{"id": "0xCAFE1234"},
{"id": "0xCAFE2345"}
],
"log_file": "loragw_hal.log"
}
}

View File

@ -0,0 +1,125 @@
{
"SX130x_conf": {
"com_type": "USB",
"com_path": "/dev/ttyACM0",
"lorawan_public": true,
"clksrc": 0,
"antenna_gain": 0, /* antenna gain, in dBi */
"full_duplex": false,
"fine_timestamp": {
"enable": false,
"mode": "all_sf" /* high_capacity or all_sf */
},
"sx1261_conf": {
"rssi_offset": 0, /* dB */
"spectral_scan": {
"enable": false,
"freq_start": 867100000,
"nb_chan": 8,
"nb_scan": 2000,
"pace_s": 10
},
"lbt": {
"enable": false,
"rssi_target": -70, /* dBm */
"channels":[ /* 16 channels maximum */
{"freq_hz": 867100000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400},
{"freq_hz": 867300000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400},
{"freq_hz": 867500000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400},
{"freq_hz": 867700000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400},
{"freq_hz": 867900000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400},
{"freq_hz": 868100000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400},
{"freq_hz": 868300000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400},
{"freq_hz": 868500000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400},
{"freq_hz": 869525000, "bandwidth": 125000, "scan_time_us": 5000, "transmit_time_ms": 4000},
{"freq_hz": 868300000, "bandwidth": 250000, "scan_time_us": 128, "transmit_time_ms": 400}
]
}
},
"radio_0": {
"enable": true,
"type": "SX1250",
"freq": 867500000,
"rssi_offset": -215.4,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": true,
"tx_freq_min": 863000000,
"tx_freq_max": 870000000,
"tx_gain_lut":[
{"rf_power": 12, "pa_gain": 0, "pwr_idx": 15},
{"rf_power": 13, "pa_gain": 0, "pwr_idx": 16},
{"rf_power": 14, "pa_gain": 0, "pwr_idx": 17},
{"rf_power": 15, "pa_gain": 0, "pwr_idx": 19},
{"rf_power": 16, "pa_gain": 0, "pwr_idx": 20},
{"rf_power": 17, "pa_gain": 0, "pwr_idx": 22},
{"rf_power": 18, "pa_gain": 1, "pwr_idx": 1},
{"rf_power": 19, "pa_gain": 1, "pwr_idx": 2},
{"rf_power": 20, "pa_gain": 1, "pwr_idx": 3},
{"rf_power": 21, "pa_gain": 1, "pwr_idx": 4},
{"rf_power": 22, "pa_gain": 1, "pwr_idx": 5},
{"rf_power": 23, "pa_gain": 1, "pwr_idx": 6},
{"rf_power": 24, "pa_gain": 1, "pwr_idx": 7},
{"rf_power": 25, "pa_gain": 1, "pwr_idx": 9},
{"rf_power": 26, "pa_gain": 1, "pwr_idx": 11},
{"rf_power": 27, "pa_gain": 1, "pwr_idx": 14}
]
},
"radio_1": {
"enable": true,
"type": "SX1250",
"freq": 868500000,
"rssi_offset": -215.4,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": false
},
"chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]},
"chan_multiSF_0": {"enable": true, "radio": 1, "if": -400000},
"chan_multiSF_1": {"enable": true, "radio": 1, "if": -200000},
"chan_multiSF_2": {"enable": true, "radio": 1, "if": 0},
"chan_multiSF_3": {"enable": true, "radio": 0, "if": -400000},
"chan_multiSF_4": {"enable": true, "radio": 0, "if": -200000},
"chan_multiSF_5": {"enable": true, "radio": 0, "if": 0},
"chan_multiSF_6": {"enable": true, "radio": 0, "if": 200000},
"chan_multiSF_7": {"enable": true, "radio": 0, "if": 400000},
"chan_Lora_std": {"enable": true, "radio": 1, "if": -200000, "bandwidth": 250000, "spread_factor": 7,
"implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1},
"chan_FSK": {"enable": true, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000}
},
"gateway_conf": {
"gateway_ID": "AA555A0000000000",
/* change with default server address/ports */
"server_address": "localhost",
"serv_port_up": 1730,
"serv_port_down": 1730,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
"gps_tty_path": "/dev/ttyS0",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
"ref_altitude": 0,
/* Beaconing parameters */
"beacon_period": 0,
"beacon_freq_hz": 869525000,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 14,
"beacon_infodesc": 0
},
"debug_conf": {
"ref_payload":[
{"id": "0xCAFE1234"},
{"id": "0xCAFE2345"}
],
"log_file": "loragw_hal.log"
}
}

View File

@ -0,0 +1,113 @@
{
"SX130x_conf": {
"com_type": "SPI",
"com_path": "/dev/spidev0.0",
"lorawan_public": true,
"clksrc": 0,
"antenna_gain": 0, /* antenna gain, in dBi */
"full_duplex": false,
"fine_timestamp": {
"enable": false,
"mode": "all_sf" /* high_capacity or all_sf */
},
"sx1261_conf": {
"spi_path": "/dev/spidev0.1",
"rssi_offset": 0, /* dB */
"spectral_scan": {
"enable": false,
"freq_start": 903900000,
"nb_chan": 8,
"nb_scan": 2000,
"pace_s": 10
},
"lbt": {
"enable": false /* LBT for 500 Khz channels is not supported */
}
},
"radio_0": {
"enable": true,
"type": "SX1250",
"freq": 904300000,
"rssi_offset": -215.4,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": true,
"tx_freq_min": 923000000,
"tx_freq_max": 928000000,
"tx_gain_lut":[
{"rf_power": 12, "pa_gain": 0, "pwr_idx": 15},
{"rf_power": 13, "pa_gain": 0, "pwr_idx": 16},
{"rf_power": 14, "pa_gain": 0, "pwr_idx": 17},
{"rf_power": 15, "pa_gain": 0, "pwr_idx": 19},
{"rf_power": 16, "pa_gain": 0, "pwr_idx": 20},
{"rf_power": 17, "pa_gain": 0, "pwr_idx": 22},
{"rf_power": 18, "pa_gain": 1, "pwr_idx": 1},
{"rf_power": 19, "pa_gain": 1, "pwr_idx": 2},
{"rf_power": 20, "pa_gain": 1, "pwr_idx": 3},
{"rf_power": 21, "pa_gain": 1, "pwr_idx": 4},
{"rf_power": 22, "pa_gain": 1, "pwr_idx": 5},
{"rf_power": 23, "pa_gain": 1, "pwr_idx": 6},
{"rf_power": 24, "pa_gain": 1, "pwr_idx": 7},
{"rf_power": 25, "pa_gain": 1, "pwr_idx": 9},
{"rf_power": 26, "pa_gain": 1, "pwr_idx": 11},
{"rf_power": 27, "pa_gain": 1, "pwr_idx": 14}
]
},
"radio_1": {
"enable": true,
"type": "SX1250",
"freq": 905000000,
"rssi_offset": -215.4,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": false
},
"chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]},
"chan_multiSF_0": {"enable": true, "radio": 0, "if": -400000}, /* Freq : 903.9 MHz*/
"chan_multiSF_1": {"enable": true, "radio": 0, "if": -200000}, /* Freq : 904.1 MHz*/
"chan_multiSF_2": {"enable": true, "radio": 0, "if": 0}, /* Freq : 904.3 MHz*/
"chan_multiSF_3": {"enable": true, "radio": 0, "if": 200000}, /* Freq : 904.5 MHz*/
"chan_multiSF_4": {"enable": true, "radio": 1, "if": -300000}, /* Freq : 904.7 MHz*/
"chan_multiSF_5": {"enable": true, "radio": 1, "if": -100000}, /* Freq : 904.9 MHz*/
"chan_multiSF_6": {"enable": true, "radio": 1, "if": 100000}, /* Freq : 905.1 MHz*/
"chan_multiSF_7": {"enable": true, "radio": 1, "if": 300000}, /* Freq : 905.3 MHz*/
"chan_Lora_std": {"enable": true, "radio": 0, "if": 300000, "bandwidth": 500000, "spread_factor": 8, /* Freq : 904.6 MHz*/
"implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1},
"chan_FSK": {"enable": false, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000} /* Freq : 868.8 MHz*/
},
"gateway_conf": {
"gateway_ID": "AA555A0000000000",
/* change with default server address/ports */
"server_address": "localhost",
"serv_port_up": 1730,
"serv_port_down": 1730,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
"gps_tty_path": "/dev/ttyS0",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
"ref_altitude": 0,
/* Beaconing parameters */
"beacon_period": 0, /* disable class B beacon */
"beacon_freq_hz": 869525000,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 14,
"beacon_infodesc": 0
},
"debug_conf": {
"ref_payload":[
{"id": "0xCAFE1234"},
{"id": "0xCAFE2345"}
],
"log_file": "loragw_hal.log"
}
}

View File

@ -0,0 +1,112 @@
{
"SX130x_conf": {
"com_type": "USB",
"com_path": "/dev/ttyACM0",
"lorawan_public": true,
"clksrc": 0,
"antenna_gain": 0, /* antenna gain, in dBi */
"full_duplex": false,
"fine_timestamp": {
"enable": false,
"mode": "all_sf" /* high_capacity or all_sf */
},
"sx1261_conf": {
"rssi_offset": 0, /* dB */
"spectral_scan": {
"enable": false,
"freq_start": 903900000,
"nb_chan": 8,
"nb_scan": 2000,
"pace_s": 10
},
"lbt": {
"enable": false /* LBT for 500 Khz channels is not supported */
}
},
"radio_0": {
"enable": true,
"type": "SX1250",
"freq": 904300000,
"rssi_offset": -215.4,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": true,
"tx_freq_min": 923000000,
"tx_freq_max": 928000000,
"tx_gain_lut":[
{"rf_power": 12, "pa_gain": 0, "pwr_idx": 15},
{"rf_power": 13, "pa_gain": 0, "pwr_idx": 16},
{"rf_power": 14, "pa_gain": 0, "pwr_idx": 17},
{"rf_power": 15, "pa_gain": 0, "pwr_idx": 19},
{"rf_power": 16, "pa_gain": 0, "pwr_idx": 20},
{"rf_power": 17, "pa_gain": 0, "pwr_idx": 22},
{"rf_power": 18, "pa_gain": 1, "pwr_idx": 1},
{"rf_power": 19, "pa_gain": 1, "pwr_idx": 2},
{"rf_power": 20, "pa_gain": 1, "pwr_idx": 3},
{"rf_power": 21, "pa_gain": 1, "pwr_idx": 4},
{"rf_power": 22, "pa_gain": 1, "pwr_idx": 5},
{"rf_power": 23, "pa_gain": 1, "pwr_idx": 6},
{"rf_power": 24, "pa_gain": 1, "pwr_idx": 7},
{"rf_power": 25, "pa_gain": 1, "pwr_idx": 9},
{"rf_power": 26, "pa_gain": 1, "pwr_idx": 11},
{"rf_power": 27, "pa_gain": 1, "pwr_idx": 14}
]
},
"radio_1": {
"enable": true,
"type": "SX1250",
"freq": 905000000,
"rssi_offset": -215.4,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": false
},
"chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]},
"chan_multiSF_0": {"enable": true, "radio": 0, "if": -400000}, /* Freq : 903.9 MHz*/
"chan_multiSF_1": {"enable": true, "radio": 0, "if": -200000}, /* Freq : 904.1 MHz*/
"chan_multiSF_2": {"enable": true, "radio": 0, "if": 0}, /* Freq : 904.3 MHz*/
"chan_multiSF_3": {"enable": true, "radio": 0, "if": 200000}, /* Freq : 904.5 MHz*/
"chan_multiSF_4": {"enable": true, "radio": 1, "if": -300000}, /* Freq : 904.7 MHz*/
"chan_multiSF_5": {"enable": true, "radio": 1, "if": -100000}, /* Freq : 904.9 MHz*/
"chan_multiSF_6": {"enable": true, "radio": 1, "if": 100000}, /* Freq : 905.1 MHz*/
"chan_multiSF_7": {"enable": true, "radio": 1, "if": 300000}, /* Freq : 905.3 MHz*/
"chan_Lora_std": {"enable": true, "radio": 0, "if": 300000, "bandwidth": 500000, "spread_factor": 8, /* Freq : 904.6 MHz*/
"implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1},
"chan_FSK": {"enable": false, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000} /* Freq : 868.8 MHz*/
},
"gateway_conf": {
"gateway_ID": "AA555A0000000000",
/* change with default server address/ports */
"server_address": "localhost",
"serv_port_up": 1730,
"serv_port_down": 1730,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
"gps_tty_path": "/dev/ttyS0",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
"ref_altitude": 0,
/* Beaconing parameters */
"beacon_period": 0, /* disable class B beacon */
"beacon_freq_hz": 869525000,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 14,
"beacon_infodesc": 0
},
"debug_conf": {
"ref_payload":[
{"id": "0xCAFE1234"},
{"id": "0xCAFE2345"}
],
"log_file": "loragw_hal.log"
}
}

View File

@ -0,0 +1,89 @@
{
"SX130x_conf": {
"com_type": "SPI",
"com_path": "/dev/spidev0.0",
"lorawan_public": true,
"clksrc": 0,
"antenna_gain": 0, /* antenna gain, in dBi */
"full_duplex": true,
"radio_0": {
"enable": true,
"type": "SX1255",
"freq": 472000000,
"rssi_offset": -203.0,
"rssi_tcomp": {"coeff_a": 0.00, "coeff_b": 0.00, "coeff_c": -39.78, "coeff_d": 1349.50, "coeff_e": 0.00},
"tx_enable": true,
"tx_freq_min": 500000000,
"tx_freq_max": 510000000,
"tx_gain_lut":[
{"rf_power": 10, "pa_gain": 1, "dac_gain": 1, "mix_gain": 9, "dig_gain": 0},
{"rf_power": 12, "pa_gain": 1, "dac_gain": 3, "mix_gain": 7, "dig_gain": 0},
{"rf_power": 13, "pa_gain": 1, "dac_gain": 1, "mix_gain": 11, "dig_gain": 1},
{"rf_power": 14, "pa_gain": 1, "dac_gain": 0, "mix_gain": 12, "dig_gain": 0},
{"rf_power": 15, "pa_gain": 1, "dac_gain": 0, "mix_gain": 9, "dig_gain": 0},
{"rf_power": 16, "pa_gain": 1, "dac_gain": 1, "mix_gain": 12, "dig_gain": 2},
{"rf_power": 17, "pa_gain": 1, "dac_gain": 1, "mix_gain": 11, "dig_gain": 0},
{"rf_power": 18, "pa_gain": 1, "dac_gain": 1, "mix_gain": 11, "dig_gain": 1},
{"rf_power": 20, "pa_gain": 1, "dac_gain": 2, "mix_gain": 10, "dig_gain": 0},
{"rf_power": 21, "pa_gain": 1, "dac_gain": 0, "mix_gain": 13, "dig_gain": 0}
]
},
"radio_1": {
"enable": true,
"type": "SX1255",
"freq": 473000000,
"rssi_offset": -205.5,
"rssi_tcomp": {"coeff_a": 0.00, "coeff_b": 0.00, "coeff_c": 9.97, "coeff_d": -2748.33, "coeff_e": 0.00},
"tx_enable": false
},
"chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]},
"chan_multiSF_0": {"enable": true, "radio": 0, "if": -300000},
"chan_multiSF_1": {"enable": true, "radio": 0, "if": -100000},
"chan_multiSF_2": {"enable": true, "radio": 0, "if": 100000},
"chan_multiSF_3": {"enable": true, "radio": 0, "if": 300000},
"chan_multiSF_4": {"enable": true, "radio": 1, "if": -300000},
"chan_multiSF_5": {"enable": true, "radio": 1, "if": -100000},
"chan_multiSF_6": {"enable": true, "radio": 1, "if": 100000},
"chan_multiSF_7": {"enable": true, "radio": 1, "if": 300000},
"chan_Lora_std": {"enable": true, "radio": 1, "if": -200000, "bandwidth": 250000, "spread_factor": 7,
"implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1},
"chan_FSK": {"enable": true, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000}
},
"gateway_conf": {
"gateway_ID": "AA555A0000000000",
/* change with default server address/ports */
"server_address": "localhost",
"serv_port_up": 1730,
"serv_port_down": 1730,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
"gps_tty_path": "/dev/ttyS0",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
"ref_altitude": 0,
/* Beaconing parameters */
"beacon_period": 0,
"beacon_freq_hz": 869525000,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 14,
"beacon_infodesc": 0
},
"debug_conf": {
"ref_payload":[
{"id": "0xCAFE1234"},
{"id": "0xCAFE2345"}
],
"log_file": "loragw_hal.log"
}
}

View File

@ -0,0 +1,95 @@
{
"SX130x_conf": {
"com_type": "SPI",
"com_path": "/dev/spidev0.0",
"lorawan_public": true,
"clksrc": 0,
"antenna_gain": 0, /* antenna gain, in dBi */
"full_duplex": false,
"radio_0": {
"enable": true,
"type": "SX1257",
"freq": 867500000,
"rssi_offset": -196.0,
"rssi_tcomp": {"coeff_a": -0.006, "coeff_b": 0.789, "coeff_c": -14.992, "coeff_d": 1988.572, "coeff_e": 105236.996},
"tx_enable": true,
"tx_freq_min": 863000000,
"tx_freq_max": 870000000,
"tx_gain_lut":[
{"rf_power": -6, "pa_gain": 0, "dac_gain": 3, "mix_gain": 8, "dig_gain": 0},
{"rf_power": -3, "pa_gain": 0, "dac_gain": 3, "mix_gain": 10, "dig_gain": 0},
{"rf_power": 0, "pa_gain": 0, "dac_gain": 3, "mix_gain": 12, "dig_gain": 0},
{"rf_power": 3, "pa_gain": 1, "dac_gain": 3, "mix_gain": 8, "dig_gain": 0},
{"rf_power": 6, "pa_gain": 1, "dac_gain": 3, "mix_gain": 10, "dig_gain": 0},
{"rf_power": 10, "pa_gain": 1, "dac_gain": 3, "mix_gain": 12, "dig_gain": 0},
{"rf_power": 11, "pa_gain": 1, "dac_gain": 3, "mix_gain": 13, "dig_gain": 0},
{"rf_power": 12, "pa_gain": 2, "dac_gain": 3, "mix_gain": 9, "dig_gain": 0},
{"rf_power": 13, "pa_gain": 1, "dac_gain": 3, "mix_gain": 15, "dig_gain": 0},
{"rf_power": 14, "pa_gain": 2, "dac_gain": 3, "mix_gain": 10, "dig_gain": 0},
{"rf_power": 16, "pa_gain": 2, "dac_gain": 3, "mix_gain": 11, "dig_gain": 0},
{"rf_power": 20, "pa_gain": 3, "dac_gain": 3, "mix_gain": 9, "dig_gain": 0},
{"rf_power": 23, "pa_gain": 3, "dac_gain": 3, "mix_gain": 10, "dig_gain": 0},
{"rf_power": 25, "pa_gain": 3, "dac_gain": 3, "mix_gain": 11, "dig_gain": 0},
{"rf_power": 26, "pa_gain": 3, "dac_gain": 3, "mix_gain": 12, "dig_gain": 0},
{"rf_power": 27, "pa_gain": 3, "dac_gain": 3, "mix_gain": 14, "dig_gain": 0}
]
},
"radio_1": {
"enable": true,
"type": "SX1257",
"freq": 868500000,
"rssi_offset": -196.0,
"rssi_tcomp": {"coeff_a": -0.006, "coeff_b": 0.789, "coeff_c": -14.992, "coeff_d": 1988.572, "coeff_e": 105236.996},
"tx_enable": false
},
"chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]},
"chan_multiSF_0": {"enable": true, "radio": 1, "if": -400000},
"chan_multiSF_1": {"enable": true, "radio": 1, "if": -200000},
"chan_multiSF_2": {"enable": true, "radio": 1, "if": 0},
"chan_multiSF_3": {"enable": true, "radio": 0, "if": -400000},
"chan_multiSF_4": {"enable": true, "radio": 0, "if": -200000},
"chan_multiSF_5": {"enable": true, "radio": 0, "if": 0},
"chan_multiSF_6": {"enable": true, "radio": 0, "if": 200000},
"chan_multiSF_7": {"enable": true, "radio": 0, "if": 400000},
"chan_Lora_std": {"enable": true, "radio": 1, "if": -200000, "bandwidth": 250000, "spread_factor": 7,
"implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1},
"chan_FSK": {"enable": true, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000}
},
"gateway_conf": {
"gateway_ID": "AA555A0000000000",
/* change with default server address/ports */
"server_address": "localhost",
"serv_port_up": 1730,
"serv_port_down": 1730,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
"gps_tty_path": "/dev/ttyS0",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
"ref_altitude": 0,
/* Beaconing parameters */
"beacon_period": 0,
"beacon_freq_hz": 869525000,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 14,
"beacon_infodesc": 0
},
"debug_conf": {
"ref_payload":[
{"id": "0xCAFE1234"},
{"id": "0xCAFE2345"}
],
"log_file": "loragw_hal.log"
}
}

View File

@ -0,0 +1,18 @@
# That file will be included in the Makefile files that have hardware dependencies
### Debug options ###
# Set the DEBUG_* to 1 to activate debug mode in individual modules.
# Warning: that makes the module *very verbose*, do not use for production
DEBUG_AUX= 0
DEBUG_COM= 0
DEBUG_MCU= 0
DEBUG_I2C= 0
DEBUG_REG= 0
DEBUG_HAL= 0
DEBUG_LBT= 0
DEBUG_GPS= 0
DEBUG_RAD= 0
DEBUG_CAL= 0
DEBUG_SX1302= 0
DEBUG_FTIME= 0

View File

@ -0,0 +1,12 @@
[Unit]
Description=LoRa SX1302 Packet Forward service
[Service]
WorkingDirectory=/etc/lora1302-pktfwd
ExecStart=/usr/bin/lora1302_pkt_fwd
Restart=always
RestartSec=1
WatchdogSec=200
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,61 @@
#!/bin/sh
# This script is intended to be used on SX1302 CoreCell platform, it performs
# the following actions:
# - export/unpexort GPIO7 used to reset the SX1302 chip
#
# Usage examples:
# ./reset_lgw.sh stop
# ./reset_lgw.sh start
# GPIO mapping has to be adapted with HW
#
#SX1302_RESET_PIN=
SX1302_RESET_PIN=132
WAIT_GPIO() {
sleep 0.1
}
init() {
# setup GPIOs
echo "$SX1302_RESET_PIN" > /sys/class/gpio/export; WAIT_GPIO
# set GPIOs as output
echo "out" > /sys/class/gpio/gpio$SX1302_RESET_PIN/direction; WAIT_GPIO
}
reset() {
echo "CoreCell reset through GPIO$SX1302_RESET_PIN..."
# write output for SX1302 CoreCell reset
echo "1" > /sys/class/gpio/gpio$SX1302_RESET_PIN/value; WAIT_GPIO
echo "0" > /sys/class/gpio/gpio$SX1302_RESET_PIN/value; WAIT_GPIO
}
term() {
# cleanup all GPIOs
if [ -d /sys/class/gpio/gpio$SX1302_RESET_PIN ]
then
echo "$SX1302_RESET_PIN" > /sys/class/gpio/unexport; WAIT_GPIO
fi
}
case "$1" in
start)
term # just in case
init
reset
;;
stop)
reset
term
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0

View File

@ -0,0 +1,94 @@
diff --git a/libloragw/inc/loragw_hal.h b/libloragw/inc/loragw_hal.h
index 6e153a3..0da82f9 100644
--- a/libloragw/inc/loragw_hal.h
+++ b/libloragw/inc/loragw_hal.h
@@ -128,6 +128,8 @@ License: Revised BSD License, see LICENSE.TXT file include in the project
/* Maximum size of Tx gain LUT */
#define TX_GAIN_LUT_SIZE_MAX 16
+#define MIN_SF56_PREAMBLE 12
+
/* Listen-Before-Talk */
#define LGW_LBT_CHANNEL_NB_MAX 16 /* Maximum number of LBT channels */
diff --git a/libloragw/src/loragw_hal.c b/libloragw/src/loragw_hal.c
index ffc8ec0..254281f 100644
--- a/libloragw/src/loragw_hal.c
+++ b/libloragw/src/loragw_hal.c
@@ -202,9 +202,11 @@ static lgw_context_t lgw_context = {
/* File handle to write debug logs */
FILE * log_file = NULL;
+#if USE_I2C_SENSOR
/* I2C temperature sensor handles */
static int ts_fd = -1;
static uint8_t ts_addr = 0xFF;
+#endif
/* I2C AD5338 handles */
static int ad_fd = -1;
@@ -1093,6 +1095,7 @@ int lgw_start(void) {
dbg_init_random();
if (CONTEXT_COM_TYPE == LGW_COM_SPI) {
+#if USE_I2C_SENSOR
/* Find the temperature sensor on the known supported ports */
for (i = 0; i < (int)(sizeof I2C_PORT_TEMP_SENSOR); i++) {
ts_addr = I2C_PORT_TEMP_SENSOR[i];
@@ -1116,7 +1119,7 @@ int lgw_start(void) {
printf("ERROR: no temperature sensor found.\n");
return LGW_HAL_ERROR;
}
-
+#endif
/* Configure ADC AD338R for full duplex (CN490 reference design) */
if (CONTEXT_BOARD.full_duplex == true) {
err = i2c_linuxdev_open(I2C_DEVICE, I2C_PORT_DAC_AD5338R, &ad_fd);
@@ -1222,13 +1225,14 @@ int lgw_stop(void) {
}
if (CONTEXT_COM_TYPE == LGW_COM_SPI) {
+#if USE_I2C_SENSOR
DEBUG_MSG("INFO: Closing I2C for temperature sensor\n");
x = i2c_linuxdev_close(ts_fd);
if (x != 0) {
printf("ERROR: failed to close I2C temperature sensor device (err=%i)\n", x);
err = LGW_HAL_ERROR;
}
-
+#endif
if (CONTEXT_BOARD.full_duplex == true) {
DEBUG_MSG("INFO: Closing I2C for AD5338R\n");
x = i2c_linuxdev_close(ad_fd);
@@ -1589,7 +1593,7 @@ int lgw_get_eui(uint64_t* eui) {
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
int lgw_get_temperature(float* temperature) {
- int err = LGW_HAL_ERROR;
+ int err = LGW_HAL_SUCCESS;
DEBUG_PRINTF(" --- %s\n", "IN");
@@ -1597,7 +1601,9 @@ int lgw_get_temperature(float* temperature) {
switch (CONTEXT_COM_TYPE) {
case LGW_COM_SPI:
+#if USE_I2C_SENSOR
err = stts751_get_temperature(ts_fd, ts_addr, temperature);
+#endif
break;
case LGW_COM_USB:
err = lgw_com_get_temperature(temperature);
diff --git a/libloragw/src/loragw_sx1302.c b/libloragw/src/loragw_sx1302.c
index aa330cd..cd8bde3 100644
--- a/libloragw/src/loragw_sx1302.c
+++ b/libloragw/src/loragw_sx1302.c
@@ -968,7 +968,7 @@ int sx1302_lora_modem_configure(uint32_t radio_freq_hz) {
/* Set preamble size to 10 (to handle 12 for SF5/SF6 and 8 for SF7->SF12) */
err |= lgw_reg_w(SX1302_REG_RX_TOP_TXRX_CFG7_PREAMBLE_SYMB_NB, 0); /* MSB */
- err |= lgw_reg_w(SX1302_REG_RX_TOP_TXRX_CFG6_PREAMBLE_SYMB_NB, 10); /* LSB */
+ err |= lgw_reg_w(SX1302_REG_RX_TOP_TXRX_CFG6_PREAMBLE_SYMB_NB, MIN_SF56_PREAMBLE); /* LSB */
/* Freq2TimeDrift computation */
if (calculate_freq_to_time_drift(radio_freq_hz, BW_125KHZ, &mantissa, &exponent) != 0) {

View File

@ -0,0 +1,77 @@
DESCRIPTION = "Driver/HAL to build a gateway using a concentrator board based on Semtech SX1302"
HOMEPAGE = "https://github.com/Lora-net/sx1302_hal"
PRIORITY = "optional"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb"
#PR = "2.1.0"
#PRR = "r1"
SRC_URI = "git://github.com/Lora-net/sx1302_hal.git;protocol=http;tag=V${PV}"
SRC_URI += "file://library.cfg \
file://reset_lgw.sh \
file://global_conf.json \
file://lora_sx1302_pktfwd.service \
file://sx1302-remove-i2c-temperature.patch \
"
inherit systemd
SYSTEMD_SERVICE_${PN} = "lora_sx1302_pktfwd.service"
SYSTEMD_AUTO_ENABLE ?= "disable"
S = "${WORKDIR}/git"
# Use clang as we will be linking against this library using Rust. With the
# default gcc we get link errors.
TOOLCHAIN = "clang"
CFLAGS += "-I inc -I ../libtools/inc"
do_configure_append() {
cp ${WORKDIR}/library.cfg ${S}/libloragw/library.cfg
}
do_compile() {
oe_runmake
}
do_install() {
install -d ${D}${bindir}
install -d ${D}${libdir}/libloragw-sx1302
install -d ${D}${includedir}/libloragw-sx1302
install -d ${D}${systemd_unitdir}/system/
install -m 0644 libtools/*.a ${D}${libdir}
install -m 0644 libtools/inc/* ${D}${includedir}
install -m 0644 libloragw/libloragw.a ${D}${libdir}/libloragw-sx1302.a
install -m 0644 libloragw/inc/* ${D}${includedir}/libloragw-sx1302
install -d ${D}/opt/libloragw-sx1302/gateway-utils
install -d ${D}/opt/libloragw-sx1302/mcu_bin
install -m 0755 util_boot/boot ${D}/opt/libloragw-sx1302/gateway-utils/
install -m 0644 mcu_bin/* ${D}/opt/libloragw-sx1302/mcu_bin/
install -m 0755 packet_forwarder/lora_pkt_fwd ${D}${bindir}/lora1302_pkt_fwd
install -d ${D}${sysconfdir}/lora1302-pktfwd
install -d ${D}${sysconfdir}/lora1302-pktfwd/global_conf
install -m 0644 packet_forwarder/global_conf.json.* ${D}${sysconfdir}/lora1302-pktfwd/global_conf/
install -m 0755 ${WORKDIR}/reset_lgw.sh ${D}${sysconfdir}/lora1302-pktfwd/reset_lgw.sh
install -m 0644 ${WORKDIR}/global_conf.json ${D}${sysconfdir}/lora1302-pktfwd/global_conf.json
install -m 0644 ${WORKDIR}/lora_sx1302_pktfwd.service ${D}${systemd_unitdir}/system/
}
PACKAGES += "${PN}-utils"
FILES_${PN} = "${libdir} ${bindir} ${sysconfdir}/lora1302-pktfwd"
FILES_${PN}-staticdev = "${libdir}"
FILES_${PN}-dev = "${includedir}"
FILES_${PN}-utils = "/opt/libloragw-sx1302/gateway-utils/* /opt/libloragw-sx1302/mcu_bin/*"
INSANE_SKIP_${PN}-utils = "ldflags"
INSANE_SKIP_${PN} = "ldflags"

View File

@ -0,0 +1,213 @@
{
"SX1301_conf": {
"lorawan_public": true,
"clksrc": 1,
"clksrc_desc": "radio_1 provides clock to concentrator for most devices except MultiTech. For MultiTech set to 0.",
"antenna_gain": 0,
"antenna_gain_desc": "antenna gain, in dBi",
"radio_0": {
"enable": true,
"type": "SX1255",
"freq": 486600000,
"rssi_offset": -171.0,
"tx_enable": true,
"tx_freq_min": 470000000,
"tx_freq_max": 510000000
},
"radio_1": {
"enable": true,
"type": "SX1255",
"freq": 487400000,
"rssi_offset": -171.0,
"tx_enable": false
},
"chan_multiSF_0": {
"desc": "Lora MAC, 125kHz, all SF, 487.1 MHz",
"enable": true,
"radio": 1,
"if": -300000
},
"chan_multiSF_1": {
"desc": "Lora MAC, 125kHz, all SF, 487.3 MHz",
"enable": true,
"radio": 1,
"if": -100000
},
"chan_multiSF_2": {
"desc": "Lora MAC, 125kHz, all SF, 487.5 MHz",
"enable": true,
"radio": 1,
"if": 100000
},
"chan_multiSF_3": {
"desc": "Lora MAC, 125kHz, all SF, 487.7 MHz",
"enable": true,
"radio": 1,
"if": 300000
},
"chan_multiSF_4": {
"desc": "Lora MAC, 125kHz, all SF, 486.3 MHz",
"enable": true,
"radio": 0,
"if": -300000
},
"chan_multiSF_5": {
"desc": "Lora MAC, 125kHz, all SF, 486.5 MHz",
"enable": true,
"radio": 0,
"if": -100000
},
"chan_multiSF_6": {
"desc": "Lora MAC, 125kHz, all SF, 486.7 MHz",
"enable": true,
"radio": 0,
"if": 100000
},
"chan_multiSF_7": {
"desc": "Lora MAC, 125kHz, all SF, 486.9 MHz",
"enable": true,
"radio": 0,
"if": 300000
},
"chan_Lora_std": {
"desc": "disabled",
"enable": false
},
"chan_FSK": {
"desc": "disabled",
"enable": false
},
"tx_lut_0": {
"desc": "TX gain table, index 0",
"pa_gain": 0,
"mix_gain": 8,
"rf_power": -6,
"dig_gain": 0
},
"tx_lut_1": {
"desc": "TX gain table, index 1",
"pa_gain": 0,
"mix_gain": 9,
"rf_power": -3,
"dig_gain": 0
},
"tx_lut_2": {
"desc": "TX gain table, index 2",
"pa_gain": 0,
"mix_gain": 12,
"rf_power": 0,
"dig_gain": 0
},
"tx_lut_3": {
"desc": "TX gain table, index 3",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 3,
"dig_gain": 0
},
"tx_lut_4": {
"desc": "TX gain table, index 4",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 6,
"dig_gain": 2
},
"tx_lut_5": {
"desc": "TX gain table, index 5",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 10,
"dig_gain": 1
},
"tx_lut_6": {
"desc": "TX gain table, index 6",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 11,
"dig_gain": 0
},
"tx_lut_7": {
"desc": "TX gain table, index 7",
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 12,
"dig_gain": 1
},
"tx_lut_8": {
"desc": "TX gain table, index 8",
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 13,
"dig_gain": 0
},
"tx_lut_9": {
"desc": "TX gain table, index 9",
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 14,
"dig_gain": 2
},
"tx_lut_10": {
"desc": "TX gain table, index 10",
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 16,
"dig_gain": 0
},
"tx_lut_11": {
"desc": "TX gain table, index 11",
"pa_gain": 3,
"mix_gain": 9,
"rf_power": 20,
"dig_gain": 0
},
"tx_lut_12": {
"desc": "TX gain table, index 12",
"pa_gain": 3,
"mix_gain": 12,
"rf_power": 23,
"dig_gain": 0
},
"tx_lut_13": {
"desc": "TX gain table, index 13",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 25,
"dig_gain": 0
},
"tx_lut_14": {
"desc": "TX gain table, index 14",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 26,
"dig_gain": 0
},
"tx_lut_15": {
"desc": "TX gain table, index 15",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 27,
"dig_gain": 0
}
},
"gateway_conf": {
"gateway_ID": "393431314c002500",
/* change with default server address/ports, or overwrite in local_conf.json */
"server_address": "127.0.0.1",
"serv_port_up": 1700,
"serv_port_down": 1700,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
}
}

View File

@ -0,0 +1,205 @@
{
"gateway_conf":{
"gateway_ID":"0000000000000000",
"server_address":"router.as2.thethings.network",
"serv_port_up":1700,
"serv_port_down":1700,
"forward_crc_disabled":false,
"forward_crc_error":false,
"forward_crc_valid":true,
"keepalive_interval":10,
"stat_interval":30,
"push_timeout_ms":100,
"fake_gps":false,
"autoquit_threshold":30
},
"SX1301_conf":
{
"lorawan_public":true,
"clksrc":1,
"antenna_gain":0,
"radio_0":{
"enable":true,
"type":"SX1257",
"freq":923000000,
"rssi_offset":-166,
"tx_enable":true,
"tx_freq_min":921800000,
"tx_freq_max":923600000
},
"radio_1":{
"enable":true,
"type":"SX1257",
"freq":922000000,
"rssi_offset":-166,
"tx_enable":false
},
"chan_multiSF_0":{
"enable":true,
"radio":0,
"if":200000
},
"chan_multiSF_1":{
"enable":true,
"radio":0,
"if":400000
},
"chan_multiSF_2":{
"enable":true,
"radio":1,
"if":200000
},
"chan_multiSF_3":{
"enable":true,
"radio":1,
"if":400000
},
"chan_multiSF_4":{
"enable":true,
"radio":0,
"if":-400000
},
"chan_multiSF_5":{
"enable":true,
"radio":0,
"if":-200000
},
"chan_multiSF_6":{
"enable":true,
"radio":1,
"if":0
},
"chan_multiSF_7":{
"enable":true,
"radio":0,
"if":0
},
"chan_Lora_std":{
"enable":true,
"radio":1,
"if":100000,
"bandwidth":250000,
"spread_factor":7
},
"chan_FSK":{
"enable":true,
"radio":1,
"if":-200000,
"bandwidth":125000,
"datarate":50000
},
"tx_lut_0": {
"desc": "TX gain table, index 0",
"pa_gain": 0,
"mix_gain": 8,
"rf_power": -6,
"dig_gain": 0
},
"tx_lut_1": {
"desc": "TX gain table, index 1",
"pa_gain": 0,
"mix_gain": 10,
"rf_power": -3,
"dig_gain": 0
},
"tx_lut_2": {
"desc": "TX gain table, index 2",
"pa_gain": 0,
"mix_gain": 14,
"rf_power": 0,
"dig_gain": 0
},
"tx_lut_3": {
"desc": "TX gain table, index 3",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 3,
"dig_gain": 2
},
"tx_lut_4": {
"desc": "TX gain table, index 4",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 6,
"dig_gain": 1
},
"tx_lut_5": {
"desc": "TX gain table, index 5",
"pa_gain": 1,
"mix_gain": 9,
"rf_power": 10,
"dig_gain": 1
},
"tx_lut_6": {
"desc": "TX gain table, index 6",
"pa_gain": 1,
"mix_gain": 9,
"rf_power": 11,
"dig_gain": 0
},
"tx_lut_7": {
"desc": "TX gain table, index 7",
"pa_gain": 2,
"mix_gain": 8,
"rf_power": 12,
"dig_gain": 0
},
"tx_lut_8": {
"desc": "TX gain table, index 8",
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 13,
"dig_gain": 1
},
"tx_lut_9": {
"desc": "TX gain table, index 9",
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 14,
"dig_gain": 0
},
"tx_lut_10": {
"desc": "TX gain table, index 10",
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 16,
"dig_gain": 0
},
"tx_lut_11": {
"desc": "TX gain table, index 11",
"pa_gain": 3,
"mix_gain": 8,
"rf_power": 20,
"dig_gain": 0
},
"tx_lut_12": {
"desc": "TX gain table, index 12",
"pa_gain": 3,
"mix_gain": 10,
"rf_power": 23,
"dig_gain": 0
},
"tx_lut_13": {
"desc": "TX gain table, index 13",
"pa_gain": 3,
"mix_gain": 12,
"rf_power": 25,
"dig_gain": 0
},
"tx_lut_14": {
"desc": "TX gain table, index 14",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 26,
"dig_gain": 0
},
"tx_lut_15": {
"desc": "TX gain table, index 15",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 27,
"dig_gain": 0
}
}
}

View File

@ -0,0 +1,222 @@
{
"SX1301_conf": {
"lorawan_public": true,
"clksrc": 1,
"clksrc_desc": "radio_1 provides clock to concentrator for most devices except MultiTech. For MultiTech set to 0.",
"antenna_gain": 0,
"antenna_gain_desc": "antenna gain, in dBi",
"radio_0": {
"enable": true,
"type": "SX1257",
"freq": 923600000,
"rssi_offset": -159.0,
"tx_enable": true,
"tx_freq_min": 923200000,
"tx_freq_max": 925000000
},
"radio_1": {
"enable": true,
"type": "SX1257",
"freq": 924600000,
"rssi_offset": -159.0,
"tx_enable": false
},
"chan_multiSF_0": {
"desc": "Lora MAC, 125kHz, all SF, 923.2 MHz",
"enable": true,
"radio": 0,
"if": -400000
},
"chan_multiSF_1": {
"desc": "Lora MAC, 125kHz, all SF, 923.4 MHz",
"enable": true,
"radio": 0,
"if": -200000
},
"chan_multiSF_2": {
"desc": "Lora MAC, 125kHz, all SF, 923.6 MHz",
"enable": true,
"radio": 0,
"if": 0
},
"chan_multiSF_3": {
"desc": "Lora MAC, 125kHz, all SF, 923.8 MHz",
"enable": true,
"radio": 0,
"if": 200000
},
"chan_multiSF_4": {
"desc": "Lora MAC, 125kHz, all SF, 924.0 MHz",
"enable": true,
"radio": 0,
"if": 400000
},
"chan_multiSF_5": {
"desc": "Lora MAC, 125kHz, all SF, 924.2 MHz",
"enable": true,
"radio": 1,
"if": -400000
},
"chan_multiSF_6": {
"desc": "Lora MAC, 125kHz, all SF, 924.4 MHz",
"enable": true,
"radio": 1,
"if": -200000
},
"chan_multiSF_7": {
"desc": "Lora MAC, 125kHz, all SF, 924.6 MHz",
"enable": true,
"radio": 1,
"if": 0
},
"chan_Lora_std": {
"desc": "Lora MAC, 250kHz, SF7, 924.5 MHz",
"enable": true,
"radio": 1,
"if": -100000,
"bandwidth": 250000,
"spread_factor": 7
},
"chan_FSK": {
"desc": "FSK 50kbps, 924.8 MHz",
"enable": true,
"radio": 1,
"if": 200000,
"bandwidth": 125000,
"datarate": 50000
},
"tx_lut_0": {
"desc": "TX gain table, index 0",
"pa_gain": 0,
"mix_gain": 8,
"rf_power": -6,
"dig_gain": 0
},
"tx_lut_1": {
"desc": "TX gain table, index 1",
"pa_gain": 0,
"mix_gain": 10,
"rf_power": -3,
"dig_gain": 0
},
"tx_lut_2": {
"desc": "TX gain table, index 2",
"pa_gain": 0,
"mix_gain": 14,
"rf_power": 0,
"dig_gain": 0
},
"tx_lut_3": {
"desc": "TX gain table, index 3",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 3,
"dig_gain": 2
},
"tx_lut_4": {
"desc": "TX gain table, index 4",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 6,
"dig_gain": 1
},
"tx_lut_5": {
"desc": "TX gain table, index 5",
"pa_gain": 1,
"mix_gain": 9,
"rf_power": 10,
"dig_gain": 1
},
"tx_lut_6": {
"desc": "TX gain table, index 6",
"pa_gain": 1,
"mix_gain": 9,
"rf_power": 11,
"dig_gain": 0
},
"tx_lut_7": {
"desc": "TX gain table, index 7",
"pa_gain": 2,
"mix_gain": 8,
"rf_power": 12,
"dig_gain": 0
},
"tx_lut_8": {
"desc": "TX gain table, index 8",
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 13,
"dig_gain": 1
},
"tx_lut_9": {
"desc": "TX gain table, index 9",
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 14,
"dig_gain": 0
},
"tx_lut_10": {
"desc": "TX gain table, index 10",
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 16,
"dig_gain": 0
},
"tx_lut_11": {
"desc": "TX gain table, index 11",
"pa_gain": 3,
"mix_gain": 8,
"rf_power": 20,
"dig_gain": 0
},
"tx_lut_12": {
"desc": "TX gain table, index 12",
"pa_gain": 3,
"mix_gain": 10,
"rf_power": 23,
"dig_gain": 0
},
"tx_lut_13": {
"desc": "TX gain table, index 13",
"pa_gain": 3,
"mix_gain": 12,
"rf_power": 25,
"dig_gain": 0
},
"tx_lut_14": {
"desc": "TX gain table, index 14",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 26,
"dig_gain": 0
},
"tx_lut_15": {
"desc": "TX gain table, index 15",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 27,
"dig_gain": 0
}
},
"gateway_conf": {
"gateway_ID": "0000000000000000",
/* change with default server address/ports, or overwrite in local_conf.json */
"server_address": "router.as2.thethings.network",
"serv_port_up": 1700,
"serv_port_down": 1700,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
"fake_gps": false,
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
}
}

View File

@ -0,0 +1,219 @@
{
"SX1301_conf": {
"lorawan_public": true,
"clksrc": 1,
"clksrc_desc": "radio_1 provides clock to concentrator for most devices except MultiTech. For MultiTech set to 0.",
"antenna_gain": 0,
"antenna_gain_desc": "antenna gain, in dBi",
"radio_0": {
"enable": true,
"type": "SX1257",
"freq": 917200000,
"rssi_offset": -159.0,
"tx_enable": true,
"tx_freq_min": 915000000,
"tx_freq_max": 928000000
},
"radio_1": {
"enable": true,
"type": "SX1257",
"freq": 917900000,
"rssi_offset": -159.0,
"tx_enable": false
},
"chan_multiSF_0": {
"desc": "Lora MAC, 125kHz, all SF, 916.8 MHz",
"enable": true,
"radio": 0,
"if": -400000
},
"chan_multiSF_1": {
"desc": "Lora MAC, 125kHz, all SF, 917.0 MHz",
"enable": true,
"radio": 0,
"if": -200000
},
"chan_multiSF_2": {
"desc": "Lora MAC, 125kHz, all SF, 917.2 MHz",
"enable": true,
"radio": 0,
"if": 0
},
"chan_multiSF_3": {
"desc": "Lora MAC, 125kHz, all SF, 917.4 MHz",
"enable": true,
"radio": 0,
"if": 200000
},
"chan_multiSF_4": {
"desc": "Lora MAC, 125kHz, all SF, 917.6 MHz",
"enable": true,
"radio": 1,
"if": -300000
},
"chan_multiSF_5": {
"desc": "Lora MAC, 125kHz, all SF, 917.8 MHz",
"enable": true,
"radio": 1,
"if": -100000
},
"chan_multiSF_6": {
"desc": "Lora MAC, 125kHz, all SF, 918.0 MHz",
"enable": true,
"radio": 1,
"if": 100000
},
"chan_multiSF_7": {
"desc": "Lora MAC, 125kHz, all SF, 918.2 MHz",
"enable": true,
"radio": 1,
"if": 300000
},
"chan_Lora_std": {
"desc": "Lora MAC, 500kHz, SF8, 917.5 MHz",
"enable": true,
"radio": 0,
"if": 300000,
"bandwidth": 500000,
"spread_factor": 8
},
"chan_FSK": {
"desc": "disabled",
"enable": false
},
"tx_lut_0": {
"desc": "TX gain table, index 0",
"pa_gain": 0,
"mix_gain": 8,
"rf_power": -6,
"dig_gain": 0
},
"tx_lut_1": {
"desc": "TX gain table, index 1",
"pa_gain": 0,
"mix_gain": 10,
"rf_power": -3,
"dig_gain": 0
},
"tx_lut_2": {
"desc": "TX gain table, index 2",
"pa_gain": 0,
"mix_gain": 14,
"rf_power": 0,
"dig_gain": 0
},
"tx_lut_3": {
"desc": "TX gain table, index 3",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 3,
"dig_gain": 2
},
"tx_lut_4": {
"desc": "TX gain table, index 4",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 6,
"dig_gain": 1
},
"tx_lut_5": {
"desc": "TX gain table, index 5",
"pa_gain": 1,
"mix_gain": 9,
"rf_power": 10,
"dig_gain": 1
},
"tx_lut_6": {
"desc": "TX gain table, index 6",
"pa_gain": 1,
"mix_gain": 9,
"rf_power": 11,
"dig_gain": 0
},
"tx_lut_7": {
"desc": "TX gain table, index 7",
"pa_gain": 2,
"mix_gain": 8,
"rf_power": 12,
"dig_gain": 0
},
"tx_lut_8": {
"desc": "TX gain table, index 8",
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 13,
"dig_gain": 1
},
"tx_lut_9": {
"desc": "TX gain table, index 9",
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 14,
"dig_gain": 0
},
"tx_lut_10": {
"desc": "TX gain table, index 10",
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 16,
"dig_gain": 0
},
"tx_lut_11": {
"desc": "TX gain table, index 11",
"pa_gain": 3,
"mix_gain": 8,
"rf_power": 20,
"dig_gain": 0
},
"tx_lut_12": {
"desc": "TX gain table, index 12",
"pa_gain": 3,
"mix_gain": 10,
"rf_power": 23,
"dig_gain": 0
},
"tx_lut_13": {
"desc": "TX gain table, index 13",
"pa_gain": 3,
"mix_gain": 12,
"rf_power": 25,
"dig_gain": 0
},
"tx_lut_14": {
"desc": "TX gain table, index 14",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 26,
"dig_gain": 0
},
"tx_lut_15": {
"desc": "TX gain table, index 15",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 27,
"dig_gain": 0
}
},
"gateway_conf": {
"gateway_ID": "0000000000000000",
/* change with default server address/ports, or overwrite in local_conf.json */
"server_address": "router.au.thethings.network",
"serv_port_up": 1700,
"serv_port_down": 1700,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
"fake_gps": false,
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
}
}

View File

@ -0,0 +1,214 @@
{
"SX1301_conf": {
"lorawan_public": true,
"clksrc": 1,
"clksrc_desc": "radio_1 provides clock to concentrator for most devices except MultiTech. For MultiTech set to 0.",
"antenna_gain": 0,
"antenna_gain_desc": "antenna gain, in dBi",
"radio_0": {
"enable": true,
"type": "SX1255",
"freq": 486600000,
"rssi_offset": -171.0,
"tx_enable": true,
"tx_freq_min": 470000000,
"tx_freq_max": 510000000
},
"radio_1": {
"enable": true,
"type": "SX1255",
"freq": 487400000,
"rssi_offset": -171.0,
"tx_enable": false
},
"chan_multiSF_0": {
"desc": "Lora MAC, 125kHz, all SF, 487.1 MHz",
"enable": true,
"radio": 1,
"if": -300000
},
"chan_multiSF_1": {
"desc": "Lora MAC, 125kHz, all SF, 487.3 MHz",
"enable": true,
"radio": 1,
"if": -100000
},
"chan_multiSF_2": {
"desc": "Lora MAC, 125kHz, all SF, 487.5 MHz",
"enable": true,
"radio": 1,
"if": 100000
},
"chan_multiSF_3": {
"desc": "Lora MAC, 125kHz, all SF, 487.7 MHz",
"enable": true,
"radio": 1,
"if": 300000
},
"chan_multiSF_4": {
"desc": "Lora MAC, 125kHz, all SF, 486.3 MHz",
"enable": true,
"radio": 0,
"if": -300000
},
"chan_multiSF_5": {
"desc": "Lora MAC, 125kHz, all SF, 486.5 MHz",
"enable": true,
"radio": 0,
"if": -100000
},
"chan_multiSF_6": {
"desc": "Lora MAC, 125kHz, all SF, 486.7 MHz",
"enable": true,
"radio": 0,
"if": 100000
},
"chan_multiSF_7": {
"desc": "Lora MAC, 125kHz, all SF, 486.9 MHz",
"enable": true,
"radio": 0,
"if": 300000
},
"chan_Lora_std": {
"desc": "disabled",
"enable": false
},
"chan_FSK": {
"desc": "disabled",
"enable": false
},
"tx_lut_0": {
"desc": "TX gain table, index 0",
"pa_gain": 0,
"mix_gain": 8,
"rf_power": -6,
"dig_gain": 0
},
"tx_lut_1": {
"desc": "TX gain table, index 1",
"pa_gain": 0,
"mix_gain": 9,
"rf_power": -3,
"dig_gain": 0
},
"tx_lut_2": {
"desc": "TX gain table, index 2",
"pa_gain": 0,
"mix_gain": 12,
"rf_power": 0,
"dig_gain": 0
},
"tx_lut_3": {
"desc": "TX gain table, index 3",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 3,
"dig_gain": 0
},
"tx_lut_4": {
"desc": "TX gain table, index 4",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 6,
"dig_gain": 2
},
"tx_lut_5": {
"desc": "TX gain table, index 5",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 10,
"dig_gain": 1
},
"tx_lut_6": {
"desc": "TX gain table, index 6",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 11,
"dig_gain": 0
},
"tx_lut_7": {
"desc": "TX gain table, index 7",
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 12,
"dig_gain": 1
},
"tx_lut_8": {
"desc": "TX gain table, index 8",
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 13,
"dig_gain": 0
},
"tx_lut_9": {
"desc": "TX gain table, index 9",
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 14,
"dig_gain": 2
},
"tx_lut_10": {
"desc": "TX gain table, index 10",
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 16,
"dig_gain": 0
},
"tx_lut_11": {
"desc": "TX gain table, index 11",
"pa_gain": 3,
"mix_gain": 9,
"rf_power": 20,
"dig_gain": 0
},
"tx_lut_12": {
"desc": "TX gain table, index 12",
"pa_gain": 3,
"mix_gain": 12,
"rf_power": 23,
"dig_gain": 0
},
"tx_lut_13": {
"desc": "TX gain table, index 13",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 25,
"dig_gain": 0
},
"tx_lut_14": {
"desc": "TX gain table, index 14",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 26,
"dig_gain": 0
},
"tx_lut_15": {
"desc": "TX gain table, index 15",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 27,
"dig_gain": 0
}
},
"gateway_conf": {
"gateway_ID": "0000000000000000",
/* change with default server address/ports, or overwrite in local_conf.json */
"server_address": "router.cn.thethings.network",
"serv_port_up": 1700,
"serv_port_down": 1700,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
"fake_gps": false,
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
}
}

View File

@ -0,0 +1,221 @@
{
"SX1301_conf": {
"lorawan_public": true,
"clksrc": 1, /* radio_1 provides clock to concentrator */
"antenna_gain": 0, /* antenna gain, in dBi */
"radio_0": {
"enable": true,
"type": "SX1255",
"freq": 434375000,
"rssi_offset": -176.0,
"tx_enable": true,
"tx_freq_min": 433050000,
"tx_freq_max": 434900000
},
"radio_1": {
"enable": true,
"type": "SX1255",
"freq": 433575000,
"rssi_offset": -176.0,
"tx_enable": false
},
"chan_multiSF_0": {
/* Lora MAC channel, 125kHz, all SF, 433.175 MHz */
"enable": true,
"radio": 1,
"if": -400000
},
"chan_multiSF_1": {
/* Lora MAC channel, 125kHz, all SF, 433.375 MHz */
"enable": true,
"radio": 1,
"if": -200000
},
"chan_multiSF_2": {
/* Lora MAC channel, 125kHz, all SF, 433.575 MHz */
"enable": true,
"radio": 1,
"if": 0
},
"chan_multiSF_3": {
/* Lora MAC channel, 125kHz, all SF, 433.775 MHz */
"enable": true,
"radio": 1,
"if": 200000
},
"chan_multiSF_4": {
/* Lora MAC channel, 125kHz, all SF, 433.975 MHz */
"enable": true,
"radio": 0,
"if": -400000
},
"chan_multiSF_5": {
/* Lora MAC channel, 125kHz, all SF, 434.175 MHz */
"enable": true,
"radio": 0,
"if": -200000
},
"chan_multiSF_6": {
/* Lora MAC channel, 125kHz, all SF, 434.375 MHz */
"enable": true,
"radio": 0,
"if": 0
},
"chan_multiSF_7": {
/* Lora MAC channel, 125kHz, all SF, 434.575 MHz */
"enable": true,
"radio": 0,
"if": 200000
},
"chan_Lora_std": {
/* Lora MAC channel, 250kHz, SF7, 434.175 MHz */
"enable": true,
"radio": 1,
"if": -200000,
"bandwidth": 250000,
"spread_factor": 7
},
"chan_FSK": {
/* FSK 50kbps channel, 434.675 MHz */
"enable": true,
"radio": 1,
"if": 300000,
"bandwidth": 125000,
"datarate": 50000
},
"tx_lut_0": {
/* TX gain table, index 0 */
"pa_gain": 0,
"mix_gain": 9,
"rf_power": -6,
"dig_gain": 0
},
"tx_lut_1": {
/* TX gain table, index 1 */
"pa_gain": 0,
"mix_gain": 12,
"rf_power": -3,
"dig_gain": 0
},
"tx_lut_2": {
/* TX gain table, index 2 */
"pa_gain": 0,
"mix_gain": 15,
"rf_power": 0,
"dig_gain": 0
},
"tx_lut_3": {
/* TX gain table, index 3 */
"pa_gain": 1,
"mix_gain": 9,
"rf_power": 3,
"dig_gain": 3
},
"tx_lut_4": {
/* TX gain table, index 4 */
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 6,
"dig_gain": 3
},
"tx_lut_5": {
/* TX gain table, index 5 */
"pa_gain": 2,
"mix_gain": 8,
"rf_power": 10,
"dig_gain": 0
},
"tx_lut_6": {
/* TX gain table, index 6 */
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 11,
"dig_gain": 0
},
"tx_lut_7": {
/* TX gain table, index 7 */
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 12,
"dig_gain": 1
},
"tx_lut_8": {
/* TX gain table, index 8 */
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 13,
"dig_gain": 0
},
"tx_lut_9": {
/* TX gain table, index 9 */
"pa_gain": 2,
"mix_gain": 11,
"rf_power": 14,
"dig_gain": 1
},
"tx_lut_10": {
/* TX gain table, index 10 */
"pa_gain": 2,
"mix_gain": 12,
"rf_power": 16,
"dig_gain": 0
},
"tx_lut_11": {
/* TX gain table, index 11 */
"pa_gain": 3,
"mix_gain": 8,
"rf_power": 20,
"dig_gain": 0
},
"tx_lut_12": {
"desc": "TX gain table, index 12",
"pa_gain": 3,
"mix_gain": 11,
"rf_power": 23,
"dig_gain": 0
},
"tx_lut_13": {
"desc": "TX gain table, index 13",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 25,
"dig_gain": 0
},
"tx_lut_14": {
"desc": "TX gain table, index 14",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 26,
"dig_gain": 0
},
"tx_lut_15": {
"desc": "TX gain table, index 15",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 27,
"dig_gain": 0
}
},
"gateway_conf": {
"gateway_ID": "0000000000000000",
/* change with default server address/ports, or overwrite in local_conf.json */
"server_address": "localhost",
"serv_port_up": 1700,
"serv_port_down": 1700,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
"fake_gps": false,
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
}
}

View File

@ -0,0 +1,197 @@
{
"SX1301_conf": {
"lorawan_public": true,
"clksrc": 1,
"antenna_gain": 0,
"radio_0": {
"enable": true,
"type": "SX1257",
"freq": 867500000,
"rssi_offset": -158.0,
"tx_enable": true,
"tx_freq_min": 863000000,
"tx_freq_max": 870000000
},
"radio_1": {
"enable": true,
"type": "SX1257",
"freq": 868500000,
"rssi_offset": -158.0,
"tx_enable": false
},
"chan_multiSF_0": {
"enable": true,
"radio": 1,
"if": -400000
},
"chan_multiSF_1": {
"enable": true,
"radio": 1,
"if": -200000
},
"chan_multiSF_2": {
"enable": true,
"radio": 1,
"if": 0
},
"chan_multiSF_3": {
"enable": true,
"radio": 0,
"if": -400000
},
"chan_multiSF_4": {
"enable": true,
"radio": 0,
"if": -200000
},
"chan_multiSF_5": {
"enable": true,
"radio": 0,
"if": 0
},
"chan_multiSF_6": {
"enable": true,
"radio": 0,
"if": 200000
},
"chan_multiSF_7": {
"enable": true,
"radio": 0,
"if": 400000
},
"chan_Lora_std": {
"enable": true,
"radio": 1,
"if": -200000,
"bandwidth": 250000,
"spread_factor": 7
},
"chan_FSK": {
"enable": true,
"radio": 1,
"if": 300000,
"bandwidth": 125000,
"datarate": 50000
},
"tx_lut_0": {
"pa_gain": 0,
"mix_gain": 10,
"rf_power": -6,
"dig_gain": 0
},
"tx_lut_1": {
"pa_gain": 0,
"mix_gain": 14,
"rf_power": -3,
"dig_gain": 0
},
"tx_lut_2": {
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 0,
"dig_gain": 3
},
"tx_lut_3": {
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 3,
"dig_gain": 3
},
"tx_lut_4": {
"pa_gain": 1,
"mix_gain": 9,
"rf_power": 6,
"dig_gain": 1
},
"tx_lut_5": {
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 10,
"dig_gain": 0
},
"tx_lut_6": {
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 11,
"dig_gain": 0
},
"tx_lut_7": {
"pa_gain": 2,
"mix_gain": 11,
"rf_power": 12,
"dig_gain": 0
},
"tx_lut_8": {
"pa_gain": 2,
"mix_gain": 12,
"rf_power": 13,
"dig_gain": 1
},
"tx_lut_9": {
"pa_gain": 2,
"mix_gain": 12,
"rf_power": 14,
"dig_gain": 0
},
"tx_lut_10": {
"pa_gain": 3,
"mix_gain": 8,
"rf_power": 16,
"dig_gain": 1
},
"tx_lut_11": {
"pa_gain": 3,
"mix_gain": 10,
"rf_power": 20,
"dig_gain": 0
},
"tx_lut_12": {
"desc": "TX gain table, index 12",
"pa_gain": 3,
"mix_gain": 12,
"rf_power": 23,
"dig_gain": 0
},
"tx_lut_13": {
"desc": "TX gain table, index 13",
"pa_gain": 3,
"mix_gain": 14,
"rf_power": 25,
"dig_gain": 0
},
"tx_lut_14": {
"desc": "TX gain table, index 14",
"pa_gain": 3,
"mix_gain": 14,
"rf_power": 26,
"dig_gain": 0
},
"tx_lut_15": {
"desc": "TX gain table, index 15",
"pa_gain": 3,
"mix_gain": 14,
"rf_power": 27,
"dig_gain": 0
}
},
"gateway_conf": {
"gateway_ID": "0000000000000000",
/* change with default server address/ports, or overwrite in local_conf.json */
"server_address": "router.eu.thethings.network",
"serv_port_up": 1700,
"serv_port_down": 1700,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
"fake_gps": false,
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
}
}

View File

@ -0,0 +1,194 @@
{
"SX1301_conf": {
"lorawan_public": true,
"clksrc": 1,
"clksrc_desc": "radio_1 provides clock to concentrator for most devices except MultiTech. For MultiTech set to 0.",
"antenna_gain": 0,
"antenna_gain_desc": "antenna gain, in dBi",
"radio_0": {
"enable": true,
"type": "SX1257",
"freq": 865200000,
"rssi_offset": -158.0,
"tx_enable": true,
"tx_freq_min": 865000000,
"tx_freq_max": 867000000,
"tx_notch_freq": 129000
},
"radio_1": {
"enable": true,
"type": "SX1257",
"freq": 866385000,
"rssi_offset": -158.0,
"tx_enable": false
},
"chan_multiSF_0": {
"desc": "Lora MAC, 125kHz, all SF, 865.0625 MHz",
"enable": true,
"radio": 0,
"if": -137500
},
"chan_multiSF_1": {
"desc": "Lora MAC, 125kHz, all SF, 865.4025 MHz",
"enable": true,
"radio": 0,
"if": 202500
},
"chan_multiSF_2": {
"desc": "Lora MAC, 125kHz, all SF, 865.9850 MHz",
"enable": true,
"radio": 1,
"if": -400000
},
"chan_multiSF_3": {
"desc": "disabled",
"enable": false
},
"chan_multiSF_4": {
"desc": "disabled",
"enable": false
},
"chan_multiSF_5": {
"desc": "disabled",
"enable": false
},
"chan_multiSF_6": {
"desc": "disabled",
"enable": false
},
"chan_multiSF_7": {
"desc": "disabled",
"enable": false
},
"chan_Lora_std": {
"desc": "disabled",
"enable": false
},
"chan_FSK": {
"desc": "disabled",
"enable": false
},
"tx_lut_0": {
"pa_gain": 0,
"mix_gain": 10,
"rf_power": -6,
"dig_gain": 0
},
"tx_lut_1": {
"pa_gain": 0,
"mix_gain": 14,
"rf_power": -3,
"dig_gain": 0
},
"tx_lut_2": {
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 0,
"dig_gain": 3
},
"tx_lut_3": {
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 3,
"dig_gain": 3
},
"tx_lut_4": {
"pa_gain": 1,
"mix_gain": 9,
"rf_power": 6,
"dig_gain": 1
},
"tx_lut_5": {
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 10,
"dig_gain": 0
},
"tx_lut_6": {
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 11,
"dig_gain": 0
},
"tx_lut_7": {
"pa_gain": 2,
"mix_gain": 11,
"rf_power": 12,
"dig_gain": 0
},
"tx_lut_8": {
"pa_gain": 2,
"mix_gain": 12,
"rf_power": 13,
"dig_gain": 1
},
"tx_lut_9": {
"pa_gain": 2,
"mix_gain": 12,
"rf_power": 14,
"dig_gain": 0
},
"tx_lut_10": {
"pa_gain": 3,
"mix_gain": 8,
"rf_power": 16,
"dig_gain": 1
},
"tx_lut_11": {
"pa_gain": 3,
"mix_gain": 10,
"rf_power": 20,
"dig_gain": 0
},
"tx_lut_12": {
"desc": "TX gain table, index 12",
"pa_gain": 3,
"mix_gain": 12,
"rf_power": 23,
"dig_gain": 0
},
"tx_lut_13": {
"desc": "TX gain table, index 13",
"pa_gain": 3,
"mix_gain": 14,
"rf_power": 25,
"dig_gain": 0
},
"tx_lut_14": {
"desc": "TX gain table, index 14",
"pa_gain": 3,
"mix_gain": 14,
"rf_power": 26,
"dig_gain": 0
},
"tx_lut_15": {
"desc": "TX gain table, index 15",
"pa_gain": 3,
"mix_gain": 14,
"rf_power": 27,
"dig_gain": 0
}
},
"gateway_conf": {
"gateway_ID": "0000000000000000",
/* change with default server address/ports, or overwrite in local_conf.json */
"server_address": "router.as.thethings.network",
"serv_port_up": 1700,
"serv_port_down": 1700,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
"fake_gps": false,
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
}
}

View File

@ -0,0 +1,214 @@
{
"SX1301_conf": {
"lorawan_public": true,
"clksrc": 1,
"clksrc_desc": "radio_1 provides clock to concentrator for most devices except MultiTech. For MultiTech set to 0.",
"antenna_gain": 0,
"antenna_gain_desc": "antenna gain, in dBi",
"radio_0": {
"enable": true,
"type": "SX1257",
"freq": 922400000,
"rssi_offset": -159.0,
"tx_enable": true,
"tx_freq_min": 920900000,
"tx_freq_max": 923300000
},
"radio_1": {
"enable": true,
"type": "SX1257",
"freq": 923000000,
"rssi_offset": -159.0,
"tx_enable": false
},
"chan_multiSF_0": {
"desc": "Lora MAC, 125kHz, all SF, 922.1 MHz",
"enable": true,
"radio": 0,
"if": -300000
},
"chan_multiSF_1": {
"desc": "Lora MAC, 125kHz, all SF, 922.3 MHz",
"enable": true,
"radio": 0,
"if": -100000
},
"chan_multiSF_2": {
"desc": "Lora MAC, 125kHz, all SF, 922.5 MHz",
"enable": true,
"radio": 0,
"if": 100000
},
"chan_multiSF_3": {
"desc": "Lora MAC, 125kHz, all SF, 922.7 MHz",
"enable": true,
"radio": 0,
"if": 300000
},
"chan_multiSF_4": {
"desc": "Lora MAC, 125kHz, all SF, 922.9 MHz",
"enable": true,
"radio": 1,
"if": -100000
},
"chan_multiSF_5": {
"desc": "Lora MAC, 125kHz, all SF, 923.1 MHz",
"enable": true,
"radio": 1,
"if": 100000
},
"chan_multiSF_6": {
"desc": "Lora MAC, 125kHz, all SF, 923.3 MHz",
"enable": true,
"radio": 1,
"if": 300000
},
"chan_multiSF_7": {
"desc": "disabled",
"enable": false
},
"chan_Lora_std": {
"desc": "disabled",
"enable": false
},
"chan_FSK": {
"desc": "disabled",
"enable": false
},
"tx_lut_0": {
"desc": "TX gain table, index 0",
"pa_gain": 0,
"mix_gain": 8,
"rf_power": -6,
"dig_gain": 0
},
"tx_lut_1": {
"desc": "TX gain table, index 1",
"pa_gain": 0,
"mix_gain": 10,
"rf_power": -3,
"dig_gain": 0
},
"tx_lut_2": {
"desc": "TX gain table, index 2",
"pa_gain": 0,
"mix_gain": 14,
"rf_power": 0,
"dig_gain": 0
},
"tx_lut_3": {
"desc": "TX gain table, index 3",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 3,
"dig_gain": 2
},
"tx_lut_4": {
"desc": "TX gain table, index 4",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 6,
"dig_gain": 1
},
"tx_lut_5": {
"desc": "TX gain table, index 5",
"pa_gain": 1,
"mix_gain": 9,
"rf_power": 10,
"dig_gain": 1
},
"tx_lut_6": {
"desc": "TX gain table, index 6",
"pa_gain": 1,
"mix_gain": 9,
"rf_power": 11,
"dig_gain": 0
},
"tx_lut_7": {
"desc": "TX gain table, index 7",
"pa_gain": 2,
"mix_gain": 8,
"rf_power": 12,
"dig_gain": 0
},
"tx_lut_8": {
"desc": "TX gain table, index 8",
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 13,
"dig_gain": 1
},
"tx_lut_9": {
"desc": "TX gain table, index 9",
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 14,
"dig_gain": 0
},
"tx_lut_10": {
"desc": "TX gain table, index 10",
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 16,
"dig_gain": 0
},
"tx_lut_11": {
"desc": "TX gain table, index 11",
"pa_gain": 3,
"mix_gain": 8,
"rf_power": 20,
"dig_gain": 0
},
"tx_lut_12": {
"desc": "TX gain table, index 12",
"pa_gain": 3,
"mix_gain": 10,
"rf_power": 23,
"dig_gain": 0
},
"tx_lut_13": {
"desc": "TX gain table, index 13",
"pa_gain": 3,
"mix_gain": 12,
"rf_power": 25,
"dig_gain": 0
},
"tx_lut_14": {
"desc": "TX gain table, index 14",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 26,
"dig_gain": 0
},
"tx_lut_15": {
"desc": "TX gain table, index 15",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 27,
"dig_gain": 0
}
},
"gateway_conf": {
"gateway_ID": "0000000000000000",
/* change with default server address/ports, or overwrite in local_conf.json */
"server_address": "router.kr.thethings.network",
"serv_port_up": 1700,
"serv_port_down": 1700,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
"fake_gps": false,
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
}
}

View File

@ -0,0 +1,201 @@
{
"SX1301_conf": {
"lorawan_public": true,
"clksrc": 1,
"clksrc_desc": "radio_1 provides clock to concentrator for most devices except MultiTech. For MultiTech set to 0.",
"antenna_gain": 0,
"antenna_gain_desc": "antenna gain, in dBi",
"radio_0": {
"enable": true,
"type": "SX1257",
"freq": 864500000,
"rssi_offset": -158.0,
"tx_enable": true,
"tx_freq_min": 863000000,
"tx_freq_max": 870000000
},
"radio_1": {
"enable": true,
"type": "SX1257",
"freq": 869000000,
"rssi_offset": -158.0,
"tx_enable": false
},
"chan_multiSF_0": {
"desc": "Lora MAC, 125kHz, all SF, 864.1 MHz",
"enable": true,
"radio": 0,
"if": -400000
},
"chan_multiSF_1": {
"desc": "Lora MAC, 125kHz, all SF, 864.3 MHz",
"enable": true,
"radio": 0,
"if": -200000
},
"chan_multiSF_2": {
"desc": "Lora MAC, 125kHz, all SF, 864.5 MHz",
"enable": true,
"radio": 0,
"if": 0
},
"chan_multiSF_3": {
"desc": "Lora MAC, 125kHz, all SF, 864.7 MHz",
"enable": true,
"radio": 0,
"if": 200000
},
"chan_multiSF_4": {
"desc": "Lora MAC, 125kHz, all SF, 864.9 MHz",
"enable": true,
"radio": 0,
"if": 400000
},
"chan_multiSF_5": {
"desc": "Lora MAC, 125kHz, all SF, 868.9 MHz",
"enable": true,
"radio": 1,
"if": -100000
},
"chan_multiSF_6": {
"desc": "Lora MAC, 125kHz, all SF, 869.1 MHz",
"enable": true,
"radio": 1,
"if": 100000
},
"chan_multiSF_7": {
"desc": "disabled",
"enable": false
},
"chan_Lora_std": {
"desc": "disabled",
"enable": false
},
"chan_FSK": {
"desc": "disabled",
"enable": false
},
"tx_lut_0": {
"pa_gain": 0,
"mix_gain": 10,
"rf_power": -6,
"dig_gain": 0
},
"tx_lut_1": {
"pa_gain": 0,
"mix_gain": 14,
"rf_power": -3,
"dig_gain": 0
},
"tx_lut_2": {
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 0,
"dig_gain": 3
},
"tx_lut_3": {
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 3,
"dig_gain": 3
},
"tx_lut_4": {
"pa_gain": 1,
"mix_gain": 9,
"rf_power": 6,
"dig_gain": 1
},
"tx_lut_5": {
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 10,
"dig_gain": 0
},
"tx_lut_6": {
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 11,
"dig_gain": 0
},
"tx_lut_7": {
"pa_gain": 2,
"mix_gain": 11,
"rf_power": 12,
"dig_gain": 0
},
"tx_lut_8": {
"pa_gain": 2,
"mix_gain": 12,
"rf_power": 13,
"dig_gain": 1
},
"tx_lut_9": {
"pa_gain": 2,
"mix_gain": 12,
"rf_power": 14,
"dig_gain": 0
},
"tx_lut_10": {
"pa_gain": 3,
"mix_gain": 8,
"rf_power": 16,
"dig_gain": 1
},
"tx_lut_11": {
"pa_gain": 3,
"mix_gain": 10,
"rf_power": 20,
"dig_gain": 0
},
"tx_lut_12": {
"desc": "TX gain table, index 12",
"pa_gain": 3,
"mix_gain": 12,
"rf_power": 23,
"dig_gain": 0
},
"tx_lut_13": {
"desc": "TX gain table, index 13",
"pa_gain": 3,
"mix_gain": 14,
"rf_power": 25,
"dig_gain": 0
},
"tx_lut_14": {
"desc": "TX gain table, index 14",
"pa_gain": 3,
"mix_gain": 14,
"rf_power": 26,
"dig_gain": 0
},
"tx_lut_15": {
"desc": "TX gain table, index 15",
"pa_gain": 3,
"mix_gain": 14,
"rf_power": 27,
"dig_gain": 0
}
},
"gateway_conf": {
"gateway_ID": "0000000000000000",
/* change with default server address/ports, or overwrite in local_conf.json */
"server_address": "router.ru.thethings.network",
"serv_port_up": 1700,
"serv_port_down": 1700,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
"fake_gps": false,
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
}
}

View File

@ -0,0 +1,209 @@
{
"SX1301_conf": {
"lorawan_public": true,
"clksrc": 1,
"antenna_gain": 0,
"radio_0": {
"enable": true,
"type": "SX1257",
"freq": 904300000,
"rssi_offset": -159.0,
"tx_enable": true,
"tx_freq_min": 902000000,
"tx_freq_max": 928000000
},
"radio_1": {
"enable": true,
"type": "SX1257",
"freq": 905000000,
"rssi_offset": -159.0,
"tx_enable": false
},
"chan_multiSF_0": {
"enable": true,
"radio": 0,
"if": -400000
},
"chan_multiSF_1": {
"enable": true,
"radio": 0,
"if": -200000
},
"chan_multiSF_2": {
"enable": true,
"radio": 0,
"if": 0
},
"chan_multiSF_3": {
"enable": true,
"radio": 0,
"if": 200000
},
"chan_multiSF_4": {
"enable": true,
"radio": 1,
"if": -300000
},
"chan_multiSF_5": {
"enable": true,
"radio": 1,
"if": -100000
},
"chan_multiSF_6": {
"enable": true,
"radio": 1,
"if": 100000
},
"chan_multiSF_7": {
"enable": true,
"radio": 1,
"if": 300000
},
"chan_Lora_std": {
"enable": true,
"radio": 0,
"if": 300000,
"bandwidth": 500000,
"spread_factor": 8
},
"chan_FSK": {
"enable": false,
"radio": 0,
"if": 300000,
"bandwidth": 250000,
"datarate": 100000
},
"tx_lut_0": {
"desc": "TX gain table, index 0",
"pa_gain": 0,
"mix_gain": 8,
"rf_power": -6,
"dig_gain": 0
},
"tx_lut_1": {
"desc": "TX gain table, index 1",
"pa_gain": 0,
"mix_gain": 10,
"rf_power": -3,
"dig_gain": 0
},
"tx_lut_2": {
"desc": "TX gain table, index 2",
"pa_gain": 0,
"mix_gain": 14,
"rf_power": 0,
"dig_gain": 0
},
"tx_lut_3": {
"desc": "TX gain table, index 3",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 3,
"dig_gain": 2
},
"tx_lut_4": {
"desc": "TX gain table, index 4",
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 6,
"dig_gain": 1
},
"tx_lut_5": {
"desc": "TX gain table, index 5",
"pa_gain": 1,
"mix_gain": 9,
"rf_power": 10,
"dig_gain": 1
},
"tx_lut_6": {
"desc": "TX gain table, index 6",
"pa_gain": 1,
"mix_gain": 9,
"rf_power": 11,
"dig_gain": 0
},
"tx_lut_7": {
"desc": "TX gain table, index 7",
"pa_gain": 2,
"mix_gain": 8,
"rf_power": 12,
"dig_gain": 0
},
"tx_lut_8": {
"desc": "TX gain table, index 8",
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 13,
"dig_gain": 1
},
"tx_lut_9": {
"desc": "TX gain table, index 9",
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 14,
"dig_gain": 0
},
"tx_lut_10": {
"desc": "TX gain table, index 10",
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 16,
"dig_gain": 0
},
"tx_lut_11": {
"desc": "TX gain table, index 11",
"pa_gain": 3,
"mix_gain": 8,
"rf_power": 20,
"dig_gain": 0
},
"tx_lut_12": {
"desc": "TX gain table, index 12",
"pa_gain": 3,
"mix_gain": 10,
"rf_power": 23,
"dig_gain": 0
},
"tx_lut_13": {
"desc": "TX gain table, index 13",
"pa_gain": 3,
"mix_gain": 12,
"rf_power": 25,
"dig_gain": 0
},
"tx_lut_14": {
"desc": "TX gain table, index 14",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 26,
"dig_gain": 0
},
"tx_lut_15": {
"desc": "TX gain table, index 15",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 27,
"dig_gain": 0
}
},
"gateway_conf": {
"gateway_ID": "0000000000000000",
/* change with default server address/ports, or overwrite in local_conf.json */
"server_address": "router.us.thethings.network",
"serv_port_up": 1700,
"serv_port_down": 1700,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
"fake_gps": false,
"ref_latitude": 10,
"ref_longitude": 20,
"ref_altitude": -1,
"autoquit_threshold": 20
}
}

View File

@ -0,0 +1,8 @@
{
/* Put there parameters that are different for each gateway (eg. pointing one gateway to a test server while the others stay in production) */
/* Settings defined in global_conf will be overwritten by those in local_conf */
"gateway_conf": {
"gateway_ID": "ba3140f95b91c700", /* you must pick a unique 64b number for each gateway (represented by an hex string) */
"server_address": "127.0.0.1"
}
}

View File

@ -0,0 +1,38 @@
#!/bin/sh
#===============================================================================
#
# LoRa Packet Forward
#
# Copyright (C) 2017 by i2SOM Team.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
# !Description: lora-pktfwd bootscript
#
#===============================================================================
set -e
daemon="/usr/bin/lora_packetforward"
[ -x "${daemon}" ] || exit 0
case "${1}" in
start)
echo -n "Starting lora server: "
start-stop-daemon --start -b --quiet -x "${daemon}"
echo "done"
;;
stop)
echo -n "Stopping lora server: "
start-stop-daemon --stop --quiet -x "${daemon}"
echo "done"
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac

View File

@ -0,0 +1,3 @@
#!/bin/sh
cd /etc/lora-pkt-fwd && lora_pkt_fwd

View File

@ -0,0 +1,12 @@
[Unit]
Description=LoRa Packet Forward service
[Service]
WorkingDirectory=/etc/lora-pkt-fwd
ExecStart=/usr/bin/lora_pkt_fwd
Restart=always
RestartSec=1
WatchdogSec=200
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,90 @@
SUMMARY = "LoRa network packet forwarder project"
SECTION = "libs/network"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=22af7693d7b76ef0fc76161c4be76c45"
SRC_URI = "https://github.com/Lora-net/packet_forwarder/archive/v${PV}.tar.gz"
SRC_URI += "file://global_conf.json \
file://local_conf.json \
file://global_conf \
file://lora_packetforward.sh \
file://lora-pktfwd.init.etc \
file://lora_pktfwd.service \
"
SRC_URI[md5sum] = "a1f942e0cc7b02d604b11c8cb5f2a029"
SRC_URI[sha256sum] = "e68fadf6f1d2e5e7b601e504d5efb48b0a8f374c2c29c0476ab2fe9db68d33ae"
DEPENDS += "lora-gateway"
S = "${WORKDIR}/packet_forwarder-${PV}"
CFLAGS_append = "-I ${includedir}/libloragw -I ${S}/lora_pkt_fwd/inc -I ${S}/util_tx_test/inc "
#inherit update-rc.d systemd
inherit systemd
#INITSCRIPT_NAME = "lora-pktfwd"
#INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
SYSTEMD_SERVICE_${PN} = "lora_pktfwd.service"
SYSTEMD_AUTO_ENABLE ?= "disable"
do_configure_prepend() {
export LGW_PATH="${STAGING_LIBDIR}/libloragw"
}
do_compile_prepend() {
export LGW_PATH="${STAGING_LIBDIR}/libloragw"
}
do_install() {
install -d ${D}${bindir}
install -d ${D}${sysconfdir}/init.d/
install -d ${D}${docdir}/lora-pkt-fwd/conf
install -d ${D}${sysconfdir}/lora-pkt-fwd
install -d ${D}${sysconfdir}/lora-pkt-fwd/global_conf
install -d ${D}${systemd_unitdir}/system/
install ${B}/lora_pkt_fwd/lora_pkt_fwd ${D}${bindir}
install ${B}/util_*/util_* ${D}${bindir}
install -D -m 0644 ${S}/PROTOCOL.TXT ${D}${docdir}/lora-pkt-fwd/PROTOCOL.TXT
install -D -m 0644 ${S}/lora_pkt_fwd/readme.md ${D}${docdir}/lora-pkt-fwd/readme.md
install -D -m 0644 ${S}/lora_pkt_fwd/global_conf.json ${D}${docdir}/lora-pkt-fwd/global_conf.json
install -D -m 0644 ${S}/lora_pkt_fwd/local_conf.json ${D}${docdir}/lora-pkt-fwd/local_conf.json
install -D -m 0755 ${S}/lora_pkt_fwd/update_gwid.sh ${D}${docdir}/lora-pkt-fwd
install -D -m 0644 ${S}/lora_pkt_fwd/cfg/*.json.* ${D}${docdir}/lora-pkt-fwd/conf
install -m 0644 ${WORKDIR}/global_conf.json ${D}${sysconfdir}/lora-pkt-fwd
install -m 0644 ${WORKDIR}/local_conf.json ${D}${sysconfdir}/lora-pkt-fwd
install -m 0644 ${WORKDIR}/global_conf/* ${D}${sysconfdir}/lora-pkt-fwd/global_conf
install -m 0755 ${WORKDIR}/lora_packetforward.sh ${D}${bindir}/lora_packetforward
install -m 0755 ${WORKDIR}/lora-pktfwd.init.etc ${D}${sysconfdir}/init.d/lora-pktfwd
install -m 0644 ${WORKDIR}/lora_pktfwd.service ${D}${systemd_unitdir}/system/
rm -f ${D}${bindir}/util_tx_test
rm -f ${D}${bindir}/.debug/util_tx_test
}
PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
PACKAGES = "${PN}-dbg ${PN} ${PN}-doc"
# Avoid QA Issue: No GNU_HASH in the elf binary
INSANE_SKIP_${PN} = "ldflags"
FILES_${PN}-dbg = " \
${bindir}/.debug \
"
FILES_${PN} = " \
${bindir}/* \
${sysconfdir}/lora-pkt-fwd \
${sysconfdir}/init.d/lora-pktfwd \
${systemd_unitdir}/system/lora_pktfwd.service \
"
FILES_${PN}-doc = " \
${docdir} \
"

View File

@ -0,0 +1 @@
SYSTEMD_AUTO_ENABLE = "disable"

View File

@ -7,7 +7,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup
# Distro can override the following VIRTUAL-RUNTIME providers:
VIRTUAL-RUNTIME_ftp-server ?= "vsftpd"
VIRTUAL-RUNTIME_ftp-server ?= ""
VIRTUAL-RUNTIME_http-server ?= ""
@ -15,8 +15,7 @@ VIRTUAL-RUNTIME_http-server ?= ""
VIRTUAL-RUNTIME_network-utils ?= "ethtool"
#VIRTUAL-RUNTIME_network-utils ?= "net-tools"
VIRTUAL-RUNTIME_snmp-manager ?= ""
#VIRTUAL-RUNTIME_snmp-manager ?= "net-snmp-server"
VIRTUAL-RUNTIME_snmp-manager ?= "net-snmp-server"
VIRTUAL-RUNTIME_ntp-client ?= ""
@ -27,7 +26,7 @@ CELLULAR_PKGS = "\
RDEPENDS_${PN} = "\
iproute2 \
iperf \
iperf2 \
iperf3 \
iptables \
${@bb.utils.contains('DISTRO_FEATURES', 'cellular', '${CELLULAR_PKGS}', '', d)} \

View File

@ -10,7 +10,6 @@ inherit packagegroup
RDEPENDS_${PN} = "\
crda \
iw \
wireless-tools \
wpa-supplicant \
wpa-supplicant-cli \
wpa-supplicant-passphrase \

View File

@ -1,3 +1,8 @@
# Copyright (C) 2017 i2SOM Team.
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
pkg_postinst_ontarget_${PN}() {
# Remove all symlinks in the different runlevels
update-rc.d -f ${INITSCRIPT_NAME} remove
}

View File

@ -0,0 +1,10 @@
# stock fstab - you probably want to override this with a machine specific one
/dev/root / auto defaults 1 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
tmpfs /var/volatile tmpfs defaults 0 0
# uncomment this if your device has a SD/MMC/Transflash slot
#/dev/mmcblk1p4 /opt auto defaults,sync 0 0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
# Copyright (C) 2017 i2SOM Team.
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

View File

@ -0,0 +1,71 @@
#
# Copyright (C) i2SOM Team.
#
DESCRIPTION = "This image used for IoT Gateway device"
LICENSE = "MIT"
SOC_PACKAGES = ""
IMAGE_FEATURES += " \
i2som-network \
package-management \
ssh-server-openssh \
${@bb.utils.contains('MACHINE_FEATURES', 'wifi', 'i2som-wireless', '', d)} \
i2som-debug \
"
LORA_PACKAGE = " \
lora-gateway \
lora-pkt-fwd \
chirpstack-gateway-bridge \
"
COMMON_PROTOCOL_PACKAGE = " \
libopen62541 \
soem \
libiec61850 \
igh-ethercat \
libmodbus \
"
IMAGE_INSTALL = " \
packagegroup-i2som-core \
${CORE_IMAGE_EXTRA_INSTALL} \
${SOC_PACKAGES} \
${LORA_PACKAGE} \
${COMMON_PROTOCOL_PACKAGE} \
evtest \
e2fsprogs-mke2fs \
can-utils \
openssh-sftp-server \
confuse \
libmodbus \
openvpn \
thrift \
libsocketcan \
bridge-utils \
sqlite3 \
libmodbus \
curl \
openssl \
openssl-dev \
ca-certificates \
${@bb.utils.contains('MACHINE_FEATURES', 'gps', 'gpsd gps-utils', '', d)} \
libev \
"
# SDK features (for toolchains generated from an image with populate_sdk)
SDKIMAGE_FEATURES ?= "dev-pkgs dbg-pkgs staticdev-pkgs"
IMAGE_LINGUAS = "en-us zh-cn"
inherit core-image
inherit i2som-yocto-image
inherit distro_features_check
CONFLICT_DISTRO_FEATURES = "directfb wayland"
IMAGE_ROOTFS_SIZE = "8192"
# Do not install udev-cache
BAD_RECOMMENDATIONS += "udev-cache"

View File

@ -11,7 +11,7 @@ PACKAGE_INSTALL = " \
parted \
psplash \
recovery-initramfs \
u-boot-fw-utils \
libubootenv \
dbus \
wipe \
mmc-utils \
@ -30,7 +30,7 @@ python() {
d.setVar('IMAGE_FSTYPES', 'cpio.gz.u-boot ext2.gz')
}
inherit core-image image_types_uboot
inherit core-image image_types
IMAGE_ROOTFS_SIZE = "8192"

View File

@ -11,10 +11,10 @@ IMAGE_INSTALL += " \
tslib-conf \
tslib-tests \
mmc-utils \
u-boot-fw-utils \
libubootenv \
"
export IMAGE_BASENAME = "i2som-image-tiny-initramfs"
IMAGE_FSTYPES = "cpio.gz ext4.gz ext2.gz"
inherit image_types_uboot
inherit image_types

View File

@ -51,7 +51,7 @@ do_install_append() {
sed -i -e "s,##WPA_DRIVER##,${WPA_DRIVER},g" ${D}${sysconfdir}/network/interfaces
}
pkg_postinst_${PN}() {
pkg_postinst_ontarget_${PN}() {
if [ -n "$D" ]; then
exit 1
fi

View File

@ -0,0 +1,5 @@
# Copyright (C) 2019-2021 i2SOM Tech.
pkg_postinst_${PN}_append() {
update-rc.d -f mountnfs.sh remove
}

View File

@ -0,0 +1,18 @@
DESCRIPTION = "nanomsg"
HOMEPAGE = "https://nanomsg.org"
SECTION = "base"
DEPENDS = ""
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=587b3fd7fd291e418ff4d2b8f3904755"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
SRC_URI = "git://github.com/nanomsg/nanomsg.git"
SRCREV = "096998834451219ee7813d8977f6a4027b0ccb43"
S = "${WORKDIR}/git"
inherit cmake
# The autotools configuration I am basing this on seems to have a problem with a race condition when parallel make is enabled
PARALLEL_MAKE = ""

View File

@ -16,9 +16,15 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
# Distro can override the following VIRTUAL-RUNTIME providers:
VIRTUAL-RUNTIME_base-utils ?= "busybox"
VIRTUAL-RUNTIME_base-utils-acpid ?= "busybox-acpid"
VIRTUAL-RUNTIME_base-utils-hwclock ?= "busybox-hwclock"
VIRTUAL-RUNTIME_base-utils-syslog ?= "busybox-syslog"
VIRTUAL-RUNTIME_dev_manager ?= "udev"
VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
VIRTUAL-RUNTIME_initscripts ?= "initscripts"
#VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
#VIRTUAL-RUNTIME_initscripts ?= "initscripts"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
VIRTUAL-RUNTIME_keymaps ?= "keymaps"
VIRTUAL-RUNTIME_login_manager ?= ""
VIRTUAL-RUNTIME_passwd_manager ?= "shadow"
@ -31,7 +37,7 @@ RDEPENDS_${PN} = "\
base-passwd \
busybox \
${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "rtc", "busybox-hwclock", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "systemd", "", bb.utils.contains("MACHINE_FEATURES", "rtc", "${VIRTUAL-RUNTIME_base-utils-hwclock}", "", d), d)} \
${@bb.utils.contains("MACHINE_FEATURES", "touchscreen", "${VIRTUAL-RUNTIME_touchscreen}", "",d)} \
init-ifupdown \
modutils-initscripts \
@ -50,16 +56,14 @@ RDEPENDS_${PN} = "\
lua \
cryptsetup \
rng-tools \
u-boot-fw-utils \
i2som-update-tool \
phytool \
evtest \
i2c-tools \
ntp \
ntp-utils \
peripherylua \
tzdata \
htop \
chrony \
chronyc \
"
RRECOMMENDS_${PN} = "\

View File

@ -10,4 +10,5 @@ RDEPENDS_${PN} = "\
packagegroup-core-tools-debug \
tcpdump \
tcf-agent \
gdbserver \
"

View File

@ -0,0 +1,6 @@
[Match]
Name = eth0
[Network]
Address = 192.168.1.188/24
Gateway = 192.168.1.1

View File

@ -0,0 +1,6 @@
[Match]
Name = eth1
[Network]
Address = 192.168.2.188/24
Gateway = 192.168.2.1

View File

@ -0,0 +1 @@
nameserver 114.114.114.114

View File

@ -0,0 +1,5 @@
[Match]
Name = usb0
[Network]
DHCP = yes

View File

@ -0,0 +1,7 @@
[Match]
Name=wlan0
[Network]
Address=192.168.10.1/24
DHCPServer=yes
IPForward=ipv4

View File

@ -0,0 +1,29 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
PACKAGECONFIG_remove = "resolved"
CONFFILES_${PN} += " ${sysconfdir}/systemd/network/eth0.network"
SRC_URI += " \
file://eth0.network \
file://eth1.network \
file://usb0.network \
file://wlan0.network \
file://resolv.conf \
"
#ALTERNATIVE_PRIORITY[resolv-conf] = "300"
do_install_append() {
install -m 0644 ${WORKDIR}/eth0.network ${D}${sysconfdir}/systemd/network/eth0.network
install -m 0644 ${WORKDIR}/eth1.network ${D}${sysconfdir}/systemd/network/eth1.network
install -m 0644 ${WORKDIR}/usb0.network ${D}${sysconfdir}/systemd/network/usb0.network
install -m 0644 ${WORKDIR}/wlan0.network ${D}${sysconfdir}/systemd/network/wlan0.network
rm -f ${D}${sysconfdir}/resolv.conf
rm -f ${D}${sysconfdir}/resolv-conf.systemd
install -m 0644 ${WORKDIR}/resolv.conf ${D}${sysconfdir}/resolv.conf
}
FILES_${PN} += "/etc/resolv.conf"

View File

@ -0,0 +1,2 @@
DEFAULT_TIMEZONE = "Asia/Shanghai"
FILES_${PN} += "${datadir}/zoneinfo/Asia/Shanghai"

View File

@ -0,0 +1,24 @@
DESCRIPTION = "LTE tool manage the 4g/5g module"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8090ba93f36ea1d4cffa85836563a808"
SRC_URI = "file://ltetool \
file://ltetool.service \
file://lte.ini \
file://LICENSE"
inherit systemd
SYSTEMD_SERVICE_${PN} = "ltetool.service"
SYSTEMD_AUTO_ENABLE ?= "enable"
S = "${WORKDIR}"
do_install () {
install -d ${D}/${bindir}
install -m 755 ${S}/ltetool ${D}/${bindir}/ltetool
install -m 0755 ${WORKDIR}/lte.ini ${D}${sysconfdir}/lte.ini
install -m 0644 ${WORKDIR}/ltetool.service ${D}${systemd_unitdir}/system/
}

View File

@ -0,0 +1 @@
All content inside ltetool package are distributed under MIT license

View File

@ -0,0 +1,10 @@
[hwdevice]
model="gw102"
version="v1.0"
[lte]
model="EC200A"
apnurl=""
apnusername=""
apnpassword=""
checkip="119.29.29.29"

Binary file not shown.

View File

@ -0,0 +1,20 @@
[Unit]
Description=LTE tool
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/ltetool -a
Restart=always
RestartSec=20
StartLimitIntervalSec=0
#StartLimitIntervalSec=900
#StartLimitBurst=5
#StartLimitAction=reboot-force
RestartPreventExitStatus=0
#User=root
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,84 @@
#
# SPDX-License-Identifier: MIT
# Copyright (c) 2020-2021 Tano Systems LLC. All rights reserved.
#
PR = "tano4"
PV = "1.5.2+git${SRCPV}"
DESCRIPTION = "IgH EtherCAT Master for Linux"
HOMEPAGE = "http://etherlab.org/download/ethercat"
LICENSE = "GPL-2.0 & LGPL-2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
SECTION = "net"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/patches:${THISDIR}/${PN}/files:"
SRC_URI = "git://gitlab.com/etherlab.org/ethercat.git;protocol=https;branch=stable-1.5"
# 09.06.2021
# Ignore cmake output.
SRCREV = "1fa5565aa0287223c937b7474d9926d08b9582e6"
SRC_URI += "\
file://ethercatctl \
file://ethercat.config \
file://ethercat.init \
"
SRC_URI += "\
file://1003-Fix-ethercat-tool-compilation.patch \
"
S = "${WORKDIR}/git"
PACKAGECONFIG ??= "generic"
PACKAGECONFIG[generic] = "--enable-generic,--disable-generic,"
PACKAGECONFIG[8139too] = "--enable-8139too,--disable-8139too,"
PACKAGECONFIG[e100] = "--enable-e100,--disable-e100,"
PACKAGECONFIG[e1000] = "--enable-e1000,--disable-e1000,"
PACKAGECONFIG[e1000e] = "--enable-e1000e,--disable-e1000e,"
PACKAGECONFIG[r8169] = "--enable-r8169,--disable-r8169,"
do_configure[depends] += "virtual/kernel:do_shared_workdir"
inherit autotools-brokensep pkgconfig module-base
EXTRA_OECONF += "--with-linux-dir=${STAGING_KERNEL_BUILDDIR}"
EXTRA_OECONF += "--with-module-dir=kernel/ethercat"
do_configure_prepend() {
# Fixes configure error
# | Makefile.am: error: required file './ChangeLog' not found"
touch ChangeLog
}
do_compile_append() {
oe_runmake modules
}
do_install_append() {
oe_runmake MODLIB=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION} modules_install
rm -rf ${D}${libdir}/systemd
rm -rf ${D}${sysconfdir}/sysconfig
rm -f ${D}${sysconfdir}/ethercat.conf
rm -f ${D}${sbindir}/ethercatctl
install -m 0755 -D ${WORKDIR}/ethercatctl ${D}${sbindir}/ethercatctl
install -m 0644 -D ${WORKDIR}/ethercat.config ${D}${sysconfdir}/config/ethercat
install -m 0755 -D ${WORKDIR}/ethercat.init ${D}${sysconfdir}/init.d/ethercat
cd ${D}/lib/modules/${KERNEL_VERSION} && \
find kernel -name '*.ko' -exec sh -c 'mod="{}"; ln -sf $mod ${D}/lib/modules/${KERNEL_VERSION}/$(basename "$mod")' \;
}
FILES_${PN} += "${nonarch_base_libdir}/modules/${KERNEL_VERSION}"
CONFFILES_${PN} += "${sysconfdir}/config/ethercat"
TANOWRT_SERVICE_PACKAGES = "igh-ethercat"
TANOWRT_SERVICE_SCRIPTS_igh-ethercat += "ethercat"
TANOWRT_SERVICE_STATE_igh-ethercat-ethercat ?= "disabled"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"

View File

@ -0,0 +1,56 @@
# EtherCAT master UCI configuration file
#------------------------------------------------------------------------------
#
# EtherCAT global configuration
#
config ethercat
#
# Ethernet driver modules to use for EtherCAT operation.
#
# Specify a non-empty list of Ethernet drivers, that shall be used for EtherCAT
# operation.
#
# Except for the generic Ethernet driver module, the init script will try to
# unload the usual Ethernet driver modules in the list and replace them with
# the EtherCAT-capable ones. If a certain (EtherCAT-capable) driver is not
# found, a warning will appear.
#
# Possible values: 8139too, e100, e1000, e1000e, r8169, generic.
#
# Note: The e100, e1000, e1000e and r8169 drivers are not built by default.
# Enable them with the --enable-<driver> configure switches.
#
list module 'generic'
#
# Flags for loading kernel modules.
#
# This can usually be left empty. Adjust this option, if you have problems
# with module loading.
#
# option modprobe_flags '-b'
#------------------------------------------------------------------------------
#
# Master device
#
# The 'master' sections determine, how many masters will be
# created: Each 'master' section creates one master.
#
config master 'master0'
#
# The 'device' option specifies the Ethernet device for a master.
#
# Specify the MAC address (hexadecimal with colons) of the Ethernet device to
# use. Example: "00:00:08:44:ab:66"
#
# The broadcast address "ff:ff:ff:ff:ff:ff" has a special meaning: It tells
# the master to accept the first device offered by any Ethernet driver.
#
option device ''
option backup ''
#------------------------------------------------------------------------------

View File

@ -0,0 +1,188 @@
#!/bin/sh /etc/rc.common
#------------------------------------------------------------------------------
#
# Init script for EtherCAT
#
# Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
# Copyright (C) 2020 Anton Kikin, Tano Systems LLC
#
#------------------------------------------------------------------------------
START=60
STOP=20
EXTRA_COMMANDS="status"
extra_command "mstatus" "Checks for EtherCAT master status"
MODPROBE=/usr/sbin/insmod
RMMOD=/usr/sbin/rmmod
ETHERCAT=/usr/bin/ethercat
MASTER_ARGS=
#------------------------------------------------------------------------------
parse_mac_address() {
if [ -z "${1}" ]; then
MAC=""
elif echo ${1} | grep -qE '^([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$'; then
MAC=${1}
else
echo Invalid MAC address \"${1}\" in ${ETHERCAT_CONFIG}
exit 1
fi
}
#------------------------------------------------------------------------------
DEVICE_MODULES=""
MODPROBE_FLAGS=""
DEVICES=""
BACKUPS=""
MASTER_COUNT=0
config_read_global() {
config_get DEVICE_MODULES $1 'module' ''
config_get MODPROBE_FLAGS $1 'modprobe_flags' ''
}
config_read_master() {
local device
local backup
config_get device $1 'device' ''
config_get backup $1 'backup' ''
if [ -z "${device}" ]; then return; fi
if [ ${MASTER_COUNT} -gt 0 ]; then
DEVICES=${DEVICES},
BACKUPS=${BACKUPS},
fi
parse_mac_address ${device}
DEVICES=${DEVICES}${MAC}
parse_mac_address ${backup}
BACKUPS=${BACKUPS}${MAC}
MASTER_COUNT=$(expr ${MASTER_COUNT} + 1)
}
config_read() {
DEVICE_MODULES=""
MODPROBE_FLAGS=""
DEVICES=""
BACKUPS=""
MASTER_COUNT=0
config_load "ethercat"
config_foreach config_read_global ethercat
# construct DEVICES and BACKUPS from configuration variables
config_foreach config_read_master master
}
start() {
config_read
if [ "${MASTER_COUNT}" = "0" ]; then
echo "Error: No masters configured"
exit 1
fi
# load master module
if ! ${MODPROBE} ${MODPROBE_FLAGS} ec_master ${MASTER_ARGS} \
main_devices=${DEVICES} backup_devices=${BACKUPS}; then
exit 1
fi
LOADED_MODULES=ec_master
# check for modules to replace
for MODULE in ${DEVICE_MODULES}; do
ECMODULE=ec_${MODULE}
if [ ${MODULE} != "generic" ]; then
if lsmod | grep "^${MODULE} " > /dev/null; then
if ! ${RMMOD} ${MODULE}; then
${RMMOD} ${LOADED_MODULES}
exit 1
fi
fi
fi
if ! ${MODPROBE} ${MODPROBE_FLAGS} ${ECMODULE}; then
if [ ${MODULE} != "generic" ]; then
${MODPROBE} ${MODPROBE_FLAGS} ${MODULE} # try to restore
fi
${RMMOD} ${LOADED_MODULES}
exit 1
fi
LOADED_MODULES="${ECMODULE} ${LOADED_MODULES}"
done
}
stop() {
config_read
# unload EtherCAT device modules
for MODULE in ${DEVICE_MODULES} master; do
ECMODULE=ec_${MODULE}
if ! lsmod | grep -q "^${ECMODULE} "; then
continue # ec_* module not loaded
fi
if ! ${RMMOD} ${ECMODULE}; then
exit 1
fi;
done
sleep 1
# reload previous modules
for MODULE in ${DEVICE_MODULES}; do
if [ ${MODULE} != "generic" ]; then
if ! ${MODPROBE} ${MODPROBE_FLAGS} ${MODULE}; then
echo "Warning: Failed to restore ${MODULE}."
fi
fi
done
}
restart() {
stop
sleep 1
start
}
reload() {
restart
}
mstatus() {
echo "Checking for EtherCAT masters..."
config_read
RESULT=0
for i in `seq 0 $(expr ${MASTER_COUNT} - 1)`; do
echo -n "Master${i} "
# Check if the master is in idle or operation phase
${ETHERCAT} master --master ${i} 2>/dev/null | \
grep -qE 'Phase:[[:space:]]*Idle|Phase:[[:space:]]*Operation'
EXITCODE=$?
if [ ${EXITCODE} -eq 0 ]; then
echo "running"
else
echo "dead"
RESULT=1
fi
done
exit ${RESULT}
}
#------------------------------------------------------------------------------

View File

@ -0,0 +1,50 @@
#!/bin/sh
#------------------------------------------------------------------------------
#
# Start script for EtherCAT to use with systemd
#
# Copyright (C) 2006-2012 Florian Pose, Ingenieurgemeinschaft IgH
# Copyright (C) 2020 Anton Kikin, Tano Systems LLC
#
# This file is part of the IgH EtherCAT Master.
#
#------------------------------------------------------------------------------
case "${1}" in
start)
/etc/init.d/ethercat start
exit $?
;;
#------------------------------------------------------------------------------
stop)
/etc/init.d/ethercat stop
exit $?
;;
#------------------------------------------------------------------------------
restart)
/etc/init.d/ethercat restart
exit $?
;;
#------------------------------------------------------------------------------
status)
/etc/init.d/ethercat status
exit $?
;;
#------------------------------------------------------------------------------
*)
echo "USAGE: $0 {start|stop|restart|status}"
exit 1
;;
esac
#------------------------------------------------------------------------------

View File

@ -0,0 +1,144 @@
From d4fbc613c5a22d76d868a6e4ea3517f8fd9c167a Mon Sep 17 00:00:00 2001
From: Anton Kikin <a.kikin@tano-systems.com>
Date: Tue, 23 Jun 2020 17:08:25 +0300
Subject: [PATCH] Fix ethercat tool compilation
Fixes compilation error:
/usr/bin/ld: error: ethercat uses VFP register arguments, ../master/soe_errors.o does not
/usr/bin/ld: failed to merge target specific data of file ../master/soe_errors.o
collect2: ld returned 1 exit status
The error occurs due to different compiler options when building
kernel modules and tools. When building the ethercat utility,
the file soe_errors.o is linked directly from the kernel module
build directory. To fix this problem, we just copy the source
file soe_errors.c into the build directory of the ethercat utility
and build it together with the utility.
This is certainly not quite right, but it is a quick fix.
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
---
tool/Makefile.am | 2 +-
tool/soe_errors.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 97 insertions(+), 1 deletion(-)
create mode 100644 tool/soe_errors.c
diff --git a/tool/Makefile.am b/tool/Makefile.am
index e13dbf1..ff8a308 100644
--- a/tool/Makefile.am
+++ b/tool/Makefile.am
@@ -36,7 +36,7 @@ EXTRA_DIST =
bin_PROGRAMS = ethercat
ethercat_SOURCES = \
- ../master/soe_errors.c \
+ soe_errors.c \
Command.cpp \
CommandAlias.cpp \
CommandCrc.cpp \
diff --git a/tool/soe_errors.c b/tool/soe_errors.c
new file mode 100644
index 0000000..835e724
--- /dev/null
+++ b/tool/soe_errors.c
@@ -0,0 +1,96 @@
+/******************************************************************************
+ *
+ * $Id$
+ *
+ * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
+ *
+ * This file is part of the IgH EtherCAT Master.
+ *
+ * The IgH EtherCAT Master is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * The IgH EtherCAT Master is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with the IgH EtherCAT Master; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * ---
+ *
+ * The license mentioned above concerns the source code only. Using the
+ * EtherCAT technology and brand is only permitted in compliance with the
+ * industrial property and similar rights of Beckhoff Automation GmbH.
+ *
+ *****************************************************************************/
+
+/**
+ \file
+ EtherCAT SoE errors.
+*/
+
+/*****************************************************************************/
+
+#include "../master/globals.h"
+
+/*****************************************************************************/
+
+/** SoE error codes.
+ */
+const ec_code_msg_t soe_error_codes[] = {
+ {0x1001, "No IDN"},
+ {0x1009, "Invalid access to element 1"},
+ {0x2001, "No name"},
+ {0x2002, "Name transmission too short"},
+ {0x2003, "Name transmission too long"},
+ {0x2004, "Name cannot be changed, read only"},
+ {0x2005, "Name is write protected at this time"},
+ {0x3002, "Attribute transmission too short"},
+ {0x3003, "Attribute transmission too long"},
+ {0x3004, "Attribute cannot be changed, read only"},
+ {0x3005, "Attribute is write protected at this time"},
+ {0x4001, "No unit"},
+ {0x4002, "Unit transmission too short"},
+ {0x4003, "Unit transmission too long"},
+ {0x4004, "Unit cannot be changed, read only"},
+ {0x4005, "Unit is write proteced at this time"},
+ {0x5001, "No minimum input value"},
+ {0x5002, "Minimum input value transmission too short"},
+ {0x5003, "Minimum input value transmission too long"},
+ {0x5004, "Minimum input value cannot be changed, read only"},
+ {0x5005, "Minimum input value is write protected at this time"},
+ {0x6001, "No maximum input value"},
+ {0x6002, "Maximum input value transmission too short"},
+ {0x6003, "Maximum input value transmission too long"},
+ {0x6004, "Maximum input value cannot be changed, read only"},
+ {0x6005, "Maximum input value is write protected at this time"},
+ {0x7002, "Operation data value transmission too short"},
+ {0x7003, "Operation data value transmission too long"},
+ {0x7004, "Operation data value cannot be changed, read only"},
+ {0x7005, "Operation data value is write protected at this time"},
+ {0x7006, "Operation data value is smaller than the minimum input value"},
+ {0x7007, "Operation data value is greater than the minimum input value"},
+ {0x7008, "Invalid operation data"},
+ {0x7009, "Operation data is write protected by a password"},
+ {0x700A, "Operation data is write protected"},
+ {0x700B, "Invalid indirect addressing"},
+ {0x700C, "Operation data is write protected due to other settings"},
+ {0x700D, "Reserved"},
+ {0x7010, "Procedure command already active"},
+ {0x7011, "Procedure command not interruptible"},
+ {0x7012, "Procedure command is at this time not executable"},
+ {0x7013, "Procedure command not executable"},
+ {0x7014, "No data state"},
+ {0x8001, "No default value"},
+ {0x8002, "Default value transmission too long"},
+ {0x8004, "Default value cannot be changed, read only"},
+ {0x800A, "Invalid drive number"},
+ {0x800B, "General error"},
+ {0x800C, "No element addressed"},
+ {}
+};
+
+/*****************************************************************************/
--
2.25.1

View File

@ -0,0 +1,108 @@
#
# SPDX-License-Identifier: MIT
#
# Open source library for IEC 61850
# http://libiec61850.com/libiec61850/
# https://github.com/mz-automation/libiec61850
#
# This file Copyright (C) 2020 Anton Kikin <a.kikin@tano-systems.com>
#
DESCRIPTION = "Open source library for IEC 61850"
HOMEPAGE = "http://libiec61850.com/libiec61850/"
SECTION = "libs"
LICENSE = "GPL-3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
MAINTAINER = "Anton Kikin <a.kikin@tano-systems.com>"
PV = "1.4.2.1"
SRC_URI = "git://github.com/mz-automation/libiec61850;protocol=https;branch=v1.4"
SRCREV = "d798814fb463115a835da597535a625b68a39cff"
S = "${WORKDIR}/git"
inherit cmake pkgconfig lib_package
PACKAGECONFIG ??= "examples goose"
# Build examples
PACKAGECONFIG[examples] = "-DBUILD_EXAMPLES=ON,-DBUILD_EXAMPLES=OFF,"
# Enable debugging (disabled by default)
PACKAGECONFIG[debug] = "-DDEBUG=ON,-DDEBUG=OFF,"
# Build with GOOSE support
PACKAGECONFIG[goose] = "-DCONFIG_INCLUDE_GOOSE_SUPPORT=ON,-DCONFIG_INCLUDE_GOOSE_SUPPORT=OFF,"
LIBIEC61850_EXAMPLES_DIR="${datadir}/libiec61850-examples"
LIBIEC61850_EXAMPLES_FILES="\
goose_publisher/goose_publisher_example \
goose_subscriber/goose_subscriber_example \
iec61850_9_2_LE_example/sv_9_2_LE_example \
iec61850_client_example_array/iec61850_client_example_array \
iec61850_client_example_async/iec61850_client_async \
iec61850_client_example_control/client_example_control \
iec61850_client_example_files/file-tool \
iec61850_client_example_log/iec61850_client_example_log \
iec61850_client_example_reporting/iec61850_client_example_reporting \
iec61850_client_example1/iec61850_client_example1 \
iec61850_client_example2/iec61850_client_example2 \
iec61850_client_example4/iec61850_client_example4 \
iec61850_client_example5/iec61850_client_example5 \
iec61850_client_file_async/iec61850_client_file_async \
iec61850_sv_client_example/iec61850_sv_client_example \
mms_utility/mms_utility \
server_example_61400_25/server_example_61400_25 \
server_example_basic_io/server_example_basic_io \
server_example_complex_array/server_example_ca \
server_example_config_file/server_example_config_file \
server_example_config_file/model.cfg \
server_example_control/server_example_control \
server_example_dynamic/server_example_dynamic \
server_example_files/server_example_files \
server_example_goose/server_example_goose \
server_example_password_auth/server_example_password_auth \
server_example_setting_groups/server_example_sg \
server_example_simple/server_example_simple \
server_example_substitution/server_example_substitution \
server_example_threadless/server_example_threadless \
server_example_write_handler/server_example_write_handler \
sv_publisher/sv_publisher_example \
sv_subscriber/sv_subscrieber_example \
tls_client_example/tls_client_example \
tls_client_example/client1.cer \
tls_client_example/root.cer \
tls_client_example/client1-key.pem \
tls_server_example/tls_server_example \
tls_server_example/client1.cer \
tls_server_example/client2.cer \
tls_server_example/root.cer \
tls_server_example/server.cer \
tls_server_example/server-key.pem \
"
do_install_append() {
if [ "${@bb.utils.contains('PACKAGECONFIG', 'examples', '1', '0', d)}" = "1" ]; then
# Install available examples
install -d ${D}${LIBIEC61850_EXAMPLES_DIR}
for f in ${LIBIEC61850_EXAMPLES_FILES}; do
DIRNAME="${LIBIEC61850_EXAMPLES_DIR}/$(dirname $f)"
if [ -x ${B}/examples/${f} ]; then
install -d ${D}${DIRNAME}
install -m 0755 ${B}/examples/${f} ${D}${DIRNAME}/
fi
if [ -f ${S}/examples/${f} -a -d ${D}${DIRNAME} ]; then
install -m 0644 ${S}/examples/${f} ${D}${DIRNAME}/
fi
done
fi
}
PACKAGES += "${PN}-examples"
FILES_${PN}-examples = "${LIBIEC61850_EXAMPLES_DIR}"
DESCRIPTION_${PN} = "Open source library for IEC 61850 examples"
LEAD_SONAME = "libiec61850.so"
BBCLASSEXTEND = "native"

View File

@ -0,0 +1,25 @@
SUMMARY = "OPC UA implementation"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
SRC_URI = "git://github.com/open62541/open62541.git;protocol=https"
# Modify these as desired
PV = "v1.2.2"
SRCREV = "ecf5a703785877a8719a0cda863a98455f7d5d12"
S = "${WORKDIR}/git"
DEPENDS = "openssl"
do_install_append () {
if [ -d ${B}/bin/examples ] && [ -z $(find ${B}/bin/examples -maxdepth 0 -empty) ]
then
install -d ${D}${ROOT_HOME}/open62541_example/
install -m 0755 ${B}/bin/examples/* ${D}${ROOT_HOME}/open62541_example/
fi
}
FILES_${PN} += "${bindir_native}/* ${datadir_native}/open62541/* ${libdir_native}/* ${ROOT_HOME}/*"
inherit cmake python3native

Some files were not shown because too many files have changed in this diff Show More