Skip to content

LoRaWAN: Reporting scheduling failures #7495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2018

Conversation

hasnainvirk
Copy link
Contributor

Description

It is quite possible that the user request for scheduling an uplink is deferred because of backoff or if it was a CONFIRMED message, a retry may take place on a different datarate and different channel.
We didn't have a hook for such deferred scheduling, telling the user whether the async rescheduling worked or not. This commit adds that capability and now we can tell the application if a scheduling failure took place after the original schedule request was accepted.

Pull request type

[ ] Fix
[X] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

Target Release

Mbed OS 5.10

@hasnainvirk hasnainvirk force-pushed the scheduling_failure_report branch from 956fcd3 to 874f257 Compare July 12, 2018 12:08
@hasnainvirk
Copy link
Contributor Author

hasnainvirk commented Jul 12, 2018

@kivaisan @kjbracey-arm @0xc0170 Please review.

@0xc0170 0xc0170 requested a review from a team July 12, 2018 12:31
(void) status;

if ((schedule_tx() != LORAWAN_STATUS_OK) && nwk_joined()) {
_scheduling_failure_handler.call();
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these can be just _scheduling_failure_handler();

@hasnainvirk
Copy link
Contributor Author

@kjbracey-arm Can you please review ?

@0xc0170 0xc0170 requested a review from kjbracey July 13, 2018 08:36
@hasnainvirk
Copy link
Contributor Author

@0xc0170 @cmonr Could you please review it ? Kimmo from my team had approved it already.

@cmonr
Copy link
Contributor

cmonr commented Jul 19, 2018

@hasnainvirk Would you mind taking a look at ARMmbed/mbed-os-example-lorawan#88? I'll review this right now and get CI started immediately after.

Copy link
Contributor

@cmonr cmonr left a comment

Choose a reason for hiding this comment

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

A single question, but LGTM otherwise.

{
_lora_time.activate_timer_subsystem(queue);
_lora_phy->initialize(&_lora_time);

_ev_queue = queue;
_scheduling_failure_handler = scheduling_failure_handler;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it fair to say that a null function pointer will never be passed to this function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is an internal API and we always pass a legitimate pointer of the callback that's why probably we don't need a null check here.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 20, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jul 20, 2018

Build : SUCCESS

Build number : 2654
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7495/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Jul 20, 2018

@mbed-ci
Copy link

mbed-ci commented Jul 21, 2018

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 25, 2018

Waiting for @kjbracey-arm / @AnttiKauppila approval

@hasnainvirk
Copy link
Contributor Author

@0xc0170 Antti and Kevin are away for vacations. Somebody else needs to review. @kivaisan have already reviewed from our side.

@hasnainvirk
Copy link
Contributor Author

@SeppoTakalo Can you please review this ?

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 1, 2018

@hasnainvirk Can you rebase to resolve a conflict (another patch for lora caused it)

It is quite possible that the user request for scheduling an uplink is deferred because of backoff or if it was a CONFIRMED message, a retry may take place on a different datarate and different channel.
We didn't have a hook for such deferred scheduling, telling the user whether the async rescheduling worked or not. This commit adds that capability and now we can tell the application if a scheduling failure took place after the original schedule request was accepted.
@hasnainvirk hasnainvirk force-pushed the scheduling_failure_report branch from 874f257 to b07c3e7 Compare August 1, 2018 13:28
@hasnainvirk
Copy link
Contributor Author

@0xc0170 Rebase done.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 1, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Aug 1, 2018

Build : SUCCESS

Build number : 2717
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7495/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Aug 1, 2018

@mbed-ci
Copy link

mbed-ci commented Aug 1, 2018

@cmonr cmonr merged commit 952930c into ARMmbed:master Aug 2, 2018
pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018
…eport

LoRaWAN: Reporting scheduling failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants