Skip to content

Commit

Permalink
Release v4.1.0-feature-fuota
Browse files Browse the repository at this point in the history
  • Loading branch information
lbm-team committed Jul 27, 2023
1 parent 8d052b2 commit 45e19e5
Show file tree
Hide file tree
Showing 285 changed files with 42,672 additions and 31,076 deletions.
83 changes: 81 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,85 @@ 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).

## [v4.1.0] 2023-07-27

This version is based on feature branch v4.0.1 of the LoRa Basics Modem.

Detailed Modem API changelog can be found [here](smtc_modem_api/CHANGELOG.md)
Detailed Modem HAL changelog can be found [here](smtc_modem_hal/CHANGELOG.md)

### Added

* [lorawan-stack] Add CSMA feature support, corresponding api functions and hw modem commands
* [lorawan-package] Add support of Firmware Management Protocol package that follows LoRaWAN® Specification TS006-1.0.0
* [lorawan-package] Add support of Multi-Package Access Protocol package that follows LoRaWAN® Specification TS007-1.0.0
* [lorawan-package] Add support of Remote Multicast Setup package that follows LoRaWAN® Specification TS005-2.0.0
* [lorawan-package] Add support of Application Layer Clock Synchronization that follows LoRaWAN® Specification TS003-2.0.0
* [lorawan-package] Add support of Fragmented Data Block Transport that follows LoRaWAN® Specification TS004-2.0.0
* [radio] Add support for sx1272 and sx1276 radios for experimental use only
* [lbm makefile] Add RADIO in options.mk to choose which LoRaWAN regions should be built.
* [lbm makefile] Add missing options in `make help` output
* [utilities] Add an makefile option in `app_options.mk` `LBM_BUILD_OPTIONS` to allow updating any LBM lib build options
* [ral_lr11xx_bsp] Add lr11xx new bsp functions `ral_lr11xx_bsp_get_lora_cad_det_peak` and `ral_lr11xx_bsp_get_rx_boost_cfg`
* [ral_sx126x_bsp] Add sx126x new bsp functions `ral_sx126x_bsp_get_lora_cad_det_peak`, `ral_sx126x_bsp_get_rx_boost_cfg` and `ral_sx126x_bsp_get_trim_cap`
* [ral_sx128x_bsp] Add sx128x new bsp function `ral_sx128x_bsp_get_lora_cad_det_peak`

### Fixed

* [AU915/US915] Fix LoRaWAN Link Adr Request channel mask control case 5 missing impact of 500MHz bank
* [class b multicast] Avoid opening multicast ping slots when the session is stopped
* [LRFHSS] Correct tx done timestamp with known bit padding delay to avoid issue with following rx windows (principally seen on US and AU regions)
* [porting tool] Correct porting tool test test_get_time_in_ms to avoid mis-alignment in radio symbol timeout
* [exti example] In `modem_event_callback`, use stack_id value given by `smtc_modem_get_event` instead of fixed defined one
* [ALCSync] Fix ALCsync periodic request timing issue

### Changed

* [lr11xx-driver] Update lr11xx radio driver to v2.3.0 version
* [sx126x-driver] Update sx126x radio driver to v2.2.0 version
* [radio-ral] Update ral to get cad specific features
* [Return codes] `smtc_modem_get_pin` and `smtc_modem_derive_keys` now return `SMTC_MODEM_RC_BUSY` in case modem is joining or joined (instead of SMTC_MODEM_RC_FAIL)

## [v4.0.1] 2023-03-16

### Fixed

* [utilities] fix incorrect location of `smtc_modem_is_irq_flag_pending()` check in exti example (shall be done before entering sleep)

## [v4.0.0] 2023-03-10

### General

This version is forked of the master branch v3.2.4 and proposes a major update of the LoRa Basics Modem.
The purpose is to have a complete and simple LoRaWAN stack implementation, including additional LoRaWAN packages (Application Layer Clock Synchronization, Fragmented Data Block Transport, Remote Multicast Setup).
Detailed Modem API changelog can be found [here](smtc_modem_api/CHANGELOG.md)
Detailed Modem HAL changelog can be found [here](smtc_modem_hal/CHANGELOG.md)

### Added

* [makefile]: add `options.mk` file that gathers all lbm build options

### Changed

