Skip to content

pkg/semtech-loramac: Reduce timeout in timer#10180

Merged
aabadie merged 1 commit intoRIOT-OS:masterfrom
leandrolanzieri:pr/pkg/semtech_timeout
Oct 18, 2018
Merged

pkg/semtech-loramac: Reduce timeout in timer#10180
aabadie merged 1 commit intoRIOT-OS:masterfrom
leandrolanzieri:pr/pkg/semtech_timeout

Conversation

@leandrolanzieri
Copy link
Copy Markdown
Contributor

Contribution description

This modifies the time in which the timeout is triggered in advance in the semtech-loramac timer module.
This value has been reduced for the latest version update of semtech_loramac package (#8864), but for datarates above 2 the downlink messages in the join process are missed (see #10103).

Testing procedure

1- Run the lorawan example with the current master. As it uses DR 5 it should fail to join.
2- Apply the patch and the join should succeed.

Issues/PRs references

Fixes #10103
#8864

obj->timeout = (value - 22) * US_PER_MS;
triggered 50ms in advance to make sure the radio switches to RX mode on
time and doesn't miss any downlink messages, taking in consideration
possible xtimer innaccuracies. */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's inaccuracies

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops...

@aabadie aabadie added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: LoRa Area: LoRa radio support labels Oct 17, 2018
Copy link
Copy Markdown
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, please squash!

@leandrolanzieri
Copy link
Copy Markdown
Contributor Author

Done!

@aabadie aabadie added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Oct 18, 2018
@aabadie aabadie merged commit 9497a6d into RIOT-OS:master Oct 18, 2018
@leandrolanzieri leandrolanzieri deleted the pr/pkg/semtech_timeout branch October 18, 2018 06:26
@aabadie aabadie added this to the Release 2018.10 milestone Nov 5, 2018
@kfessel
Copy link
Copy Markdown
Contributor

kfessel commented Nov 19, 2018

According to the LoRa specs https://lora-alliance.org/resource-hub/lorawantm-specification-v11 Paragraph 3.3.1 the Receive Windows after Transmitting should account for a 20 microseconds (us or µs) delay inaccuracy the comment in current master:pkg/semtech-loramac/contrib/semtech_loramac_timer.c contains a comment starting at line 63
seems wrong to me ( stating milliseconds). I am not sure about the inaccuracy of xtimer but 50ms or 22ms seem huge for me. This might have caused on #10352.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: LoRa Area: LoRa radio support CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants