Skip to content

Commit

Permalink
Release v3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lbm-team committed Jun 29, 2023
1 parent 8d052b2 commit 3258275
Show file tree
Hide file tree
Showing 452 changed files with 338,458 additions and 9,661 deletions.
36 changes: 34 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,38 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v3.3.0] 2023-05-31

### Added

* [general] Support of LR1121 radio (target: lr1121)
* [makefile] Provide a way to change any LBM define values in make command (use `EXTRAFLAGS` )
* [utilities] Add a porting on NUCLEO-L073 board using LL drivers for minimal flash usage
* [utilities] Add a porting tool in main examples to help during mcu porting

### Changed

* [lr11xx_driver] Update to version `v2.3.0`
* [sx126x_driver] Update to version `v2.2.0`
* [makefile] Default Regional Parameters option is now RP2-1.0.3 LoRaWAN® Regional Parameters (previous was RP2-1.0.1)
* [utilities] Add response code assert in exti example
* [utilities] Remove temperature from exti example and replace it with 32b counter
* [utilities] Remove unused implementations and calls of uart4 related functions in smtc_hal_l4
* [modem] Add randomness before any modem task that need to uplink something
* [alarm] Clamp alarm timer to 864000s ie 10 days
* [stack] Set minimal default reception window size to 16ms instead of 6 ms to avoid ping slots issue in FSK (can be changed be overriding `MIN_RX_WINDOW_DURATION_MS` define)

### Fixed

