Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
* Starting join bank can be set over SMTC modem API for regions that support this (AU915, US915)
* Subsequent join attempts cycle through all banks for regions that support this (AU915, US915)

### Fixed
* Fixed session channel mask restoration by restoring the LoRaWAN session after region initialization.

## [v4.8.0] 2024-12-20

This version is based on feature branch v4.5.0 of the LoRa Basics Modem.
Expand Down
14 changes: 7 additions & 7 deletions lbm_lib/smtc_modem_core/modem_utilities/modem_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,17 @@ void modem_context_init_light( void ( *callback )( void ), radio_planner_t* rp )
lorawan_api_init( rp, stack_id, ( void ( * )( lr1_stack_mac_down_data_t* ) ) modem_downlink_callback );

lorawan_api_dr_strategy_set( STATIC_ADR_MODE, stack_id );

#if defined ( STORE_JOIN_SESSION )
SMTC_MODEM_HAL_TRACE_PRINTF( "Trying to restore join session.\n" );
lorawan_api_join_session_restore( stack_id );
#else
lorawan_api_join_status_clear( stack_id );
#endif

// to init duty cycle
smtc_real_region_types_t region = lorawan_api_get_region( stack_id );
lorawan_api_set_region( region, stack_id );

#if defined ( STORE_JOIN_SESSION )
SMTC_MODEM_HAL_TRACE_PRINTF( "Trying to restore join session.\n" );
lorawan_api_join_session_restore( stack_id );
#else
lorawan_api_join_status_clear( stack_id );
#endif
}

uint8_t index_tmp = 0;
Expand Down