Skip to content

Restore channel mask after region init on session restore#23

Open
rgracin wants to merge 1 commit into
feat/support_to_set_or_lock_uplink_dwell_timefrom
fix/session_restore_channel_mask_after_device_reset
Open

Restore channel mask after region init on session restore#23
rgracin wants to merge 1 commit into
feat/support_to_set_or_lock_uplink_dwell_timefrom
fix/session_restore_channel_mask_after_device_reset

Conversation

@rgracin

@rgracin rgracin commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Fixed

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

Details

The library does save the correct channel mask received from TTN in the JoinAccept message (cf_list) and attempts to restore it on startup, however lorawan_api_set_region is called after lorawan_api_join_session_restore and resets all channel masks back to defaults overwriting the restored configuration.
Swapping the call order in modem_context_init_light so lorawan_api_join_session_restore is called after lorawan_api_set_region fixes this. It makes sure the stored channel mask is used after reset on first transmission.

@rgracin rgracin requested a review from eva-cerncic June 24, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant