Skip to content

Commit 0979db3

Browse files
author
Rafael Baquero
committed
Release v3.1.7
1 parent 4274349 commit 0979db3

File tree

515 files changed

+441803
-12615
lines changed

Some content is hidden

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

515 files changed

+441803
-12615
lines changed

CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# LoRa Basics Modem Library changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
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).
6+
7+
## [v3.1.7] 2022-04-22
8+
9+
### Added
10+
11+
* AS923 (3 sub regions included), IN865, KR920, RU864, AU915 Regional Parameters
12+
* Class B support
13+
* Class B Multicast support (up to 4 sessions)
14+
* Class C Multicast support (up to 4 sessions)
15+
* LR-FHSS Support (enabled with compilation option: `RP_VERSION=RP2_103`)
16+
* Support of SX1261 and SX1262 radios
17+
* Added commands:
18+
* New connectivity check function: smtc_modem_lorawan_get_lost_connection_counter
19+
* Makefile: add Regional Parameters option to choose to compile the code for RP2_101 or RP2_103
20+
* [smtc_modem_hal]:
21+
* `smtc_modem_hal_assert(expr)` macro
22+
* `smtc_modem_hal_assert_fail()` function
23+
* `smtc_modem_hal_get_time_in_100us()` function
24+
* `smtc_modem_hal_get_radio_irq_timestamp_in_100us()` function
25+
* In `SMTC_MODEM_EVENT_DOWNDATA` event status: added new class B reception windows, fpending bit status, reception frequency and datarate
26+
* Middleware API for geolocation
27+
* Add basic example to provide an easy start point on Nucleo L476 board
28+
29+
### Changed
30+
31+
* `smtc_modem_set_crystal_error` renamed to `smtc_modem_set_crystal_error_ppm` and now takes real ppm (previously was ppt)
32+
* `smtc_modem_get_stack_state`: Added a new stack state `SMTC_MODEM_STACK_STATE_TX_WAIT` when stack is between retransmissions
33+
* `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]:
35+
* `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
36+
* LR1110 driver was renamed to LR11xx driver and now also supports LR1120 radio
37+
* Updated to latest version of SX126x and LR11xx driver
38+
* An `ALMANAC_UPDATE` event is generated if "Almanac force update" is received.
39+
* File upload size can be now up to 8k
40+
* Remove -2dB default tx power offset (now it is 0) and manage EIRP to ERP conversion in LoRaWAN stack
41+
* `smtc_modem_connection_timeout_get_thresholds`: Default internal value of `nb_of_uplinks_before_network_controlled` is now 0 (before was 255). Result: the mobile to static automatic switching service is now deactivated by default.
42+
43+
### Fixed
44+
45+
* Corrected `Fcnt_down` msb management
46+
* `smtc_modem_derive_keys` now takes user defined EUIs into account
47+
* AU915: when dwell time was on, the returned max payload sizes were incorrect. This has been corrected
48+
* Corrected bug in `smtc_modem_reset_charge`
49+
* Internal join nonce value is now initialized to FFFFFF to avoid dropping the first join accept message
50+
51+
## [v2.1.0] 2021-11-03
52+
53+
Initial release

LICENSE.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
The Clear BSD License
2+
Copyright Semtech Corporation 2022. All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted (subject to the limitations in the disclaimer
6+
below) provided that the following conditions are met:
7+
* Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above copyright
10+
notice, this list of conditions and the following disclaimer in the
11+
documentation and/or other materials provided with the distribution.
12+
* Neither the name of the Semtech corporation nor the
13+
names of its contributors may be used to endorse or promote products
14+
derived from this software without specific prior written permission.
15+
16+
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
17+
THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
18+
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
19+
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
20+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE
21+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27+
POSSIBILITY OF SUCH DAMAGE.

LICENSES.txt

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
Semtech's software made available with this LICENSES.txt file
2+
includes or is provided with certain third-party components that
3+
are subject to separate terms and conditions specified by
4+
applicable third-party licenses (“Third-Party Components”).
5+
These Third-Party Components and applicable licenses are set
6+
forth in this LICENSES.txt file.
7+
8+
Your access and use of all Third-Party Components are at all times
9+
governed by the applicable third-party licenses.
10+
11+
12+
Semtech Corporation
13+
-------------------
14+
15+
The Clear BSD License
16+
Copyright Semtech Corporation 2022. All rights reserved.
17+
18+
Redistribution and use in source and binary forms, with or without
19+
modification, are permitted (subject to the limitations in the disclaimer
20+
below) provided that the following conditions are met:
21+
* Redistributions of source code must retain the above copyright
22+
notice, this list of conditions and the following disclaimer.
23+
* Redistributions in binary form must reproduce the above copyright
24+
notice, this list of conditions and the following disclaimer in the
25+
documentation and/or other materials provided with the distribution.
26+
* Neither the name of the Semtech corporation nor the
27+
names of its contributors may be used to endorse or promote products
28+
derived from this software without specific prior written permission.
29+
30+
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
31+
THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
32+
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
33+
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
34+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE
35+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
36+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
37+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
38+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
39+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
40+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41+
POSSIBILITY OF SUCH DAMAGE.
42+
43+
44+
STMicroelectronics (STM32L4 HAL)
45+
------------------------------------------
46+
47+
This software component is licensed by ST under BSD 3-Clause license,
48+
the "License"; You may not use this file except in compliance with the
49+
License. You may obtain a copy of the License at:
50+
opensource.org/licenses/BSD-3-Clause
51+
52+
53+
STMicroelectronics (CMSIS Device)
54+
------------------------------
55+
56+
This software component is licensed by ST under Apache License, Version 2.0,
57+
the "License"; You may not use this file except in compliance with the
58+
License. You may obtain a copy of the License at:
59+
opensource.org/licenses/Apache-2.0
60+
61+
62+
Arm Limited (CMSIS)
63+
-------------------
64+
65+
Licensed under the Apache License, Version 2.0 (the License); you may
66+
not use this file except in compliance with the License.
67+
You may obtain a copy of the License at
68+
69+
www.apache.org/licenses/LICENSE-2.0
70+
71+
Unless required by applicable law or agreed to in writing, software
72+
distributed under the License is distributed on an AS IS BASIS, WITHOUT
73+
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
74+
See the License for the specific language governing permissions and
75+
limitations under the License.
76+
77+
AES - Issue: 09/09/2006
78+
-----------------------
79+
80+
Copyright (c) 1998-2008, Brian Gladman, Worcester, UK. All rights reserved.
81+
82+
LICENSE TERMS
83+
84+
The redistribution and use of this software (with or without changes)
85+
is allowed without the payment of fees or royalties provided that:
86+
87+
1. source code distributions include the above copyright notice, this
88+
list of conditions and the following disclaimer;
89+
90+
2. binary distributions include the above copyright notice, this list
91+
of conditions and the following disclaimer in their documentation;
92+
93+
3. the name of the copyright holder is not used to endorse products
94+
built using this software without specific written permission.
95+
96+
DISCLAIMER
97+
98+
This software is provided 'as is' with no explicit or implied warranties
99+
in respect of its properties, including, but not limited to, correctness
100+
and/or fitness for purpose.
101+
102+
103+
CMAC
104+
----
105+
106+
Copyright (C) 2009 Lander Casado, Philippas Tsigas
107+
108+
All rights reserved.
109+
110+
Permission is hereby granted, free of charge, to any person obtaining
111+
a copy of this software and associated documentation files
112+
(the "Software"), to deal with the Software without restriction, including
113+
without limitation the rights to use, copy, modify, merge, publish,
114+
distribute, sublicense, and/or sell copies of the Software, and to
115+
permit persons to whom the Software is furnished to do so, subject to
116+
the following conditions:
117+
118+
Redistributions of source code must retain the above copyright notice,
119+
this list of conditions and the following disclaimers. Redistributions in
120+
binary form must reproduce the above copyright notice, this list of
121+
conditions and the following disclaimers in the documentation and/or
122+
other materials provided with the distribution.
123+
124+
In no event shall the authors or copyright holders be liable for any special,
125+
incidental, indirect or consequential damages of any kind, or any damages
126+
whatsoever resulting from loss of use, data or profits, whether or not
127+
advised of the possibility of damage, and on any theory of liability,
128+
arising out of or in connection with the use or performance of this software.
129+
130+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
131+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
132+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
133+
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
134+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
135+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
136+
DEALINGS WITH THE SOFTWARE

