Skip to content

Cellular: fix connect-disconnect sequence called many times #9898

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 2 commits into from
Mar 1, 2019

Conversation

jarvte
Copy link
Contributor

@jarvte jarvte commented Mar 1, 2019

Description

Fix connect-disconnect sequence called many times

  • Fixes Cellular connection fails on sequential connect #9760
  • Fix syncing back to at mode after ppp disconnect.
  • Fix AT_CellularContext flags and states to allow new connect after disconnect.
  • Fix that state machine is not reseted in disconnect is it's running (might be
    running because of another context or new connect already started).
  • Removed API get_connection_status() from CellularNetwork. This was left accidentally
    after refactoring. It wasn't giving correct states after refactoring.

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[X] Breaking change

Reviewers

@mirelachirica @AriParkkila

Release Notes

Removed API get_connection_status() from CellularNetwork. This was left accidentally
after refactoring. It wasn't giving correct states after refactoring. Application should use CellularContext::get_connection_status instead.

@ciarmcom
Copy link
Member

ciarmcom commented Mar 1, 2019

@jarvte, thank you for your changes.
@mirelachirica @AriParkkila @ARMmbed/mbed-os-wan @ARMmbed/mbed-os-maintainers please review.

@jarvte
Copy link
Contributor Author

jarvte commented Mar 1, 2019

What is this failing test: **travis-ci/psa-autogen ** — Local psa-autogen testing has failed
It does not seem to be related to this pr.

@mikisch81
Copy link
Contributor

#9899 will fix the Travis issue

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 1, 2019

Travis fixed

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 1, 2019

Removed API get_connection_status() from CellularNetwork. This was left accidentally
after refactoring. It wasn't giving correct states after refactoring.

I assume this is targeting 5.12.0 ?

Also a question - fix involves 12 files change and has multiple fixes in (squashed?), why did you squash them?

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 1, 2019

From the Release notes section comments, this does not answer how to migrate if its breaking change? By removing, what is the impact, how to migrate?

@jarvte
Copy link
Contributor Author

jarvte commented Mar 1, 2019

Removed API get_connection_status() from CellularNetwork. This was left accidentally
after refactoring. It wasn't giving correct states after refactoring.

I assume this is targeting 5.12.0 ?

Also a question - fix involves 12 files change and has multiple fixes in (squashed?), why did you squash them?

Yes, 5.12 if that possible as this is the release where we can break cellular API's.
Every fix other than removing the API were related to fixing the connect-disconnect sequence.
One amend was because I forgot to fix unit tests after API removal. Should I separate removing the API to separate commit/PR?

@jarvte
Copy link
Contributor Author

jarvte commented Mar 1, 2019

From the Release notes section comments, this does not answer how to migrate if its breaking change? By removing, what is the impact, how to migrate?

Updated notes.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 1, 2019

One amend was because I forgot to fix unit tests after API removal. Should I separate removing the API to separate commit/PR?

That should help readability, shouldn't it ? please do then. I'll run CI right after

Teppo Järvelin added 2 commits March 1, 2019 14:47
Fix syncing back to at mode after ppp disconnect.
Fix AT_CellularContext flags and states to allow new connect after disconnect.
Fix that state machine is not reseted in disconnect is it's running (might be
running because of another context or new connect already started).
This was left accidentally after refactoring.
It wasn't giving correct states after refactoring.
CellularContext::get_connection_status should be used instead.
@jarvte jarvte force-pushed the connect_disconnect_fix branch from a15329f to 0905f01 Compare March 1, 2019 12:52
@jarvte
Copy link
Contributor Author

jarvte commented Mar 1, 2019

One amend was because I forgot to fix unit tests after API removal. Should I separate removing the API to separate commit/PR?

That should help readability, shouldn't it ? please do then. I'll run CI right after

Yes for sure. I always tend to forget to divide into proper commits. I'll try to improve. Now it's done for this pr.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 1, 2019

CI started

@0xc0170 0xc0170 requested a review from bulislaw March 1, 2019 13:06
@mbed-ci
Copy link

mbed-ci commented Mar 1, 2019

Test run: FAILED

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

Failed test jobs:

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

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 1, 2019

@ARMmbed/mbed-os-test ^^ this needs fixing please

Copy link
Member

@bulislaw bulislaw left a comment

Choose a reason for hiding this comment

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

Why does this PR introduces multiple unrelated changes, while one of them is breaking? One PR should be fixing the connect-disconnect issue and second, separate, one should be addressing the cleanup (and be labeled as breaking).
It's very late before the code freeze so we will take it as it is, but in the future please remember to have one PR for each logical change. It's especially important for breaking changes as they are considered on case to case basis.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 1, 2019

The failure above was unrelated, CI config , fixed now.

@0xc0170 0xc0170 merged commit 10f2c05 into ARMmbed:master Mar 1, 2019
@jarvte jarvte deleted the connect_disconnect_fix branch March 5, 2019 10:27
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.

9 participants