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

LoRaWAN: Reporting scheduling failures #7495

Merged
merged 1 commit into from Aug 2, 2018

Conversation

Projects
None yet
6 participants
@hasnainvirk
Contributor

hasnainvirk commented Jul 12, 2018

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 hasnainvirk:scheduling_failure_report branch from 956fcd3 to 874f257 Jul 12, 2018

@hasnainvirk

This comment has been minimized.

Contributor

hasnainvirk commented Jul 12, 2018

@0xc0170 0xc0170 requested a review from ARMmbed/mbed-os-wan Jul 12, 2018

(void) status;
if ((schedule_tx() != LORAWAN_STATUS_OK) && nwk_joined()) {
_scheduling_failure_handler.call();

This comment has been minimized.

@kivaisan

kivaisan Jul 12, 2018

Contributor

I think these can be just _scheduling_failure_handler();

@hasnainvirk

This comment has been minimized.

Contributor

hasnainvirk commented Jul 13, 2018

@kjbracey-arm Can you please review ?

@0xc0170 0xc0170 requested a review from kjbracey-arm Jul 13, 2018

@hasnainvirk

This comment has been minimized.

Contributor

hasnainvirk commented Jul 16, 2018

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

@cmonr

This comment has been minimized.

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.

@cmonr

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;

This comment has been minimized.

@cmonr

cmonr Jul 19, 2018

Contributor

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

This comment has been minimized.

@hasnainvirk

hasnainvirk Jul 20, 2018

Contributor

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

This comment has been minimized.

Member

0xc0170 commented Jul 20, 2018

/morph build

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Jul 20, 2018

@mbed-ci

This comment has been minimized.

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

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added needs: review and removed needs: CI labels Jul 23, 2018

@0xc0170 0xc0170 requested a review from AnttiKauppila Jul 23, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jul 25, 2018

Waiting for @kjbracey-arm / @AnttiKauppila approval

@hasnainvirk

This comment has been minimized.

Contributor

hasnainvirk commented Jul 26, 2018

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

@hasnainvirk

This comment has been minimized.

Contributor

hasnainvirk commented Aug 1, 2018

@SeppoTakalo Can you please review this ?

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 1, 2018

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

@0xc0170 0xc0170 added needs: work and removed ready for merge labels Aug 1, 2018

Reporting scheduling failures
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 hasnainvirk:scheduling_failure_report branch from 874f257 to b07c3e7 Aug 1, 2018

@hasnainvirk

This comment has been minimized.

Contributor

hasnainvirk commented Aug 1, 2018

@0xc0170 Rebase done.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 1, 2018

/morph build

@mbed-ci

This comment has been minimized.

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

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added ready for merge and removed needs: work labels Aug 2, 2018

@cmonr cmonr merged commit 952930c into ARMmbed:master Aug 2, 2018

14 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/astyle Passed, 793 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 9129 cycles (-431 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 9960B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@0xc0170 0xc0170 removed the ready for merge label Aug 2, 2018

pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018

Merge pull request ARMmbed#7495 from hasnainvirk/scheduling_failure_r…
…eport

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