Skip to content
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

Update OTA Requestor Server cluster attributes #13484

Merged
merged 2 commits into from
Jan 13, 2022

Conversation

carol-apple
Copy link
Contributor

Problem

Currently, the OTA Requestor Server cluster attributes for UpdateState and UpdateStateProgress are not updated to reflect the current state of the OTA Requestor.

Fixes: #13169

Change overview

  • Set the UpdateState and UpdateStateProgress attributes as the OTA Requestor progresses through an OTA download/apply
  • On boot, the UpdateState should be set to idle (default value is unknown). The idle value should be set in OTA Requestor ctor. However, since OTA Requestor core is a global object in all applications and is likely created before the data model is initialized, use an explicit Init() to be called after the object is created to set the attribute
    -- This affects all applications that initialize an OTARequestor instance
  • Add OnUpdateProgressChanged to OTARequestor class to be called by BDXDownloader each time a block of data has been processed to ensure that UpdateStateProgress attribute is updated

Testing

Manual testing using Linux requestor/provider

@carol-apple carol-apple force-pushed the ota_requestor_attributes branch from d3b4b7c to daa911e Compare January 12, 2022 05:35
@github-actions
Copy link

github-actions bot commented Jan 12, 2022

PR #13484: Size comparison from 96c6645 to daa911e

Increases (1 build for k32w)
platform target config section 96c6645 daa911e change % change
k32w light k32w061+release (read/write) 656644 657188 544 0.1
.bss 76824 76832 8 0.0
.text 572168 572704 536 0.1
Full report (21 builds for efr32, esp32, k32w, linux, mbed, p6, qpg, telink)
platform target config section 96c6645 daa911e change % change
efr32 lighting-app BRD4161A (read only) 830532 830532 0 0.0
(read/write) 127300 127300 0 0.0
.bss 125420 125420 0 0.0
.data 1880 1880 0 0.0
.text 830524 830524 0 0.0
BRD4161A+rpc (read only) 817936 817936 0 0.0
(read/write) 143964 143964 0 0.0
.bss 141980 141980 0 0.0
.data 1980 1980 0 0.0
.text 817928 817928 0 0.0
window-app BRD4161A (read only) 804476 804476 0 0.0
(read/write) 126004 126004 0 0.0
.bss 124168 124168 0 0.0
.data 1836 1836 0 0.0
.text 804468 804468 0 0.0
esp32 all-clusters-app c3devkit (read only) 895402 895402 0 0.0
(read/write) 1315570 1315570 0 0.0
.dram0.bss 70160 70160 0 0.0
.dram0.data 14212 14212 0 0.0
.flash.rodata 177704 177704 0 0.0
.flash.text 895402 895402 0 0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 956755 956755 0 0.0
(read/write) 448064 448064 0 0.0
.dram0.bss 74656 74656 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 207216 207216 0 0.0
.flash.text 951371 951371 0 0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 656644 657188 544 0.1
.bss 76824 76832 8 0.0
.data 1852 1852 0 0.0
.text 572168 572704 536 0.1
lock k32w061+release (read/write) 660980 660980 0 0.0
.bss 77120 77120 0 0.0
.data 1872 1872 0 0.0
.text 576188 576188 0 0.0
linux chip-tool-ipv6only arm64 (read only) 7184588 7184588 0 0.0
(read/write) 344625 344625 0 0.0
.bss 54865 54865 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 226744 226744 0 0.0
.dynamic 560 560 0 0.0
.got 58232 58232 0 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 390852 390852 0 0.0
.text 6062564 6062564 0 0.0
thermostat-no-ble arm64 (read only) 2038540 2038540 0 0.0
(read/write) 145505 145505 0 0.0
.bss 64737 64737 0 0.0
.data 880 880 0 0.0
.data.rel.ro 72912 72912 0 0.0
.dynamic 560 560 0 0.0
.got 4040 4040 0 0.0
.init 24 24 0 0.0
.init_array 304 304 0 0.0
.rodata 129628 129628 0 0.0
.text 1694608 1694608 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2345776 2345776 0 0.0
.bss 188868 188868 0 0.0
.data 5320 5320 0 0.0
.text 1308352 1308352 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2330808 2330808 0 0.0
.bss 180416 180416 0 0.0
.data 5552 5552 0 0.0
.text 1293408 1293408 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2304032 2304032 0 0.0
.bss 179456 179456 0 0.0
.data 5544 5544 0 0.0
.text 1266632 1266632 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2054232 2054232 0 0.0
.bss 156876 156876 0 0.0
.data 4864 4864 0 0.0
.text 1016832 1016832 0 0.0
p6 all-clusters-app default (read/write) 2399640 2399640 0 0.0
.bss 117140 117140 0 0.0
.data 2592 2592 0 0.0
.text 1357904 1357904 0 0.0
light-app default (read/write) 2325376 2325376 0 0.0
.bss 105728 105728 0 0.0
.data 2384 2384 0 0.0
.text 1283640 1283640 0 0.0
lock-app default (read/write) 2297600 2297600 0 0.0
.bss 104608 104608 0 0.0
.data 2344 2344 0 0.0
.text 1255864 1255864 0 0.0
qpg lighting-app qpg6105+debug (read only) 534308 534308 0 0.0
(read/write) 146940 146940 0 0.0
.bss 86672 86672 0 0.0
.data 1008 1008 0 0.0
.text 528988 528988 0 0.0
lock-app qpg6105+debug (read only) 506228 506228 0 0.0
(read/write) 146936 146936 0 0.0
.bss 85808 85808 0 0.0
.data 956 956 0 0.0
.text 500908 500908 0 0.0
persistent-storage-app qpg6105+debug (read only) 106448 106448 0 0.0
(read/write) 146938 146938 0 0.0
.bss 36146 36146 0 0.0
.data 288 288 0 0.0
.text 101128 101128 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 836102 836102 0 0.0
bss 86976 86976 0 0.0
noinit 37160 37160 0 0.0
text 583852 583852 0 0.0

