Skip to content

Cell refactor power api #8901

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

AriParkkila
Copy link

Description

Moved AT functionality from cellular power class to CellularNetwork and CellularDevice:

  • Move eDRX setting from power to network
  • Move PSM setting from power to device
  • Move device_ready from power to device
  • AT remove_urc_handler changed to set_urc_handler(prefix, 0)
  • Move ready_cb from power to device
  • Unify set_at_mode and init_module into init()
  • Removed set_power_level()
  • Moved reset from power to device
  • Added shutdown()

The reason is that cellular power functionality, such as modem reset can't be different from CellularDevice due to that must inform any cellular user applications to reinitialize cellular network context and sockets.

To be merged in Mbed OS 5.12 (also documentation updated then).

Pull request type

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

@AriParkkila
Copy link
Author

@jarvte @mirelachirica please review

Copy link
Contributor

@jarvte jarvte left a comment

Choose a reason for hiding this comment

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

Shouldn't we remove the whole CellularPower api?

@AriParkkila
Copy link
Author

@jarvte amended the changes to top commit. I will make another PR for non-AT related functionality to remove power class completely.

@AriParkkila AriParkkila changed the base branch from master to feature-cellular-refactor November 30, 2018 12:52
@cmonr
Copy link
Contributor

cmonr commented Dec 4, 2018

Hmm, Travis CI didn't update with the change from master to the feature branch.

Trying a thing.

@cmonr cmonr closed this Dec 4, 2018
@cmonr cmonr reopened this Dec 4, 2018
@cmonr
Copy link
Contributor

cmonr commented Dec 4, 2018

Neat! Travis CI took the change.

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 5, 2018

Let's finalize the reviews !

@cmonr
Copy link
Contributor

cmonr commented Dec 5, 2018

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 5, 2018

Test run: FAILED

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

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-IAR

@cmonr
Copy link
Contributor

cmonr commented Dec 5, 2018

Will restart CI when able. There appears to be a parse error with the CI scripts.

@alekla01
Copy link
Contributor

alekla01 commented Dec 5, 2018

CI restarted

@cmonr
Copy link
Contributor

cmonr commented Dec 5, 2018

Looks like this'll need a rebase.

@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

@AriParkkila AriParkkila force-pushed the cell-refactor-power-api branch from 6321a88 to 3a2491a Compare December 10, 2018 10:35
@AriParkkila
Copy link
Author

@cmonr just rebased

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 10, 2018

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 10, 2018

Test run: FAILED

Summary: 3 of 7 test jobs failed
Build number : 3
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-IAR

@cmonr
Copy link
Contributor

cmonr commented Dec 10, 2018

@ARMmbed/mbed-os-wan Please take a look at the last job's artifacts.

Specifically, it looks like the WIO_BG96 target is having trouble linking a couple of network tests across compilers.

Log for IAR:

  * WIO_BG96::IAR::TESTS-NETSOCKET-DNS
        Building project dns (WIO_BG96, IAR)
        Scan: IAR
        Scan: dns
        Compile [  6.7%]: asynchronous_dns.cpp
        Compile [ 13.3%]: asynchronous_dns_cache.cpp
        Compile [ 20.0%]: asynchronous_dns_cancel.cpp
        Compile [ 26.7%]: asynchronous_dns_external_event_queue.cpp
        Compile [ 33.3%]: asynchronous_dns_invalid_host.cpp
        Compile [ 40.0%]: asynchronous_dns_non_async_and_async.cpp
        Compile [ 46.7%]: asynchronous_dns_simultaneous.cpp
        Compile [ 53.3%]: asynchronous_dns_simultaneous_cache.cpp
        Compile [ 60.0%]: asynchronous_dns_simultaneous_repeat.cpp
        Compile [ 66.7%]: asynchronous_dns_timeouts.cpp
        Compile [ 73.3%]: main.cpp
        Compile [ 80.0%]: synchronous_dns.cpp
        Compile [ 86.7%]: synchronous_dns_cache.cpp
        Compile [ 93.3%]: synchronous_dns_invalid.cpp
        Compile [100.0%]: synchronous_dns_multiple.cpp
        Link: dns
        Error[Li005]: no definition for
                  "mbed::QUECTEL_BG96::set_ready_cb(mbed::Callback<void ()>)"
                  [referenced from /builds/ws/mbed-os-ci_build-IAR/WIO_BG96_IAR_889/mbe
                  d-os/./BUILD/tests/WIO_BG96/IAR/features/cellular/framework/device/Ce
                  llularStateMachine.o]
        
  * WIO_BG96::IAR::TESTS-NETWORK-INTERFACE
        Building project interface (WIO_BG96, IAR)
        Scan: IAR
        Scan: interface
        Compile [ 33.3%]: main.cpp
        Compile [ 66.7%]: networkinterface_conn_disc_repeat.cpp
        Compile [100.0%]: networkinterface_status.cpp
        [Warning] networkinterface_status.cpp@140,0: [Pe177]: variable "status" was declared but never referenced
        Link: interface
        Error[Li005]: no definition for
                  "mbed::QUECTEL_BG96::set_ready_cb(mbed::Callback<void ()>)"
                  [referenced from /builds/ws/mbed-os-ci_build-IAR/WIO_BG96_IAR_889/mbe
                  d-os/./BUILD/tests/WIO_BG96/IAR/features/cellular/framework/device/Ce
                  llularStateMachine.o]
        
  * WIO_BG96::IAR::TEST_APPS-DEVICE-SOCKET_APP
        Building project socket_app (WIO_BG96, IAR)
        Scan: IAR
        Scan: socket_app
        Compile [ 25.0%]: cmd_ifconfig.cpp
        Compile [ 50.0%]: cmd_socket.cpp
        Compile [ 75.0%]: main.cpp
        Compile [100.0%]: strconv.c
        Link: socket_app
        Error[Li005]: no definition for
                  "mbed::QUECTEL_BG96::set_ready_cb(mbed::Callback<void ()>)"
                  [referenced from /builds/ws/mbed-os-ci_build-IAR/WIO_BG96_IAR_889/mbe
                  d-os/./BUILD/tests/WIO_BG96/IAR/features/cellular/framework/device/Ce
                  llularStateMachine.o]

@AriParkkila AriParkkila force-pushed the cell-refactor-power-api branch from 3a2491a to d09ee0d Compare December 11, 2018 07:02
@AriParkkila
Copy link
Author

@cmonr thanks I fixed rebase conflict, please restart CI.

@cmonr
Copy link
Contributor

cmonr commented Dec 11, 2018

Will restart CI once RC3 PRs are done being prioritized.

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 12, 2018

CI restarted

@mbed-ci
Copy link

mbed-ci commented Dec 12, 2018

Test run: SUCCESS

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

@cmonr cmonr merged commit a57bacf into ARMmbed:feature-cellular-refactor Dec 12, 2018
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