* [behavior]: Under modem interruption (radio or timer), only the timestamp of the interruption is done (no radio or external peripheral access is done under irq). As a consequence the `smtc_modem_run_engine()` shall be called as soon as possible after any modem interruption (radio or timer)
* [makefile]: default Regional Parameters option is now RP2_103 (previous was RP2_101)
* [utilities]:
* add `app_options.mk` file that gathers all application build options
* [exti-example]:
* update example to send periodical uplinks
* in case compilation is done using `LR11XX_WITH_CREDENTIALS`, internal credentials won't be overridden
* add hardware modem example (folder [hw_modem](utilities/user_app/hw_modem) )
* add porting tool example
* update smtc_hal_l4 code
* update radio_hal code
* update smtc_modem_hal.c code to be compliant with latest version of lbm

### Fixed

* Correct size error in `smtc_secure_element_get_pin`
* [makefile] Remove ARM-specific flag from compilation flag
* [makefile] Correct `MCU_FLAGS` issue

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

### Added
Expand Down Expand Up @@ -38,8 +117,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
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The Clear BSD License
Copyright Semtech Corporation 2022. All rights reserved.
Copyright Semtech Corporation 2023. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted (subject to the limitations in the disclaimer
Expand Down
2 changes: 1 addition & 1 deletion LICENSES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Semtech Corporation
-------------------

The Clear BSD License
Copyright Semtech Corporation 2022. All rights reserved.
Copyright Semtech Corporation 2023. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted (subject to the limitations in the disclaimer
Expand Down
144 changes: 70 additions & 74 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,76 +3,14 @@
##############################################################################

-include makefiles/printing.mk

#-----------------------------------------------------------------------------
# Global configuration options
#-----------------------------------------------------------------------------
# Prefix for all build directories
BUILD_ROOT = build

# Prefix for all binaries names
TARGET_ROOT = basic_modem

BYPASS=no

PERF_TEST?=no

# Compile with coverage analysis support
COVERAGE ?= no

# Use multithreaded build (make -j)
MULTITHREAD ?= yes

# Print each object file size
SIZE ?= no

# Save memory usage to log file
LOG_MEM ?= yes

# Tranceiver
RADIO ?= nc

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

#-----------------------------------------------------------------------------
# Internal LBM features management
#-----------------------------------------------------------------------------

# Middleware advanced access
MIDDLEWARE?= no

# Crypto management
CRYPTO ?= SOFT

# D2D feature
ADD_D2D ?= no

# Multicast feature
ADD_MULTICAST ?= yes

# Stream feature
ADD_SMTC_STREAM ?= yes

# File Upload feature
ADD_SMTC_FILE_UPLOAD ?= yes

# ALCSYNC feature
ADD_SMTC_ALC_SYNC ?= yes

# Trace prints
MODEM_TRACE ?= yes
MODEM_DEEP_TRACE ?= no

# GNSS
USE_GNSS ?= yes
-include makefiles/options.mk


#-----------------------------------------------------------------------------
# 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 sx1261 sx1262 sx1268 sx1272 sx1276")
$(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 +19,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,21 +34,33 @@ 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, " * - RP2_101")
$(call echo_help, " * - RP2_103 (LR-FHSS support)")
$(call echo_help, " * - ALL (to build all possible regions according to the radio target) ")
$(call echo_help, " * CRYPTO=xxx : choose which crypto should be compiled (default: SOFT)")
$(call echo_help, " * - SOFT")
$(call echo_help, " * - LR11XX (only for lr1110 and lr1120 targets)")
$(call echo_help, " * - LR11XX_WITH_CREDENTIALS (only for lr1110 and lr1120 targets)")
$(call echo_help, " * MODEM_TRACE=yes/no : choose to enable or disable modem trace print (default: yes)")
$(call echo_help, " * USE_GNSS=yes/no : only for lr1110 and lr1120 targets: choose to enable or disable use of gnss (default: yes)")
$(call echo_help, " * MIDDLEWARE=yes/no : build target for middleware advanced access (default: no)")
$(call echo_help, " * LBM_CLASS_B=yes/no : choose to build class B code (default: no)")
$(call echo_help, " * LBM_CLASS_C=yes/no : choose to build class C code (default: no)")
$(call echo_help, " * LBM_MULTICAST=yes/no : choose to build multicast specifc code (default: no)")
$(call echo_help, " * LBM_ALC_SYNC=yes/no : choose to build ALCSync service (default: no)")
$(call echo_help, " * LBM_ALC_SYNC_VERSION=x : choose which version of ALCSync package should be compiled (default: 1)")
$(call echo_help, " * LBM_FUOTA=yes/no : choose to build LoRaWAN Packages for FUOTA (default: no)")
$(call echo_help, " * LBM_FUOTA_VERSION=x : choose which version of FUOTA packageq should be compiled (default: 1)")
$(call echo_help, " * LBM_FUOTA_ENABLE_FMP=yes/no : in case FUOTA is enabled choose to build LoRaWAN Firmware Management Package (default: no)")
$(call echo_help, " * LBM_FUOTA_ENABLE_MPA=yes/no : in case FUOTA is enabled choose to build LoRaWAN Multi-Package Access Package (default: no)")
$(call echo_help, " * LBM_CSMA=yes/no : choose to build CSMA Feature (default: yes)")
$(call echo_help, " * USE_CSMA_BY_DEFAULT=yes/no : in case CSMA is built choose to enable CSMA Feature at start (default: no)")
$(call echo_help, "")
$(call echo_help_b, "-------------------- Optional makefile parameters --------------------------")
$(call echo_help, " * DEBUG=yes/no : Change opt to O0 and add -g* options for debugging (default: no)")
$(call echo_help, " * DEBUG=yes/no : -g options for debugging (default: no)")
$(call echo_help, " * OPT=xxx : Choose compilation optimization (default: -Os)")
$(call echo_help, " * MULTITHREAD=yes/no : Multithreaded build (default: yes)")
$(call echo_help, " * VERBOSE=yes/no : Increase build verbosity (default: no)")
$(call echo_help, " * SIZE=yes/no : Display size for all objects (default: no)")
$(call echo_help, "")
$(call echo_help_b, "---------------------------------------------------------------------------")
$(call echo_help_b, "All options can also be directly updated in makefiles/options.mk file")



Expand Down Expand Up @@ -141,14 +91,20 @@ ifeq ($(RADIO),sx128x)
-include makefiles/sx128x.mk
endif

ifeq ($(RADIO),sx1272)
-include makefiles/sx127x.mk
endif

ifeq ($(RADIO),sx1276)
-include makefiles/sx127x.mk
endif

#-----------------------------------------------------------------------------
-include makefiles/common.mk

.PHONY: clean_all all help
.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_sx1261 basic_modem_sx1262 basic_modem_sx1272 basic_modem_sx1276

#-----------------------------------------------------------------------------
# Clean
Expand All @@ -174,9 +130,43 @@ clean_sx1262:
clean_sx1268:
$(MAKE) clean_target RADIO=sx1268

clean_sx1272:
$(MAKE) clean_target RADIO=sx1272

clean_sx1276:
$(MAKE) clean_target RADIO=sx1276

clean:
$(MAKE) clean_target

#-----------------------------------------------------------------------------
# Compilation
#-----------------------------------------------------------------------------
basic_modem:
ifeq ($(RADIO),nc)
$(call echo_error,"No radio selected! Please specified the target radio using RADIO=radio_name option")
else
ifneq ($(CRYPTO),SOFT)
ifneq ($(NB_OF_STACK),1)
$(call echo_error, "----------------------------------------------------------")
$(call echo_error, "More than one stack compiled: only soft crypto can be used")
$(call echo_error, "Please use CRYPTO=SOFT option")
$(call echo_error, "----------------------------------------------------------")
exit 1
endif
ifneq ($(RADIO),lr1110)
ifneq ($(RADIO),lr1120)
$(call echo_error, "------------------------------------------------------------")
$(call echo_error, "sx126x sx127x and sx128x radio tagets: only soft crypto can be used")
$(call echo_error, "Please use CRYPTO=SOFT option")
$(call echo_error, "------------------------------------------------------------")
exit 1
endif
endif
endif
$(MAKE) basic_modem_build
endif

basic_modem_sx128x:
$(MAKE) basic_modem RADIO=sx128x $(MTHREAD_FLAG)

Expand All @@ -194,3 +184,9 @@ basic_modem_sx1262:

basic_modem_sx1268:
$(MAKE) basic_modem RADIO=sx1268 $(MTHREAD_FLAG)

basic_modem_sx1272:
$(MAKE) basic_modem RADIO=sx1272 $(MTHREAD_FLAG)

basic_modem_sx1276:
$(MAKE) basic_modem RADIO=sx1276 $(MTHREAD_FLAG)
Loading

0 comments on commit 45e19e5

Please sign in to comment.