tests: subsys: lorawan: add frag_decoder unit-test

The unit test allows to test the frag decoder algorithms using random
binary data.

The coded fragments are created on the fly using the encoder algorithm
described by Semtech in the LoRaWAN TS004-1.0.0 document.

Signed-off-by: Martin Jäger <martin@libre.solar>
This commit is contained in:
Martin Jäger 2024-01-15 00:42:45 +01:00 committed by Alberto Escolar
commit 9e341b49c8
8 changed files with 372 additions and 0 deletions

View file

@ -0,0 +1,33 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_ZTEST=y
# General Zephyr settings
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_THREAD_NAME=y
CONFIG_LOG=y
# LoRa PHY and required peripherals
CONFIG_LORA=y
CONFIG_SPI=y
CONFIG_GPIO=y
# Random number generator required for several LoRaWAN services
CONFIG_ENTROPY_GENERATOR=y
# LoRaWAN application layer
CONFIG_LORAWAN=y
CONFIG_LORAWAN_EMUL=y
CONFIG_LORAMAC_REGION_EU868=y
# LoRaWAN services required for this test
CONFIG_LORAWAN_SERVICES=y
CONFIG_LORAWAN_FRAG_TRANSPORT=y
# Flash driver to store firmware image
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_STREAM_FLASH=y
CONFIG_IMG_MANAGER=y