- Add missing idle updates
- Fix logic for setting UpdateStateProgress
- Remove OtaRequestorServer class and define the setters as global functions
@carol-apple carol-apple force-pushed the ota_requestor_attributes branch from daa911e to 6d07184 Compare January 13, 2022 04:56
@github-actions
Copy link

github-actions bot commented Jan 13, 2022

PR #13484: Size comparison from 8e43cab to 6d07184

Increases (1 build for k32w)
platform target config section 8e43cab 6d07184 change % change
k32w light k32w061+release (read/write) 657384 657888 504 0.1
.text 572596 573100 504 0.1
Full report (32 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 8e43cab 6d07184 change % change
efr32 lighting-app BRD4161A (read only) 831456 831456 0 0.0
(read/write) 127612 127612 0 0.0
.bss 125732 125732 0 0.0
.data 1880 1880 0 0.0
.text 831448 831448 0 0.0
BRD4161A+rpc (read only) 818852 818852 0 0.0
(read/write) 144272 144272 0 0.0
.bss 142292 142292 0 0.0
.data 1980 1980 0 0.0
.text 818844 818844 0 0.0
window-app BRD4161A (read only) 805336 805336 0 0.0
(read/write) 126320 126320 0 0.0
.bss 124480 124480 0 0.0
.data 1836 1836 0 0.0
.text 805328 805328 0 0.0
esp32 all-clusters-app c3devkit (read only) 908600 908600 0 0.0
(read/write) 1316426 1316426 0 0.0
.dram0.bss 70488 70488 0 0.0
.dram0.data 14284 14284 0 0.0
.flash.rodata 178160 178160 0 0.0
.flash.text 908600 908600 0 0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 957279 957279 0 0.0
(read/write) 448576 448576 0 0.0
.dram0.bss 74952 74952 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 207432 207432 0 0.0
.flash.text 951895 951895 0 0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 657384 657888 504 0.1
.bss 77136 77136 0 0.0
.data 1852 1852 0 0.0
.text 572596 573100 504 0.1
lock k32w061+release (read/write) 661668 661668 0 0.0
.bss 77432 77432 0 0.0
.data 1872 1872 0 0.0
.text 576564 576564 0 0.0
linux chip-tool-ipv6only arm64 (read only) 7216412 7216412 0 0.0
(read/write) 346289 346289 0 0.0
.bss 55217 55217 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 227824 227824 0 0.0
.dynamic 560 560 0 0.0
.got 58448 58448 0 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 392548 392548 0 0.0
.text 6090564 6090564 0 0.0
thermostat-no-ble arm64 (read only) 2040908 2040908 0 0.0
(read/write) 145969 145969 0 0.0
.bss 65089 65089 0 0.0
.data 880 880 0 0.0
.data.rel.ro 73016 73016 0 0.0
.dynamic 560 560 0 0.0
.got 4048 4048 0 0.0
.init 24 24 0 0.0
.init_array 304 304 0 0.0
.rodata 129868 129868 0 0.0
.text 1696448 1696448 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2346360 2346360 0 0.0
.bss 189188 189188 0 0.0
.data 5320 5320 0 0.0
.text 1308936 1308936 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2331392 2331392 0 0.0
.bss 180728 180728 0 0.0
.data 5552 5552 0 0.0
.text 1293992 1293992 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2304552 2304552 0 0.0
.bss 179768 179768 0 0.0
.data 5544 5544 0 0.0
.text 1267152 1267152 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2054392 2054392 0 0.0
.bss 156876 156876 0 0.0
.data 4864 4864 0 0.0
.text 1016992 1016992 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 940411 940411 0 0.0
bss 119596 119596 0 0.0
rodata 108600 108600 0 0.0
text 634632 634632 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 925843 925843 0 0.0
bss 116640 116640 0 0.0
rodata 101048 101048 0 0.0
text 629984 629984 0 0.0
nrf52840dongle_nrf52840 (read/write) 991071 991071 0 0.0
bss 122440 122440 0 0.0
rodata 113352 113352 0 0.0
text 666828 666828 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 850238 850238 0 0.0
bss 116384 116384 0 0.0
rodata 101776 101776 0 0.0
text 551552 551552 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 912651 912651 0 0.0
bss 118784 118784 0 0.0
rodata 103872 103872 0 0.0
text 612624 612624 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 822718 822718 0 0.0
bss 115600 115600 0 0.0
rodata 97096 97096 0 0.0
text 529584 529584 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541835 541835 0 0.0
bss 52588 52588 0 0.0
rodata 50104 50104 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 913963 913963 0 0.0
bss 118544 118544 0 0.0
rodata 104088 104088 0 0.0
text 613884 613884 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 910763 910763 0 0.0
bss 118572 118572 0 0.0
rodata 103344 103344 0 0.0
text 611372 611372 0 0.0
shell nrf52840dk_nrf52840 (read/write) 798627 798627 0 0.0
bss 109776 109776 0 0.0
rodata 78376 78376 0 0.0
text 533968 533968 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 711446 711446 0 0.0
bss 107664 107664 0 0.0
rodata 72680 72680 0 0.0
text 451648 451648 0 0.0
p6 all-clusters-app default (read/write) 2400512 2400512 0 0.0
.bss 117460 117460 0 0.0
.data 2592 2592 0 0.0
.text 1358776 1358776 0 0.0
light-app default (read/write) 2326232 2326232 0 0.0
.bss 106040 106040 0 0.0
.data 2384 2384 0 0.0
.text 1284496 1284496 0 0.0
lock-app default (read/write) 2298464 2298464 0 0.0
.bss 104920 104920 0 0.0
.data 2344 2344 0 0.0
.text 1256728 1256728 0 0.0
qpg lighting-app qpg6105+debug (read only) 535100 535100 0 0.0
(read/write) 146940 146940 0 0.0
.bss 89336 89336 0 0.0
.data 1008 1008 0 0.0
.text 529780 529780 0 0.0
lock-app qpg6105+debug (read only) 507008 507008 0 0.0
(read/write) 146936 146936 0 0.0
.bss 88472 88472 0 0.0
.data 956 956 0 0.0
.text 501688 501688 0 0.0
persistent-storage-app qpg6105+debug (read only) 106848 106848 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38504 38504 0 0.0
.data 288 288 0 0.0
.text 101528 101528 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 837062 837062 0 0.0
bss 87288 87288 0 0.0
noinit 37160 37160 0 0.0
text 584334 584334 0 0.0

@andy31415 andy31415 merged commit be80e7a into project-chip:master Jan 13, 2022
shubhamdp added a commit to shubhamdp/connectedhomeip that referenced this pull request Jan 16, 2022
shubhamdp added a commit to shubhamdp/connectedhomeip that referenced this pull request Jan 16, 2022
shubhamdp added a commit to shubhamdp/connectedhomeip that referenced this pull request Jan 16, 2022
shubhamdp added a commit to shubhamdp/connectedhomeip that referenced this pull request Jan 16, 2022
shubhamdp added a commit to shubhamdp/connectedhomeip that referenced this pull request Jan 17, 2022
shubhamdp added a commit to shubhamdp/connectedhomeip that referenced this pull request Jan 18, 2022
woody-apple pushed a commit to shubhamdp/connectedhomeip that referenced this pull request Jan 18, 2022
woody-apple pushed a commit to shubhamdp/connectedhomeip that referenced this pull request Jan 20, 2022
shubhamdp added a commit to shubhamdp/connectedhomeip that referenced this pull request Jan 20, 2022
carol-apple added a commit that referenced this pull request Jan 21, 2022
… restart OTA Requestor once ApplyUpdate is successful (#13620)

* [ESP32] CLI option to set delayedActionTime in OTA Provider app

Also, modify Linux OTA Provider help for delayedActionTime cli option

* [ESP32] Schedule the restart once OTA image apply is successful

Also, Apply suggestion from #13484 in lighting-app

* Review comments

* Fix a small typo

* Apply suggestions from code review

Co-authored-by: Carol Yang <[email protected]>

Co-authored-by: Carol Yang <[email protected]>
selissia pushed a commit to selissia/connectedhomeip that referenced this pull request Jan 28, 2022
* [OTA] Update OTA Requestor Server cluster attributes

* Address code review comments

- Add missing idle updates
- Fix logic for setting UpdateStateProgress
- Remove OtaRequestorServer class and define the setters as global functions
selissia pushed a commit to selissia/connectedhomeip that referenced this pull request Jan 28, 2022
… restart OTA Requestor once ApplyUpdate is successful (project-chip#13620)

* [ESP32] CLI option to set delayedActionTime in OTA Provider app

Also, modify Linux OTA Provider help for delayedActionTime cli option

* [ESP32] Schedule the restart once OTA image apply is successful

Also, Apply suggestion from project-chip#13484 in lighting-app

* Review comments

* Fix a small typo

* Apply suggestions from code review

Co-authored-by: Carol Yang <[email protected]>

Co-authored-by: Carol Yang <[email protected]>
step0035 pushed a commit to hank820/connectedhomeip that referenced this pull request Feb 8, 2022
* [OTA] Update OTA Requestor Server cluster attributes

* Address code review comments

- Add missing idle updates
- Fix logic for setting UpdateStateProgress
- Remove OtaRequestorServer class and define the setters as global functions
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.

[ota-requestor] Implement OTA Requestor Server cluster attributes
7 participants