Skip to content

Commit

Permalink
Release v2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Antoine committed Mar 13, 2023
1 parent 43de4d3 commit 8438952
Show file tree
Hide file tree
Showing 83 changed files with 112,824 additions and 12,771 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ 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).

## [2.1.0] - 2023-03-05

### Added

- Support of all LR1121 shields:
- LR1121MB1DIS
- LR1121MB1GIS
- `HAL_DBG_TRACE_CRITICAL` with compile-time-enabled deadloop

## [2.0.1] - 2022-11-02

### Changed
Expand Down
40 changes: 27 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ This SDK is developed on the STMicroeletronics [NUCLEO-L476RG development board]

Different Semtech shields can configured at compile time:

* LR1110 / LR1120 see [README](shields/LR11XX/smtc_shield_lr11xx/README.md)
* LR1110 / LR1120 / LR1121 see [README](shields/LR11XX/smtc_shield_lr11xx/README.md)
* SX1261 / SX1262 / SX1268 [README](shields/SX126X/smtc_shield_sx126x/README.md)

### Toolchain
Expand All @@ -69,12 +69,13 @@ Examples can be compiled with either:

The projects are known to compile with GCC arm-none-eabi toolchain v10.3.1.

### LR1110 / LR1120 firmware
### LR1110 / LR1120 / LR1121 firmware

The LoRa Basics Modem library requires the following firmware:

