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

nanocoap_sock: clean up state management #18047

Merged
merged 1 commit into from
May 18, 2022

Conversation

benpicco
Copy link
Contributor

@benpicco benpicco commented May 3, 2022

Contribution description

This gets rid of the implicit additional state added by the retry_rxvariable and makes it an explicit state.
Functionality should stay the same.

Testing procedure

Issues/PRs references

@benpicco benpicco added the Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation label May 3, 2022
@github-actions github-actions bot added Area: CoAP Area: Constrained Application Protocol implementations Area: network Area: Networking Area: sys Area: System labels May 3, 2022
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label May 3, 2022
@fjmolinas
Copy link
Contributor

Could you provide some test output? Would be nice to see a suit test for example.

@benpicco benpicco force-pushed the nanocoap-state_cleanup branch from 632da5e to 7c75852 Compare May 18, 2022 09:42
@benpicco
Copy link
Contributor Author

benpicco commented May 18, 2022

Yup, still works

gnrc_uhcpc: Using 4 as border interface and 0 as wireless interface.
gnrc_uhcpc: only one interface found, skipping setup.
main(): This is RIOT! (Version: 2022.07-devel-467-g7c758-nanocoap-state_cleanup)
RIOT SUIT update example application
Running from slot 0
Image magic_number: 0x544f4952
Image Version: 0x6284de57
Image start address: 0x00004400
Header chksum: 0x8667227e

suit_coap: started.
Starting the shell

> suit: received URL: "coap://[2001:db8::1]/fw/suit_update/same54-xpro/riot.suit.latest.bin"
suit_coap: trigger received
suit_coap: downloading "coap://[2001:db8::1]/fw/suit_update/same54-xpro/riot.suit.latest.bin"
suit_coap: got manifest with size 485
suit: verifying manifest signature
suit: validated manifest version
)Manifest seq_no: 1652874915, highest available: 1652874839
suit: validated sequence number
)Formatted component name: 
Comparing manifest offset 4000 with other slot offset
Comparing manifest offset 82000 with other slot offset
validating vendor ID
Comparing 547d0d74-6d3a-5a92-9662-4881afd9407b to 547d0d74-6d3a-5a92-9662-4881afd9407b from manifest
validating vendor ID: OK
validating class id
Comparing 50244518-6a7c-5ce7-932b-88b318336c82 to 50244518-6a7c-5ce7-932b-88b318336c82 from manifest
validating class id: OK
Comparing manifest offset 4000 with other slot offset
Comparing manifest offset 82000 with other slot offset
SUIT policy check OK.
Formatted component name: 
riotboot_flashwrite: initializing update to target slot 1
Fetching firmware |█████████████████████████| 100%
Finalizing payload store
Verifying image digest
Starting digest verification against image
Install correct payload
Verified installed payload
Verifying image digest
Starting digest verification against image
Verified installed payload
Image magic_number: 0x544f4952
Image Version: 0x6284dea3
Image start address: 0x00082400
Header chksum: 0x479f02d2

suit_coap: rebooting...
----> ethos: hello received
Failed to send flush request: Operation not permitted
gnrc_uhcpc: Using 4 as border interface and 0 as wireless interface.
gnrc_uhcpc: only one interface found, skipping setup.
main(): This is RIOT! (Version: 2022.07-devel-467-g7c758-nanocoap-state_cleanup)
RIOT SUIT update example application
Running from slot 1
Image magic_number: 0x544f4952
Image Version: 0x6284dea3
Image start address: 0x00082400
Header chksum: 0x479f02d2

suit_coap: started.
Starting the shell

Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

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

ACK

@benpicco benpicco merged commit e676893 into RIOT-OS:master May 18, 2022
@benpicco benpicco deleted the nanocoap-state_cleanup branch May 18, 2022 15:24
@chrysn chrysn added this to the Release 2022.07 milestone Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CoAP Area: Constrained Application Protocol implementations Area: network Area: Networking Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants