Skip to content

Cellular: Add deativation of context associated with profile #12589

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
Apr 9, 2020

Conversation

fahimalavi
Copy link
Contributor

@fahimalavi fahimalavi commented Mar 6, 2020

Summary of changes

Add deactivation of context associated with profile and fixing initialization phase

Impact of changes

Upon disconnect deactivation of context.

Documentation

None


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Test report attached report_C030.zip


Reviewers


@MarceloSalazar

@0xc0170 0xc0170 changed the title Added deativation of context associated with profile Cellular: Add deativation of context associated with profile Mar 6, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 6, 2020

I updated the title (add cellular: to identify the module changed here)

@ciarmcom ciarmcom requested review from MarceloSalazar and a team March 6, 2020 12:00
@ciarmcom
Copy link
Member

ciarmcom commented Mar 6, 2020

@fahim-ublox, thank you for your changes.
@MarceloSalazar @ARMmbed/mbed-os-wan @ARMmbed/mbed-os-maintainers please review.

0xc0170
0xc0170 previously approved these changes Mar 9, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 9, 2020

CI started

@mergify mergify bot added needs: CI and removed needs: review labels Mar 9, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 9, 2020

Looks like unittest failed, CI will report soon the build logs

@mbed-ci
Copy link

mbed-ci commented Mar 9, 2020

Test run: FAILED

Summary: 1 of 4 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 9, 2020

I found this in the logs:

[2020-03-09T08:32:15.341Z] CMakeFiles/features-cellular-framework-AT-at_cellularstack.dir/stubs/AT_CellularContext_stub.cpp.o:(.data.rel.ro._ZTVN4mbed18AT_CellularContextE[_ZTVN4mbed18AT_CellularContextE]+0x198): undefined reference to `mbed::AT_CellularContext::do_disconnect()'

@pilotak
Copy link
Contributor

pilotak commented Mar 9, 2020

@fahim-ublox thanks a lot, i tested it and is up and running in 21 sec

@pilotak
Copy link
Contributor

pilotak commented Mar 9, 2020

@fahim-ublox i just discovered that if i turn off the AT debug "cellular.debug-at": false i can't attach to network or it takes a lot of time due to a SYNC do_connect failed with -3004
without_AT_debug2.txt
without_AT_debug.txt

@fahimalavi
Copy link
Contributor Author

I found this in the logs:

[2020-03-09T08:32:15.341Z] CMakeFiles/features-cellular-framework-AT-at_cellularstack.dir/stubs/AT_CellularContext_stub.cpp.o:(.data.rel.ro._ZTVN4mbed18AT_CellularContextE[_ZTVN4mbed18AT_CellularContextE]+0x198): undefined reference to `mbed::AT_CellularContext::do_disconnect()'

I suppose this failure is target independent. We don't have build system ready to build these target independent tests. The failure in unit test is due to I have made do_disconnect a protected method.

@mudassar-ublox
Copy link
Contributor

mudassar-ublox commented Mar 12, 2020

Tested with UBLOX_C027 target and didn't face network attach failure with "cellular.debug-at": false configuration.
Attaching both mbed-os-example-cellular logs and MBED-OS-TESTS-NETSOCKET-UDP test logs with multiple iterations.

C027_Mbed_Cellular_Example_Logs.txt
C027_UDP_Test_Logs_.txt

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 17, 2020

@ARMmbed/mbed-os-wan Please review ^^

AnttiKauppila
AnttiKauppila previously approved these changes Mar 17, 2020
@AnttiKauppila
Copy link

AnttiKauppila commented Mar 17, 2020

To fix the unittests, you need to add do_disconnect() function body to: https://github.com/ARMmbed/mbed-os/blob/master/UNITTESTS/stubs/AT_CellularContext_stub.cpp
It can be simply left empty as it should not break any test.
You can run this locally by calling 'mbed test --unittest' from mbed Os root folder

@MarceloSalazar
Copy link

@AnttiKauppila this file is maintained by Arm and it's not target dependant.
Can you please take the action to update the file?

@kivaisan
Copy link
Contributor

@AnttiKauppila this file is maintained by Arm and it's not target dependant.
Can you please take the action to update the file?

This PR changes the visibility of the method so UT fix must come with this PR. And like Antti mentioned, just implement an empty function.

@mergify mergify bot dismissed stale reviews from 0xc0170 and AnttiKauppila March 20, 2020 13:08

Pull request has been modified.

@MarceloSalazar
Copy link

@fahim-ublox thanks for the updates

@ARMmbed/mbed-os-maintainers can we re-run tests please?

@fahimalavi
Copy link
Contributor Author

Apologies for delay as WFH. Now AT_CellularContext_stub.cpp has been updated

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 25, 2020

CI restarted

@mbed-ci
Copy link

mbed-ci commented Mar 25, 2020

Test run: FAILED

Summary: 1 of 6 test jobs failed
Build number : 3
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@mergify mergify bot added needs: work and removed needs: CI labels Mar 25, 2020
@adbridge
Copy link
Contributor

Looks like unrelated ci issues, restarting

@mbed-ci
Copy link

mbed-ci commented Mar 27, 2020

Test run: FAILED

Summary: 1 of 6 test jobs failed
Build number : 4
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 30, 2020

test restarted (internal issue should be resolved)

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 31, 2020

CI restarted

@mbed-ci
Copy link

mbed-ci commented Apr 1, 2020

Test run: SUCCESS

Summary: 6 of 6 test jobs passed
Build number : 5
Build artifacts

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 1, 2020

@ARMmbed/mbed-os-wan Please review, ready for merge once approved

@AnttiKauppila
Copy link

@ARMmbed/mbed-os-maintainers Please go ahead and merge

@mergify mergify bot added needs: CI and removed needs: review labels Apr 7, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Apr 8, 2020

CI restarted

@mbed-ci
Copy link

mbed-ci commented Apr 8, 2020

Test run: SUCCESS

Summary: 6 of 6 test jobs passed
Build number : 6
Build artifacts

@0xc0170 0xc0170 merged commit 149235f into ARMmbed:master Apr 9, 2020
@mergify mergify bot removed the ready for merge label Apr 9, 2020
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.

10 participants