Makefile

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,6 @@ PERF_TEST=no
2020
# Crypto management
2121
CRYPTO ?= SOFT
2222

23-
# For LR1110 tranceiver
24-
# - CHINA_DEMO -> Use Regional Parameters 1.0
25-
# - HYBRID_CHINA -> RP 1.0, single channel
26-
CHINA_DEMO ?= no
27-
HYBRID_CHINA ?= no
28-
29-
ifeq ($(HYBRID_CHINA),yes)
30-
CHINA_DEMO = yes
31-
endif
32-
3323
# Compile with coverage analysis support
3424
COVERAGE ?= no
3525

@@ -47,22 +37,26 @@ RADIO ?= nc
4737

4838
# Trace prints
4939
MODEM_TRACE ?= yes
40+
MODEM_DEEP_TRACE ?= no
5041

5142
# GNSS
5243
USE_GNSS ?= yes
5344

45+
# TB bypass
46+
BYPASS_JOIN_DUTY_CYCLE?= no
5447

48+
# Middleware advanced access
49+
MIDDLEWARE?= no
5550

56-
ifeq ($(MODEM_APP),EXAMPLE_LR1110_DEMO)
57-
override USE_GNSS = yes
51+
ifeq ($(MODEM_APP),HW_MODEM)
52+
override BYPASS_JOIN_DUTY_CYCLE = yes
5853
endif
5954

60-
6155
#-----------------------------------------------------------------------------
6256
# default action: print help
6357
#-----------------------------------------------------------------------------
6458
help:
65-
$(call echo_help_b, "Available TARGETs: sx128x lr1110 sx1261 sx1262")
59+
$(call echo_help_b, "Available TARGETs: sx128x lr1110 lr1120 sx1261 sx1262")
6660
$(call echo_help, "")
6761
$(call echo_help_b, "-------------------------------- Clean -------------------------------------")
6862
$(call echo_help, " * make clean_<TARGET> : clean basic_modem for a given target")
@@ -84,15 +78,17 @@ help:
8478
$(call echo_help, " * - KR_920")
8579
$(call echo_help, " * - RU_864")
8680
$(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)")
8785
$(call echo_help, " * CRYPTO=xxx : choose which crypto should be compiled (default: SOFT)")
8886
$(call echo_help, " * - SOFT")
89-
$(call echo_help, " * - LR1110 (only for lr1110 target)")
90-
$(call echo_help, " * - LR1110_WITH_CREDENTIALS (only for lr1110 target)")
87+
$(call echo_help, " * - LR11XX (only for lr1110 and lr1120 targets)")
88+
$(call echo_help, " * - LR11XX_WITH_CREDENTIALS (only for lr1110 and lr1120 targets)")
9189
$(call echo_help, " * MODEM_TRACE=yes/no : choose to enable or disable modem trace print (default: trace is ON)")
92-
$(call echo_help, " * HYBRID_CHINA=yes : only for lr1110 target: build hybrid china with monochannel region")
93-
$(call echo_help, " * CHINA_DEMO=yes : only for lr1110 target: build with full China RP_1_0 region")
94-
$(call echo_help, " * USE_GNSS=yes/no : only for lr1110 target: choose to enable or disable use of gnss (default: gnss is ON)")
95-
$(call echo_help, " * BYPASS=yes : build target using lorawan bypass")
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")
9692
$(call echo_help_b, "-------------------- Optional makefile parameters --------------------------")
9793
$(call echo_help, " * MULTITHREAD=no : Disable multithreaded build")
9894
$(call echo_help, " * COVERAGE=xxx : build target with coverage instrumentation for specific subsystems:")
@@ -107,7 +103,11 @@ help:
107103
# Makefile include selection
108104
#-----------------------------------------------------------------------------
109105
ifeq ($(RADIO),lr1110)
110-
-include makefiles/lr1110.mk
106+
-include makefiles/lr11xx.mk
107+
endif
108+
109+
ifeq ($(RADIO),lr1120)
110+
-include makefiles/lr11xx.mk
111111
endif
112112