* LR1110 firmware version 0x0307 ([available here](https://github.com/Lora-net/radio_firmware_images/tree/master/lr1110/transceiver))
* LR1120 firmware version 0x0101 ([available here](https://github.com/Lora-net/radio_firmware_images/tree/master/lr1120/transceiver))
* LR1121 firmware version 0x0101 ([available here](https://github.com/Lora-net/radio_firmware_images/tree/master/lr1121/transceiver))

To update the transceiver with the desired firmware version, please use [the updater tool application](https://github.com/Lora-net/SWTL001).

Expand All @@ -94,9 +95,9 @@ Each example is delivered with a several Keil project files, available under `MD

| Target name | Transceivers | LoRaWAN parameters | Cryptographic operations | Notes |
| --------------------------------------------------- | ------------------------ | ------------------ | --------------------------- | ---------------------------------- |
| lbm_example_<example>_LR11xx_LR_cred_crypto.uvprojx | LR1110 / LR1120 | LR11XX-based | LR11xx cryptographic engine | |
| lbm_example_<example>_LR11xx_LR_crypto.uvprojx | LR1110 / LR1120 | User-defined | LR11xx cryptographic engine | |
| lbm_example_<example>_LR11xx_soft_crypto.uvprojx | LR1110 / LR1120 | User-defined | Software | |
| lbm_example_<example>_LR11xx_LR_cred_crypto.uvprojx | LR1110 / LR1120 / LR1121 | LR11XX-based | LR11xx cryptographic engine | |
| lbm_example_<example>_LR11xx_LR_crypto.uvprojx | LR1110 / LR1120 / LR1121 | User-defined | LR11xx cryptographic engine | |
| lbm_example_<example>_LR11xx_soft_crypto.uvprojx | LR1110 / LR1120 / LR1121 | User-defined | Software | |
| lbm_example_<example>_SX126x_soft_crypto.uvprojx | SX1261 / SX1262 / SX1268 | User-defined | Software | Not available for `Almanac update` |

Each project has different targets ([Keil manual](https://www.keil.com/support/man/docs/uv4/uv4_ca_projtargfilegr.htm)), each one selecting a specific shield.
Expand All @@ -109,19 +110,19 @@ The procedure to compile a project is then the following:

#### GNU Arm embedded toolchain

Each example is delivered with a makfile, available under `makefile` folder. The output files of the build process are stored in the `build` folder with firmware binary file having the same name as the project with a .bin extension.
Each example is delivered with a makefile, available under `makefile` folder. The output files of the build process are stored in the `build` folder with firmware binary file having the same name as the project with a .bin extension.

It is possible to choose the cryptographic mode with the `CRYPTO` variable:

| CRYPTO value | Cryptographic operations | LoRaWAN parameters | Comments |
| ----------------------- | --------------------------- | ------------------ | ------------------------------------------------- |
| SOFT | Software | User-defined | Compatible with all transceivers |
| LR11XX | LR11XX cryptographic engine | User-defined | Compatible with LR1110 / LR1120 transceivers only |
| LR11XX_WITH_CREDENTIALS | LR11XX cryptographic engine | LR11XX-based | Compatible with LR1110 / LR1120 transceivers only |
| CRYPTO value | Cryptographic operations | LoRaWAN parameters | Comments |
| ----------------------- | --------------------------- | ------------------ | ---------------------------------------------------------- |
| SOFT | Software | User-defined | Compatible with all transceivers |
| LR11XX | LR11XX cryptographic engine | User-defined | Compatible with LR1110 / LR1120 / LR1121 transceivers only |
| LR11XX_WITH_CREDENTIALS | LR11XX cryptographic engine | LR11XX-based | Compatible with LR1110 / LR1120 / LR1121 transceivers only |

The default value is `LR11XX`.

It is possible to choose the shield with the `RADIO_BOARD` variable. The possible values are listed in the correspondind `README` file:
It is possible to choose the shield with the `RADIO_BOARD` variable. The possible values are listed in the corresponding `README` file:

* [LR11xx shields](shields/LR11XX/smtc_shield_lr11xx/README.md)
* [SX126x shields](shields/SX126X/smtc_shield_sx126x/README.md)
Expand All @@ -147,7 +148,7 @@ $ make clean_lbm

##### Command line configuration

Additionnal configuration flags can be passed from command line to compiler with `EXTRAFLAGS` argument.
Additional configuration flags can be passed from command line to compiler with `EXTRAFLAGS` argument.
This is dedicated to define macros that can be defined like the following:

```bash
Expand All @@ -160,6 +161,19 @@ Not all macro can be redefined through this way. Refer to the readme of examples
Note that when using the configuration on command line, `make` cannot detect a change in configuration on next build.
Therefore `make clean` must be invoked when building after a build where configuration was provided on command line.

##### Note on Critical message printing

The code can produce critical messages being printed on serial port when critical situations occurs.
This is typically the case when setting a LoRaWAN region or LoRaWAN class fails.

The default behavior is to print the critical message and keep running.
This behavior can be changed so that the code freezes (until watchdog reset the device).
To do so, the macro `ENABLE_CRITICAL_ERROR_DEADLOOP` has to be defined, for instance by doing:

```shell
$ make EXTRAFLAGS='-DENABLE_CRITICAL_ERROR_DEADLOOP'
```

### Load

After a project is built, it can be loaded onto a device.
Expand Down
21 changes: 12 additions & 9 deletions apps/common/apps_modem_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,19 +190,20 @@ void apps_modem_common_configure_lorawan_params( uint8_t stack_id )
rc = smtc_modem_set_deveui( stack_id, dev_eui );
if( rc != SMTC_MODEM_RC_OK )
{
HAL_DBG_TRACE_ERROR( "smtc_modem_set_deveui failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ), rc );
HAL_DBG_TRACE_CRITICAL( "smtc_modem_set_deveui failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ), rc );
}

rc = smtc_modem_set_joineui( stack_id, join_eui );
if( rc != SMTC_MODEM_RC_OK )
{
HAL_DBG_TRACE_ERROR( "smtc_modem_set_joineui failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ), rc );
HAL_DBG_TRACE_CRITICAL( "smtc_modem_set_joineui failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ),
rc );
}

rc = smtc_modem_set_nwkkey( stack_id, app_key );
if( rc != SMTC_MODEM_RC_OK )
{
HAL_DBG_TRACE_ERROR( "smtc_modem_set_nwkkey failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ), rc );
HAL_DBG_TRACE_CRITICAL( "smtc_modem_set_nwkkey failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ), rc );
}
#endif

Expand All @@ -215,7 +216,7 @@ void apps_modem_common_configure_lorawan_params( uint8_t stack_id )
}
else
{
HAL_DBG_TRACE_ERROR( "smtc_modem_get_deveui failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ), rc );
HAL_DBG_TRACE_CRITICAL( "smtc_modem_get_deveui failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ), rc );
}

rc = smtc_modem_get_joineui( stack_id, join_eui );
Expand All @@ -225,7 +226,8 @@ void apps_modem_common_configure_lorawan_params( uint8_t stack_id )
}
else
{
HAL_DBG_TRACE_ERROR( "smtc_modem_get_joineui failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ), rc );
HAL_DBG_TRACE_CRITICAL( "smtc_modem_get_joineui failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ),
rc );
}

#ifdef LR11XX_DEFINED_JOIN_PARAMETERS
Expand All @@ -240,7 +242,8 @@ void apps_modem_common_configure_lorawan_params( uint8_t stack_id )
}
else
{
HAL_DBG_TRACE_ERROR( "smtc_modem_get_chip_eui failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ), rc );
HAL_DBG_TRACE_CRITICAL( "smtc_modem_get_chip_eui failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ),
rc );
}

rc = smtc_modem_get_pin( stack_id, pin );
Expand All @@ -250,22 +253,22 @@ void apps_modem_common_configure_lorawan_params( uint8_t stack_id )
}
else
{
HAL_DBG_TRACE_ERROR( "smtc_modem_get_pin failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ), rc );
HAL_DBG_TRACE_CRITICAL( "smtc_modem_get_pin failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ), rc );
}
#endif

rc = smtc_modem_set_class( stack_id, LORAWAN_CLASS );
if( rc != SMTC_MODEM_RC_OK )
{
HAL_DBG_TRACE_ERROR( "smtc_modem_set_class failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ), rc );
HAL_DBG_TRACE_CRITICAL( "smtc_modem_set_class failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ), rc );
}

modem_class_to_string( LORAWAN_CLASS );

rc = smtc_modem_set_region( stack_id, LORAWAN_REGION );
if( rc != SMTC_MODEM_RC_OK )
{
HAL_DBG_TRACE_ERROR( "smtc_modem_set_region failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ), rc );
HAL_DBG_TRACE_CRITICAL( "smtc_modem_set_region failed: rc=%s (%d)\n", smtc_modem_return_code_to_str( rc ), rc );
}

modem_region_to_string( LORAWAN_REGION );
Expand Down
2 changes: 1 addition & 1 deletion apps/common/apps_modem_common_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extern "C" {
* --- PUBLIC MACROS -----------------------------------------------------------
*/

#define APPS_MODEM_COMMON_SDK_VERSION "v2.0.1"
#define APPS_MODEM_COMMON_SDK_VERSION "v2.1.0"

/*
* -----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions apps/demonstrations/region_switching/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Once a 2.4GHz network is joined, the application takes sending uplinks up again

Several parameters can be updated in `main_region_switching.h` header file:

| Constant | Description | Poosible values | Default Value |
| Constant | Description | Possible values | Default Value |
| --------------------------------------------------- | ---------------------------------------------------- | --------------- | ------------- |
| `LORAWAN_APP_PORT` | LoRaWAN FPort used for uplink and downlink messages | [1, 223] | 2 |
| `LORAWAN_MAX_LOST_CONNECTION_CNT_BEFORE_LINK_CHECK` | Number of uplink without downlink before link check | [1, 255] | 10 |
Expand Down Expand Up @@ -46,7 +46,7 @@ Here follow the steps that shall be seen in logs to indicate the expected behavi
INFO: ###### ===== JOINED EVENT ==== ######
```

### Push button event occured, generating uplink
### Push button event occurred, generating uplink

``` shell
INFO: ###### ===== BUTTON PUSH ==== ######
Expand Down
Loading

0 comments on commit 8438952

Please sign in to comment.