* Issue [#5](https://github.com/Lora-net/SWL2001/issues/5): Correct typo on MCU_FLAGS in makefile
* Issue [#6](https://github.com/Lora-net/SWL2001/issues/6): Example does not override EUI and Keys in case code is built with `CRYPTO=LR11XX_WITH_CREDENTIALS`
* Issue [#7](https://github.com/Lora-net/SWL2001/issues/7): Remove ARM-specific flag from common.mk
* Issue [#9](https://github.com/Lora-net/SWL2001/issues/9): Fix size error in smtc_secure_element_get_pin()
* [LBT] Fix lbt issue when tcxo startup delay is greater than default `RP_MARGIN_DELAY` value (8ms)
* [LRFHSS] Correct tx done timestamp with known bit padding delay to avoid issue with following rx windows (principally seen on US and AU regions)
* [AU915/US915] Fix LoRaWAN Link Adr Request issue (channel mask control case 5 missing impact on 500kHz bank)
* [utilities] In exti example, fix evaluation kit blue button missing pin in irq configuration

## [v3.2.4] 2022-08-23

### Added
Expand Down Expand Up @@ -38,8 +70,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
* [LBT] Moved log print after enqueued the sniffing task in Radio Planer to avoid to add a delays
* [ADR] In case a MAC command `link_adr_req` with a new channel mask is received, it is now accepted if the custom datarate profile is enabled and configured with the highest datarate of the corresponding region
* [LFU/Stream] In case of reception of rejoin request from DAS, reset LFU and stream services properly
*[ClockSyncService/MAC] Fixed an issue where the Clock Synchronization Service was not reloaded when DeviceTimeAns was not received
*[DeviceTimeReq/MAC] Fixed an issue where the GPS epoch time became invalid if DeviceTimeAns not received
* [ClockSyncService/MAC] Fixed an issue where the Clock Synchronization Service was not reloaded when DeviceTimeAns was not received
* [DeviceTimeReq/MAC] Fixed an issue where the GPS epoch time became invalid if DeviceTimeAns not received

## [v3.1.7] 2022-04-22

Expand Down
20 changes: 15 additions & 5 deletions Makefile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ LOG_MEM ?= yes
RADIO ?= nc

#MCU - Must be provided by user
MCU_FLAGS =? nc
MCU_FLAGS ?= nc

#-----------------------------------------------------------------------------
# Internal LBM features management
Expand Down Expand Up @@ -72,7 +72,7 @@ USE_GNSS ?= yes
# default action: print help
#-----------------------------------------------------------------------------
help:
$(call echo_help_b, "Available TARGETs: sx128x lr1110 lr1120 sx1261 sx1262 sx1268")
$(call echo_help_b, "Available TARGETs: sx128x lr1110 lr1120 lr1121 sx1261 sx1262 sx1268")
$(call echo_help, "")
$(call echo_help_b, "-------------------------------- Clean -------------------------------------")
$(call echo_help, " * make clean_<TARGET> : clean basic_modem for a given target")
Expand All @@ -81,7 +81,7 @@ help:
$(call echo_help_b, "----------------------------- Compilation ----------------------------------")
$(call echo_help, " * make basic_modem_<TARGET> MCU_FLAGS=xxx : build basic_modem on a given target with chosen mcu flags")
$(call echo_help, " * MCU_FLAGS are mandatory. Ex for stm32l4:")
$(call echo_help, " * MCU_FLAGS=\"-mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard\"")
$(call echo_help, " * MCU_FLAGS=\"-mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard\"")
$(call echo_help, "")
$(call echo_help_b, "---------------------- Optional build parameters ---------------------------")
$(call echo_help, " * REGION=xxx : choose which region should be compiled (default: all)")
Expand All @@ -96,7 +96,7 @@ help:
$(call echo_help, " * - RU_864")
$(call echo_help, " * - US_915")
$(call echo_help, " * - WW_2G4 (to be used only for lr1120 and sx128x targets)")
$(call echo_help, " * RP_VERSION=xxx : choose wich regional paramerter version should be compiled (default: RP2_101) ")
$(call echo_help, " * RP_VERSION=xxx : choose wich regional paramerter version should be compiled (default: RP2_103) ")
$(call echo_help, " * - RP2_101")
$(call echo_help, " * - RP2_103 (LR-FHSS support)")
$(call echo_help, " * CRYPTO=xxx : choose which crypto should be compiled (default: SOFT)")
Expand Down Expand Up @@ -125,6 +125,10 @@ ifeq ($(RADIO),lr1120)
-include makefiles/lr11xx.mk
endif

ifeq ($(RADIO),lr1121)
-include makefiles/lr11xx.mk
endif

ifeq ($(RADIO),sx1261)
-include makefiles/sx126x.mk
endif
Expand All @@ -148,7 +152,7 @@ endif
.PHONY: FORCE
FORCE:

all: basic_modem_sx128x basic_modem_lr1110 basic_modem_lr1120 basic_modem_sx1261 basic_modem_sx1262
all: basic_modem_sx128x basic_modem_lr1110 basic_modem_lr1120 basic_modem_lr1121 basic_modem_sx1261 basic_modem_sx1262

#-----------------------------------------------------------------------------
# Clean
Expand All @@ -165,6 +169,9 @@ clean_lr1110:
clean_lr1120:
$(MAKE) clean_target RADIO=lr1120

clean_lr1121:
$(MAKE) clean_target RADIO=lr1121

clean_sx1261:
$(MAKE) clean_target RADIO=sx1261

Expand All @@ -186,6 +193,9 @@ basic_modem_lr1110:
basic_modem_lr1120:
$(MAKE) basic_modem RADIO=lr1120 $(MTHREAD_FLAG)

basic_modem_lr1121:
$(MAKE) basic_modem RADIO=lr1121 $(MTHREAD_FLAG)

basic_modem_sx1261:
$(MAKE) basic_modem RADIO=sx1261 $(MTHREAD_FLAG)

Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The LoRaWAN version that is currently implemented in LoRa Basics Modem is v1.0.4

LoRa Basics Modem supports the following LoRaWAN regions:

* AS_923 (AS923-1, AS923-2, AS923-3)
* AS_923 (AS923-1, AS923-2, AS923-3, AS923-4)
* AU_915
* CN_470
* CN_470_RP_1_0
Expand All @@ -24,7 +24,7 @@ LoRa Basics Modem supports an emulation of LoRaWAN protocol for the 2.4GHz globa

### LoRaWAN regional parameters

Default regional parameters version supported by LoRa Basics Modem is rp2-1.0.1. It is possible to switch to rp2-1.0.3 at compile time.
Default regional parameters version supported by LoRa Basics Modem is rp2-1.0.3. It is possible to switch back to rp2-1.0.1 at compile time.

### LoRaWAN class

Expand All @@ -41,7 +41,7 @@ LoRa Basics Modem supports the following services:
* Large files upload
* ROSE Streaming
* Application-Layer Clock synchronization
* Almanac Update
* Almanac Update for LoRa Edge

## LoRa Basics Modem API

Expand All @@ -61,8 +61,9 @@ The Hardware Abstraction Layer of LoRa Basics Modem is defined in the `smtc_mode

LoRa Basics Modem supports the following transceivers:

* LR1110 with firmware 0x0307.
* LR1120 with firmware 0x0101
* LR1110 with firmware 0x0308.
* LR1120 with firmware 0x0102
* LR1121 with firmware 0x0102
* SX1261
* SX1262
* SX1280
Expand All @@ -73,13 +74,11 @@ LoRa Basics Modem supports the following transceivers:
* [LFU] In case LoRa Basics Modem is acting in US915 region with datarate DR0, files smaller than 13 bytes are not properly sent and cannot be reconstructed on LoRa Cloud side
* [charge] Values returned by `smtc_modem_get_charge()` for regions CN470 and CN470_RP1 are not accurate
* [charge] Values returned by `smtc_modem_get_charge()` for the LR-FHSS based datarate are not accurate
* [multicast_class_b] Starting a class B multicast session with frequency equal to 0 will always return SMTC_MODEM_RC_INVALID even in the case lbm is acting in regions with frequency hopping beacon
* [LBT] In case LBT is used (by user's choice or imposed by regional parameters) and if TCXO start time is greater than default RP_MARGIN_DELAY value (8ms), uplinks will never be sent.
Workaround: At makefile level define RP_MARGIN_DELAY value to `TCXO start time + 3ms`. The consequence is that before rx1 and rx2 windows opening the mcu will be running and waiting during extra time.
* [time] In case ALC_SYNC time service is used, when a valid time is received, the generated `SMTC_MODEM_EVENT_TIME` event will show a ghost missed event.

## Disclaimer

This software has been extensively tested when targeting LR1110 / LR1120 / SX1261 / SX1262 / SX1280 / SX1281 for LoRaWAN regions mentioned in [this paragraph](#lorawan-region). For all other combinations of features this software shall be considered an Engineering Sample.
This software has been extensively tested when targeting LR1110 / LR1120 / LR1121 / SX1261 / SX1262 / SX1280 / SX1281 for LoRaWAN regions mentioned in [this paragraph](#lorawan-region). For all other combinations of features this software shall be considered an Engineering Sample.

Modem trace prints can only be used for debug purpose and shall be deactivated for production release.

Expand Down
4 changes: 2 additions & 2 deletions lora_basics_modem_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ extern "C" {
* --- PUBLIC TYPES ------------------------------------------------------------
*/
#define LORA_BASICS_MODEM_FW_VERSION_MAJOR 3
#define LORA_BASICS_MODEM_FW_VERSION_MINOR 2
#define LORA_BASICS_MODEM_FW_VERSION_PATCH 4
#define LORA_BASICS_MODEM_FW_VERSION_MINOR 3
#define LORA_BASICS_MODEM_FW_VERSION_PATCH 0

/*
* -----------------------------------------------------------------------------
Expand Down
15 changes: 13 additions & 2 deletions makefiles/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,17 @@ BUILD_DIR_MODEM := $(BUILD_DIR_MODEM)_lr11xx_crypto_with_cred
endif # LR11XX_WITH_CREDENTIALS
endif # lr1120

ifeq ($(RADIO),lr1121)
ifeq ($(CRYPTO),LR11XX)
TARGET_MODEM := $(TARGET_MODEM)_lr11xx_crypto
BUILD_DIR_MODEM := $(BUILD_DIR_MODEM)_lr11xx_crypto
endif # LR11XX
ifeq ($(CRYPTO),LR11XX_WITH_CREDENTIALS)
TARGET_MODEM := $(TARGET_MODEM)_lr11xx_crypto_with_cred
BUILD_DIR_MODEM := $(BUILD_DIR_MODEM)_lr11xx_crypto_with_cred
endif # LR11XX_WITH_CREDENTIALS
endif # lr1121

ifeq ($(MIDDLEWARE),yes)
TARGET_MODEM := $(TARGET_MODEM)_middleware
BUILD_DIR_MODEM := $(BUILD_DIR_MODEM)_middleware
Expand Down Expand Up @@ -178,7 +189,6 @@ WFLAG += \
-Wno-unused-parameter \
-Wpedantic \
-fomit-frame-pointer \
-mabi=aapcs \
-fno-unroll-loops \
-ffast-math \
-ftree-vectorize \
Expand Down Expand Up @@ -266,8 +276,9 @@ COMMON_C_DEFS += \
-DADD_SMTC_ALC_SYNC
endif

EXTRAFLAGS ?=

CFLAGS += -fno-builtin $(MCU_FLAGS) $(BOARD_C_DEFS) $(COMMON_C_DEFS) $(MODEM_C_DEFS) $(BOARD_C_INCLUDES) $(COMMON_C_INCLUDES) $(MODEM_C_INCLUDES) $(OPT) $(WFLAG) -MMD -MP -MF"$(@:%.o=%.d)"
CFLAGS += -fno-builtin $(MCU_FLAGS) $(BOARD_C_DEFS) $(COMMON_C_DEFS) $(MODEM_C_DEFS) $(EXTRAFLAGS) $(BOARD_C_INCLUDES) $(COMMON_C_INCLUDES) $(MODEM_C_INCLUDES) $(OPT) $(WFLAG) -MMD -MP -MF"$(@:%.o=%.d)"
CFLAGS += -falign-functions=4
CFLAGS += -std=c17

Expand Down
33 changes: 21 additions & 12 deletions makefiles/lr11xx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,25 @@ endif
ifeq ($(RADIO),lr1120)
TARGET = lr1120
endif

ifeq ($(RADIO),lr1121)
TARGET = lr1121
endif

#-----------------------------------------------------------------------------
# Common sources
#-----------------------------------------------------------------------------

ifeq ($(USE_GNSS),yes)
SMTC_MODEM_SERVICES_C_SOURCES += \
smtc_modem_core/smtc_modem_services/src/almanac_update/almanac_update.c
endif

ifeq ($(RADIO),lr1121)
USE_GNSS=no
RADIO_DRIVER_C_SOURCES += \
smtc_modem_core/radio_drivers/lr11xx_driver/src/lr11xx_bootloader.c\
smtc_modem_core/radio_drivers/lr11xx_driver/src/lr11xx_crypto_engine.c\
smtc_modem_core/radio_drivers/lr11xx_driver/src/lr11xx_driver_version.c\
smtc_modem_core/radio_drivers/lr11xx_driver/src/lr11xx_radio.c\
smtc_modem_core/radio_drivers/lr11xx_driver/src/lr11xx_regmem.c\
smtc_modem_core/radio_drivers/lr11xx_driver/src/lr11xx_system.c\
smtc_modem_core/radio_drivers/lr11xx_driver/src/lr11xx_lr_fhss.c
else
RADIO_DRIVER_C_SOURCES += \
smtc_modem_core/radio_drivers/lr11xx_driver/src/lr11xx_bootloader.c\
smtc_modem_core/radio_drivers/lr11xx_driver/src/lr11xx_crypto_engine.c\
Expand All @@ -31,6 +39,11 @@ ifeq ($(USE_GNSS),yes)
RADIO_DRIVER_C_SOURCES += \
smtc_modem_core/radio_drivers/lr11xx_driver/src/lr11xx_gnss.c
endif
ifeq ($(USE_GNSS),yes)
SMTC_MODEM_SERVICES_C_SOURCES += \
smtc_modem_core/smtc_modem_services/src/almanac_update/almanac_update.c
endif
endif

SMTC_RAL_C_SOURCES += \
smtc_modem_core/smtc_ral/src/ral_lr11xx.c
Expand Down Expand Up @@ -82,12 +95,8 @@ endif # soft_crypto
#-----------------------------------------------------------------------------
MODEM_C_DEFS += \
-DLR11XX\
-DLR11XX_TRANSCEIVER

ifeq ($(RADIO),lr1120)
MODEM_C_DEFS += \
-DLR1120
endif
-DLR11XX_TRANSCEIVER\
-DLR11XX_DISABLE_WARNINGS

ifeq ($(CRYPTO),LR11XX)
MODEM_C_DEFS += \
Expand Down
2 changes: 1 addition & 1 deletion makefiles/regions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ endif # REGION
#-----------------------------------------------------------------------------

ifndef RP_VERSION
MODEM_C_DEFS += -DRP2_101
MODEM_C_DEFS += -DRP2_103
endif

ifeq ($(RP_VERSION),RP2_103)
Expand Down
Loading

0 comments on commit 3258275

Please sign in to comment.