113113
ifeq ($(RADIO),sx1261)
@@ -129,7 +129,7 @@ endif
129129
.PHONY: FORCE
130130
FORCE:
131131

132-
all: basic_modem_sx128x basic_modem_lr1110 basic_modem_sx1261 basic_modem_sx1262
132+
all: basic_modem_sx128x basic_modem_lr1110 basic_modem_lr1120 basic_modem_sx1261 basic_modem_sx1262
133133

134134
#-----------------------------------------------------------------------------
135135
# Clean
@@ -143,6 +143,9 @@ clean_sx128x:
143143
clean_lr1110:
144144
$(MAKE) clean_target RADIO=lr1110
145145

146+
clean_lr1120:
147+
$(MAKE) clean_target RADIO=lr1120
148+
146149
clean_sx1261:
147150
$(MAKE) clean_target RADIO=sx1261
148151

@@ -158,6 +161,9 @@ basic_modem_sx128x:
158161
basic_modem_lr1110:
159162
$(MAKE) basic_modem RADIO=lr1110 $(MTHREAD_FLAG)
160163

164+
basic_modem_lr1120:
165+
$(MAKE) basic_modem RADIO=lr1120 $(MTHREAD_FLAG)
166+
161167
basic_modem_sx1261:
162168
$(MAKE) basic_modem RADIO=sx1261 $(MTHREAD_FLAG)
163169

README.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,27 @@ The LoRaWAN version that is currently implemented in LoRa Basics Modem is v1.0.4
1010

1111
LoRa Basics Modem supports the following LoRaWAN regions:
1212

13-
* EU868
14-
* US915
15-
* CN470_RP_1_0
13+
* AS_923 (AS923-1, AS923-2, AS923-3)
14+
* AU_915
15+
* CN_470
16+
* CN_470_RP_1_0
17+
* EU_868
18+
* IN_865
19+
* KR_920
20+
* RU_864
21+
* US_915
22+
23+
### LoRaWAN regional parameters
24+
25+
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.
1626

1727
### LoRaWAN class
1828

1929
LoRa Basics Modem supports the following LoRaWAN classes:
2030

2131
* Class A
22-
* Class C
32+
* Class B (with up to 4 multicast sessions)
33+
* Class C (with up to 4 multicast sessions)
2334

2435
## LoRa Basics Modem services
2536

@@ -49,10 +60,21 @@ The Hardware Abstraction Layer of LoRa Basics Modem is defined in the `smtc_mode
4960
LoRa Basics Modem supports the following transceivers:
5061

5162
* LR1110 with firmware 0x0307.
63+
* SX1261
64+
* SX1262
65+
66+
## Known Limitations
67+
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+
* [charge] Values returned by `smtc_modem_get_charge()` for regions CN470 and CN470_RP1 are not accurate
71+
* [charge] Values returned by `smtc_modem_get_charge()` for the LR-FHSS based datarate are not accurate
72+
* [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`
73+
* [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
5274

5375
## Disclaimer
5476

55-
This software has been extensively tested when targeting LR1110 for the EU868, US915, and CN470_RP_1_0 LoRaWAN regions. For all other combinations of features this software shall be considered an Engineering Sample.
77+
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.
5678

5779
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.
5880

lora_basics_modem_version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ extern "C" {
5555
* -----------------------------------------------------------------------------
5656
* --- PUBLIC TYPES ------------------------------------------------------------
5757
*/
58-
#define LORA_BASICS_MODEM_FW_VERSION_MAJOR 2
58+
#define LORA_BASICS_MODEM_FW_VERSION_MAJOR 3
5959
#define LORA_BASICS_MODEM_FW_VERSION_MINOR 1
60-
#define LORA_BASICS_MODEM_FW_VERSION_PATCH 0
60+
#define LORA_BASICS_MODEM_FW_VERSION_PATCH 7
6161

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

0 commit comments

Comments
 (0)