Skip to content

Merge feature cellular refactor #9568

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 44 commits into from
Feb 7, 2019
Merged

Conversation

AriParkkila
Copy link

@AriParkkila AriParkkila commented Jan 31, 2019

Description

Merge the feature-cellular-refactor branch to mbed-os/master.

This is a breaking change and needed due to without this cellular stack cannot for example support upcoming multihoming requirement, see a comment below.

Pull request type

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

Reviewers

Release Notes

This PR has impact on cellular application development and porting of new cellular devices.

Application developers need to select the suitable NetworkInterface type. When using NetworkInterface NSAPI configuration defines are applied by default, see NSAPI configuration options for cellular in more details. CellularBase users have a new function set_default_parameters to apply NSAPI configuration options. CellularContext is to be used instead of CellularBase for new extended cellular functionality, such as NonIP sockets and EPS CP optimization...

Migration guidelines for application developers:

  • Change CELLULAR_DEVICE macro to get_default_instance
  • Change OnboardCellularInterface or EasyCellularConnection to CellularContext
  • Call CellularDevice::set_data_carrier_detect to set HUP signal detection

Cellular API changes need to be taken into account when porting new cellular devices. This PR already contains the changes needed for the existing cellular drivers and the onboard modems. Arm has an internal ticket to update the cellular porting documentation for Mbed OS 5.12.

Migration guidelines for porting developers:

  • Follow GENERIC_AT3GPP implementation when porting new AT based cellular devices
  • Change power_on/off to onboard_modem_api with soft_power_on/off and hard_power_on/off
  • Move implementation from CellularSIM and CellularPower to CellularInformation and CellularDevice
  • Implement CellularDevice::init and CellularDevice::shutdown
  • Use CellularNetwork::get_signal_quality instead of CellularNetwork::get_extended_signal_quality

Teppo Järvelin and others added 30 commits January 22, 2019 02:23
Moved methods to classes CellularDevice and CellularInformation.
SIM interface was removed to simplify cellular usage and
methods better suite new classes.
Updated greentea and unit tests.
-added an API for checking network eps ciot optimization support
-renamed the API for getting the UE parameters
-the API for setting the UE parameters includes now a callback, which
will be called once network support for eps ciot optimization is known
After this change we were able to change methods
ATHandler::set_urc_handler and CellularDevice::set_ready_cb to void
and simplify error handling.
This change enables removing function has_registration from
class AT_CellularNetwork and all targets inheriting
AT_CellularNetwork.
After AT_CellularNetwork::has_registration was replaced with
CellularProperties and better
AT_CellularNetwork::set_access_technology_impl default
implementation we can delete most of the target specific classes
that inherit AT_CellularNetwork.
Change usage of AT_CellularContext::stack_type_supported to
AT_CellularBase::get_property. This way we can rid of
targets overriding stack_type_supported and delete
unnecessary classes and simplify new targets.
Generic cellular module (GENERIC_AT3GPP) can by used as a default
module when porting new cellular module. It's a good starting point
and eases porting of new modules. GENERIC_AT3GPP uses only standard
3GPP AT commands when communicating with the modem.
_sim_pin was changed to pointer from array and length was checked with
strlen. If _sim_pin was null it caused crash. Fix by checking _sim_pin against NULL.
Power class could have been called without checking if power is NULL. Fix by checking
that power class is not null.
Fix state machine to return correct states when queried.
@AnttiKauppila
Copy link

Hi @bulislaw, This is mandatory change needed for cellular stack, without this we cannot for example support upcoming multihoming requirement. This change has been widely discussed internally including Product management, PE team and Cellular team and we have created a list of changes we are about to do. @AriParkkila please make sure that all stakeholders will get the list of changes!
What I agree though is that the description of the PR is almost non-existent and causes this kind of uncertainty amongst people not aware of the background of this change.

@cmonr
Copy link
Contributor

cmonr commented Feb 2, 2019

CI started.
Testing since CI load during weekend should be low, and I'd like to see what else might technically be needed for the PR

@cmonr
Copy link
Contributor

cmonr commented Feb 2, 2019

@ARMmbed/mbed-os-maintainers another breaking change here without explanation

PR opened on 5:30am Jan 31st,
lack of a breaking change statement found Feb 1st ~6am. (#9568 (review))

@bulislaw Would you be interested in being a maintainer, or was the rapid response just a coincidense? 😄

@mbed-ci
Copy link

mbed-ci commented Feb 2, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 1
Build artifacts

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 4, 2019

@AriParkkila Please can you write release notes section following this ARMmbed/mbed-os-5-docs#933 (will be integrated soon) - edit the first comment (introduction of PR, adding new release notes section) and let us know once updated

@AriParkkila
Copy link
Author

@0xc0170 please see Release Notes

@jarvte
Copy link
Contributor

jarvte commented Feb 5, 2019

@cmonr @0xc0170 @bulislaw can we proceed with this one? We need this to 5.12 and we need to still fix/add features and have time to test before 5.12.

@bulislaw
Copy link
Member

bulislaw commented Feb 5, 2019

We need approval from @AnttiKauppila

@AriParkkila
Copy link
Author

@bulislaw do you think we can continue with merging this PR now?

@NirSonnenschein
Copy link
Contributor

starting CI

@theotherjimmy
Copy link
Contributor

Why was mbed-os-tools tagged for review? There are no tools changes to speak of.

@mbed-ci
Copy link

mbed-ci commented Feb 6, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 2
Build artifacts

@jarvte
Copy link
Contributor

jarvte commented Feb 7, 2019

Merge?

@0xc0170 0xc0170 removed the request for review from a team February 7, 2019 12:13
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.