Skip to content

Commit 8d052b2

Browse files
author
rbaquero
committed
Release v3.2.4
1 parent cf58a73 commit 8d052b2

File tree

90 files changed

+3179
-2414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+3179
-2414
lines changed

CHANGELOG.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,43 @@ All notable changes to this project will be documented in this file.
44

55
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).
66

7+
## [v3.2.4] 2022-08-23
8+
9+
### Added
10+
11+
* AS923 group 4 Regional Parameters
12+
* WW2G4 Regional Parameters for LoRaWAN protocol emulation
13+
* Support of sx128x radio
14+
15+
### Changed
16+
17+
* [lr11xx_driver] Update to version `v2.1.1`
18+
* [sx126x_driver] Update to version `v2.1.0`
19+
* [makefile] remove ARM Cortex option from makefile to make LoRa Basics Modem completely agnostic from the MCU. Makefile shall be called with a new MCU_FLAGS option containing all core options
20+
* [makefile] Align built target directory with crypto compilation options
21+
* [utility/example] Update PA configuration process in `ral_lr11xx_bsp_get_tx_cfg` function.
22+
* [utility/example] Update `stm32l476rgtx_flash.ld` files to fix stack start and stop address
23+
* [utility/example] Remove `ral_lr11xx_bsp_get_rssi_calibration_table` workaround as the lr11xx driver was fixed
24+
* [utility/example] Fix `hal_rtc_get_time_ms` so that it returns a full range value
25+
* Clock Sync Service with ALC Sync source can generate events:
26+
* SMTC_MODEM_EVENT_TIME_VALID_BUT_NOT_SYNC
27+
* Clock Sync Service with DeviceTimeReq source can generate events:
28+
* SMTC_MODEM_EVENT_TIME_VALID_BUT_NOT_SYNC
29+
* SMTC_MODEM_EVENT_TIME_NOT_VALID
30+
31+
### Fixed
32+
33+
* [LFU] LoRa Basics Modem now rejects properly files with a size between 8181 and 8192 bytes
34+
* [LFU] Fix issue regarding encryption of files with size higher than 4080 bytes
35+
* [RP] Fix issue on radio interruption timestamp
36+
* [LBT] On lr11xx targets, correct outdated LBT pre-hook issue
37+
* [LBT] Remove log print when uplinking on fsk to avoid adding delay on scheduled tasks
38+
* [LBT] Moved log print after enqueued the sniffing task in Radio Planer to avoid to add a delays
39+
* [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
40+
* [LFU/Stream] In case of reception of rejoin request from DAS, reset LFU and stream services properly
41+
*[ClockSyncService/MAC] Fixed an issue where the Clock Synchronization Service was not reloaded when DeviceTimeAns was not received
42+
*[DeviceTimeReq/MAC] Fixed an issue where the GPS epoch time became invalid if DeviceTimeAns not received
43+
744
## [v3.1.7] 2022-04-22
845

946
### Added
@@ -31,7 +68,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
3168
* `smtc_modem_set_crystal_error` renamed to `smtc_modem_set_crystal_error_ppm` and now takes real ppm (previously was ppt)
3269
* `smtc_modem_get_stack_state`: Added a new stack state `SMTC_MODEM_STACK_STATE_TX_WAIT` when stack is between retransmissions
3370
* `smtc_modem_time_trigger_sync_request` function does not take `sync_service` parameter anymore, now it will use the current enabled time synchronization service
34-
* [smtc_modem_hal]:
71+
* [smtc_modem_hal]:
3572
* `smtc_modem_hal_irq_is_radio_irq_pending()` function has been replaced with `smtc_modem_hal_radio_irq_clear_pending()`. Now modem only asks to clear radio pending irq
3673
* LR1110 driver was renamed to LR11xx driver and now also supports LR1120 radio
3774
* Updated to latest version of SX126x and LR11xx driver

Makefile

Lines changed: 71 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ TARGET_ROOT = basic_modem
1515

1616
BYPASS=no
1717

18-
PERF_TEST=no
19-
20-
# Crypto management
21-
CRYPTO ?= SOFT
18+
PERF_TEST?=no
2219

2320
# Compile with coverage analysis support
2421
COVERAGE ?= no
@@ -35,67 +32,85 @@ LOG_MEM ?= yes
3532
# Tranceiver
3633
RADIO ?= nc
3734

35+
#MCU - Must be provided by user
36+
MCU_FLAGS =? nc
37+
38+
#-----------------------------------------------------------------------------
39+
# Internal LBM features management
40+
#-----------------------------------------------------------------------------
41+
42+
# Middleware advanced access
43+
MIDDLEWARE?= no
44+
45+
# Crypto management
46+
CRYPTO ?= SOFT
47+
48+
# D2D feature
49+
ADD_D2D ?= no
50+
51+
# Multicast feature
52+
ADD_MULTICAST ?= yes
53+
54+
# Stream feature
55+
ADD_SMTC_STREAM ?= yes
56+
57+
# File Upload feature
58+
ADD_SMTC_FILE_UPLOAD ?= yes
59+
60+
# ALCSYNC feature
61+
ADD_SMTC_ALC_SYNC ?= yes
62+
3863
# Trace prints
3964
MODEM_TRACE ?= yes
4065
MODEM_DEEP_TRACE ?= no
4166

4267
# GNSS
4368
USE_GNSS ?= yes
4469

45-
# TB bypass
46-
BYPASS_JOIN_DUTY_CYCLE?= no
47-
48-
# Middleware advanced access
49-
MIDDLEWARE?= no
50-
51-
ifeq ($(MODEM_APP),HW_MODEM)
52-
override BYPASS_JOIN_DUTY_CYCLE = yes
53-
endif
5470

5571
#-----------------------------------------------------------------------------
5672
# default action: print help
5773
#-----------------------------------------------------------------------------
5874
help:
59-
$(call echo_help_b, "Available TARGETs: sx128x lr1110 lr1120 sx1261 sx1262")
75+
$(call echo_help_b, "Available TARGETs: sx128x lr1110 lr1120 sx1261 sx1262 sx1268")
6076
$(call echo_help, "")
6177
$(call echo_help_b, "-------------------------------- Clean -------------------------------------")
62-
$(call echo_help, " * make clean_<TARGET> : clean basic_modem for a given target")
63-
$(call echo_help, " * make clean_all : clean all")
78+
$(call echo_help, " * make clean_<TARGET> : clean basic_modem for a given target")
79+
$(call echo_help, " * make clean_all : clean all")
6480
$(call echo_help, "")
6581
$(call echo_help_b, "----------------------------- Compilation ----------------------------------")
66-
$(call echo_help, " * make basic_modem_<TARGET> : build basic_modem on a given target")
67-
$(call echo_help, " * make all : build all targets")
82+
$(call echo_help, " * make basic_modem_<TARGET> MCU_FLAGS=xxx : build basic_modem on a given target with chosen mcu flags")
83+
$(call echo_help, " * MCU_FLAGS are mandatory. Ex for stm32l4:")
84+
$(call echo_help, " * MCU_FLAGS=\"-mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard\"")
6885
$(call echo_help, "")
6986
$(call echo_help_b, "---------------------- Optional build parameters ---------------------------")
70-
$(call echo_help, " * REGION=xxx : choose which region should be compiled (default: all)")
71-
$(call echo_help, " * Combinations also work (i.e. REGION=EU_868,US_915 )")
72-
$(call echo_help, " * - AS_923")
73-
$(call echo_help, " * - AU_915")
74-
$(call echo_help, " * - CN_470")
75-
$(call echo_help, " * - CN_470_RP_1_0")
76-
$(call echo_help, " * - EU_868")
77-
$(call echo_help, " * - IN_865")
78-
$(call echo_help, " * - KR_920")
79-
$(call echo_help, " * - RU_864")
80-
$(call echo_help, " * - US_915")
81-
$(call echo_help, " * - WW_2G4 (to be used only for lr1120 and sx128x targets)")
82-
$(call echo_help, " * RP_VERSION=xxx : choose wich regional paramerter version should be compiled (default: RP2_101) ")
83-
$(call echo_help, " * - RP2_101")
84-
$(call echo_help, " * - RP2_103 (LR-FHSS support)")
85-
$(call echo_help, " * CRYPTO=xxx : choose which crypto should be compiled (default: SOFT)")
86-
$(call echo_help, " * - SOFT")
87-
$(call echo_help, " * - LR11XX (only for lr1110 and lr1120 targets)")
88-
$(call echo_help, " * - LR11XX_WITH_CREDENTIALS (only for lr1110 and lr1120 targets)")
89-
$(call echo_help, " * MODEM_TRACE=yes/no : choose to enable or disable modem trace print (default: trace is ON)")
90-
$(call echo_help, " * USE_GNSS=yes/no : only for lr1110 and lr1120 targets: choose to enable or disable use of gnss (default: gnss is ON)")
91-
$(call echo_help, " * MIDDLEWARE=yes : build target for middleware advanced access")
87+
$(call echo_help, " * REGION=xxx : choose which region should be compiled (default: all)")
88+
$(call echo_help, " * Combinations also work (i.e. REGION=EU_868,US_915 )")
89+
$(call echo_help, " * - AS_923")
90+
$(call echo_help, " * - AU_915")
91+
$(call echo_help, " * - CN_470")
92+
$(call echo_help, " * - CN_470_RP_1_0")
93+
$(call echo_help, " * - EU_868")
94+
$(call echo_help, " * - IN_865")
95+
$(call echo_help, " * - KR_920")
96+
$(call echo_help, " * - RU_864")
97+
$(call echo_help, " * - US_915")
98+
$(call echo_help, " * - WW_2G4 (to be used only for lr1120 and sx128x targets)")
99+
$(call echo_help, " * RP_VERSION=xxx : choose wich regional paramerter version should be compiled (default: RP2_101) ")
100+
$(call echo_help, " * - RP2_101")
101+
$(call echo_help, " * - RP2_103 (LR-FHSS support)")
102+
$(call echo_help, " * CRYPTO=xxx : choose which crypto should be compiled (default: SOFT)")
103+
$(call echo_help, " * - SOFT")
104+
$(call echo_help, " * - LR11XX (only for lr1110 and lr1120 targets)")
105+
$(call echo_help, " * - LR11XX_WITH_CREDENTIALS (only for lr1110 and lr1120 targets)")
106+
$(call echo_help, " * MODEM_TRACE=yes/no : choose to enable or disable modem trace print (default: yes)")
107+
$(call echo_help, " * USE_GNSS=yes/no : only for lr1110 and lr1120 targets: choose to enable or disable use of gnss (default: yes)")
108+
$(call echo_help, " * MIDDLEWARE=yes/no : build target for middleware advanced access (default: no)")
92109
$(call echo_help_b, "-------------------- Optional makefile parameters --------------------------")
93-
$(call echo_help, " * MULTITHREAD=no : Disable multithreaded build")
94-
$(call echo_help, " * COVERAGE=xxx : build target with coverage instrumentation for specific subsystems:")
95-
$(call echo_help, " * - RADIO")
96-
$(call echo_help, " * - MODEM")
97-
$(call echo_help, " * VERBOSE=yes : Increase build verbosity")
98-
$(call echo_help, " * SIZE=yes : Display size for all objects")
110+
$(call echo_help, " * DEBUG=yes/no : Change opt to O0 and add -g* options for debugging (default: no)")
111+
$(call echo_help, " * MULTITHREAD=yes/no : Multithreaded build (default: yes)")
112+
$(call echo_help, " * VERBOSE=yes/no : Increase build verbosity (default: no)")
113+
$(call echo_help, " * SIZE=yes/no : Display size for all objects (default: no)")
99114

100115

101116

@@ -118,14 +133,18 @@ ifeq ($(RADIO),sx1262)
118133
-include makefiles/sx126x.mk
119134
endif
120135

136+
ifeq ($(RADIO),sx1268)
137+
-include makefiles/sx126x.mk
138+
endif
139+
121140
ifeq ($(RADIO),sx128x)
122141
-include makefiles/sx128x.mk
123142
endif
124143

125144
#-----------------------------------------------------------------------------
126145
-include makefiles/common.mk
127146

128-
.PHONY: clean_all all help
147+
.PHONY: clean_all all help
129148
.PHONY: FORCE
130149
FORCE:
131150

@@ -152,6 +171,9 @@ clean_sx1261:
152171
clean_sx1262:
153172
$(MAKE) clean_target RADIO=sx1262
154173

174+
clean_sx1268:
175+
$(MAKE) clean_target RADIO=sx1268
176+
155177
#-----------------------------------------------------------------------------
156178
# Compilation
157179
#-----------------------------------------------------------------------------
@@ -170,3 +192,5 @@ basic_modem_sx1261:
170192
basic_modem_sx1262:
171193
$(MAKE) basic_modem RADIO=sx1262 $(MTHREAD_FLAG)
172194

195+
basic_modem_sx1268:
196+
$(MAKE) basic_modem RADIO=sx1268 $(MTHREAD_FLAG)

README.md

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ LoRa Basics Modem supports the following LoRaWAN regions:
2020
* RU_864
2121
* US_915
2222

23+
LoRa Basics Modem supports an emulation of LoRaWAN protocol for the 2.4GHz global ISM band (WW2G4)
24+
2325
### LoRaWAN regional parameters
2426

2527
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.
@@ -60,42 +62,26 @@ The Hardware Abstraction Layer of LoRa Basics Modem is defined in the `smtc_mode
6062
LoRa Basics Modem supports the following transceivers:
6163

6264
* LR1110 with firmware 0x0307.
65+
* LR1120 with firmware 0x0101
6366
* SX1261
6467
* SX1262
68+
* SX1280
69+
* SX1281
6570

6671
## Known Limitations
6772

68-
* [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 econstructed on LoRa Cloud side
69-
* [LFU] LoRa Basics Modem does not reject files with a size between 8181 and 8192 bytes while they cannot be sent properly
70-
* [LFU] Enabling encryption on a file with a size larger than 4080 bytes will prevent this file from being properly decrypted. Recommendation is to not use encryption for files with a size larger than 4080 bytes.
73+
* [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
7174
* [charge] Values returned by `smtc_modem_get_charge()` for regions CN470 and CN470_RP1 are not accurate
7275
* [charge] Values returned by `smtc_modem_get_charge()` for the LR-FHSS based datarate are not accurate
73-
* [LBT] On LR1110 target, sometimes the LBT pre-hook can be outdated and aborted which leads to no uplink issued (this is due to a radio reset called before starting LBT operation which adds the LR1110 boot delay before any LBT actions) - as workaround, the call to `ral_init()` can be removed from `smtc_modem_core/lr1mac/src/services/smtc_lbt.c`
74-
* [ADR] When a MAC command `link_adr_req` with a new channel mask is received, it is rejected if the custom datarate profile is enabled and configured with the highest datarate of the corresponding region - as a workaround, make sure there is at least one datarate different from the highest possible one in the custom ADR list
75-
76-
In [the simple application example](/utilities/user_app/), the implementation of [smtc_modem_hal_get_time_in_ms](/utilities/user_app/smtc_hal_l4/smtc_hal_rtc.c) does not cover the full scale of the 32-bit counter and will wrap earlier than expected. As a consequence, LoRa Basics Modem may reset after the wrapping time around 4.9 days. Find below a correct implementation:
77-
78-
```c
79-
uint32_t hal_rtc_get_time_ms( void )
80-
{
81-
uint32_t seconds = 0;
82-
uint16_t milliseconds_div_10 = 0;
83-
84-
seconds = rtc_get_calendar_time( &milliseconds_div_10 );
85-
86-
return seconds * 1000 + ( milliseconds_div_10 / 10 );
87-
}
88-
```
89-
90-
This workaround requires the following modification to be applied in the radio planner source code - [radio_planner.c, line 423](/smtc_modem_core/radio_planner/src/radio_planner.c):
91-
92-
rp->irq_timestamp_ms[rp->radio_task_id] = rp_hal_get_time_in_ms( );
76+
* [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
77+
* [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.
78+
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.
9379

9480
## Disclaimer
9581

96-
This software has been extensively tested when targeting LR1110 / SX1261 / SX1262 for LoRaWAN regions mentioned in [this paragraph](#lorawan-region). For all other combinations of features this software shall be considered an Engineering Sample.
82+
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.
9783

98-
All customers wanting to leverage LoRa Basics Modem for 2.4GHz running with SX1280 transceiver must still refer to the [release v1.0.1](https://github.com/lorabasics/lorabasicsmodem/releases/tag/v1.0.1) for which Semtech provides technical customer support.
84+
Modem trace prints can only be used for debug purpose and shall be deactivated for production release.
9985

10086
### Disclaimer for Engineering Samples
10187

lora_basics_modem_version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ extern "C" {
5656
* --- PUBLIC TYPES ------------------------------------------------------------
5757
*/
5858
#define LORA_BASICS_MODEM_FW_VERSION_MAJOR 3
59-
#define LORA_BASICS_MODEM_FW_VERSION_MINOR 1
60-
#define LORA_BASICS_MODEM_FW_VERSION_PATCH 7
59+
#define LORA_BASICS_MODEM_FW_VERSION_MINOR 2
60+
#define LORA_BASICS_MODEM_FW_VERSION_PATCH 4
6161

6262
/*
6363
* -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)