Skip to content

Cellular: Remove sim interface #8891

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

Conversation

jarvte
Copy link
Contributor

@jarvte jarvte commented Nov 28, 2018

Removed CellularSIM interface. Moved methods to classes CellularDevice and CellularInformation.
SIM interface was removed to simplify cellular usage and methods better suite new classes.
Fixed bug in CellularStateMachine that state machine did not stop to register state if that was a target where to stop, this is in first commit. Was found while updating greentea tests for CellularDevice.

@AriParkkila please review

Pull request type

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

@jarvte jarvte force-pushed the remove_sim_interface branch from 68c9fb7 to f15dc0c Compare November 28, 2018 12:07
@@ -61,6 +66,8 @@ class CellularInformation {
* @param buf revision identification as zero terminated string
* @param buf_size max length of revision identification is 2048 characters
* @return NSAPI_ERROR_OK on success
* NSAPI_ERROR_PARAMETER if buf is null
* NSAPI_ERROR_PARAMETER if buf is null

Choose a reason for hiding this comment

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

Duplicate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, will fix

tr_debug("check_is_target_reached(): target state %s, _state: %s, _cb_data.error: %d, _event_id: %d,_is_retry: %d", get_state_string(_target_state), get_state_string(_state), _cb_data.error, _event_id, _is_retry);

if ((_target_state == _state && _cb_data.error == NSAPI_ERROR_OK && !_is_retry) || _event_id == STM_STOPPED) {
tr_debug("Target state reached: %s, _cb_data.error: %d, _event_id: %d", get_state_string(_target_state), _cb_data.error, _event_id);

Choose a reason for hiding this comment

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

This is almost same as above trace. And should this be tr_info rather than tr_debug?

Copy link
Contributor Author

@jarvte jarvte Nov 29, 2018

Choose a reason for hiding this comment

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

I'll remove the later but I'll leave it as debug or it will pollute log.

Copy link

@AnttiKauppila AnttiKauppila left a comment

Choose a reason for hiding this comment

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

Remove the duplicate doxygen and this is good.

@jarvte jarvte force-pushed the remove_sim_interface branch from f15dc0c to 3e6cd2c Compare November 29, 2018 07:31
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 29, 2018

Migration path - any ? Does a user need to do anything?

@0xc0170 0xc0170 requested a review from a team November 29, 2018 09:00
@jarvte
Copy link
Contributor Author

jarvte commented Nov 29, 2018

Migration path - any ? Does a user need to do anything?

This is going to 5.12, I created a jira ticket about updating the documentation. There is some other changes coming to 5.12 so we can better support Long time support. We will update documentation after other changes are also done.
If user have used CellularContext and CellularDevice interfaces (preferred way) then no actions needed. If user have used CellularSIM interface in application then user have to use interface CellularDevice/CellularInformation depending what method was used.

@jarvte jarvte changed the base branch from master to feature-cellular-refactor November 30, 2018 12:50
@jarvte jarvte closed this Dec 3, 2018
@jarvte jarvte deleted the remove_sim_interface branch December 3, 2018 07:00
@jarvte jarvte restored the remove_sim_interface branch December 3, 2018 07:08
@jarvte jarvte reopened this Dec 3, 2018
@jarvte
Copy link
Contributor Author

jarvte commented Dec 3, 2018

Failure not related to this pr

@cmonr
Copy link
Contributor

cmonr commented Dec 3, 2018

That's unfortunate. The base branch will need a rebase due to #8944 fixing a new Travis CI issue.

@jarvte
Copy link
Contributor Author

jarvte commented Dec 4, 2018

That's unfortunate. The base branch will need a rebase due to #8944 fixing a new Travis CI issue.

Yes, very unfortunate. Also unfortunate is that I don't have rights to do rebase for a base branch. Maybe someone with access rights could do it?

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 4, 2018

feature-cellular-refactor rebased

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 4, 2018

I restarted travis, however it might need a new commit (can you rebase your branch quickly?)

@jarvte jarvte force-pushed the remove_sim_interface branch from 3e6cd2c to 761838f Compare December 4, 2018 09:01
@jarvte
Copy link
Contributor Author

jarvte commented Dec 4, 2018

I restarted travis, however it might need a new commit (can you rebase your branch quickly?)

done.

@cmonr
Copy link
Contributor

cmonr commented Dec 4, 2018

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 5, 2018

Test run: SUCCESS

Summary: 4 of 4 test jobs passed
Build number : 1
Build artifacts
Build logs

@jarvte
Copy link
Contributor Author

jarvte commented Dec 5, 2018

Finally found the failed case. It was HAL test: qspi frequency setting test
Nothing to do with this PR.

After re-run greentea passed

@0xc0170 0xc0170 changed the title Cellular: Removed sim interface Cellular: Remove sim interface Dec 5, 2018
Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

761838fdf969c465ac6663a730dbd021defb40dc The commit message should be fixed - considering this is breaking change, lot of files changed. One liner as it is now is not sufficient.

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.
@jarvte jarvte force-pushed the remove_sim_interface branch from 761838f to 176067b Compare December 5, 2018 11:01
@jarvte
Copy link
Contributor Author

jarvte commented Dec 5, 2018

@0xc0170 updated commit message

@cmonr
Copy link
Contributor

cmonr commented Dec 5, 2018

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 5, 2018

Test run: SUCCESS

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

@cmonr cmonr merged commit f52c9e3 into ARMmbed:feature-cellular-refactor Dec 5, 2018
@cmonr cmonr removed the needs: CI label Dec 5, 2018
@jarvte jarvte deleted the remove_sim_interface branch December 10, 2018 06:18
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.

7 participants