Skip to content

gcoap: separate response#20696

Open
fabian18 wants to merge 4 commits intoRIOT-OS:masterfrom
fabian18:pr/coap_fixes_and_gcoap_sep_resp
Open

gcoap: separate response#20696
fabian18 wants to merge 4 commits intoRIOT-OS:masterfrom
fabian18:pr/coap_fixes_and_gcoap_sep_resp

Conversation

@fabian18
Copy link
Copy Markdown
Contributor

@fabian18 fabian18 commented May 25, 2024

Contribution description

  • gcoap separate response (even confirmable)

Testing procedure

/separate resource in gcoap example

sudo ./dist/tools/tapsetup/tapsetup

Server and Client

make BOARD=native64 -C examples/networking/coap/gcoap flash term PORT=tap0

Client

coap get coap://[fe80::4d3:11ff:fe35:6a43%7]/separate
2025-05-08 13:53:58,734 # coap get coap://[fe80::4d3:11ff:fe35:6a43%7]/separate
2025-05-08 13:53:58,734 # gcoap_cli: sending msg ID 9794, 15 bytes
> 2025-05-08 13:54:01,735 # gcoap: response Success, code 2.05, 24 bytes
2025-05-08 13:54:01,735 # 00000000  54  68  69  73  20  69  73  20  61  20  64  65  6C  61  79  65
2025-05-08 13:54:01,740 # 00000010  64  20  72  65  73  70  6F  6E
coap get -c coap://[fe80::4d3:11ff:fe35:6a43%7]/separate
2025-05-08 13:54:07,130 # coap get -c coap://[fe80::4d3:11ff:fe35:6a43%7]/separate
2025-05-08 13:54:07,131 # gcoap_cli: sending msg ID 9795, 15 bytes
> 2025-05-08 13:54:10,132 # gcoap: response Success, code 2.05, 24 bytes
2025-05-08 13:54:10,132 # 00000000  54  68  69  73  20  69  73  20  61  20  64  65  6C  61  79  65
2025-05-08 13:54:10,133 # 00000010  64  20  72  65  73  70  6F  6E

coap_sep.pcapng.zip

Issues/PRs references

@github-actions github-actions bot added Area: network Area: Networking Area: CoAP Area: Constrained Application Protocol implementations Area: sys Area: System Area: examples Area: Example Applications labels May 25, 2024
@fabian18 fabian18 force-pushed the pr/coap_fixes_and_gcoap_sep_resp branch 3 times, most recently from c28df13 to d0424ea Compare May 28, 2024 14:27
@fabian18 fabian18 force-pushed the pr/coap_fixes_and_gcoap_sep_resp branch 2 times, most recently from 6be3903 to 74f71e4 Compare June 11, 2024 09:05
@fabian18 fabian18 force-pushed the pr/coap_fixes_and_gcoap_sep_resp branch from 74f71e4 to 3b93554 Compare June 14, 2024 07:21
@fabian18 fabian18 force-pushed the pr/coap_fixes_and_gcoap_sep_resp branch from 3b93554 to 280ee9a Compare August 27, 2024 14:49
@fabian18 fabian18 marked this pull request as ready for review September 17, 2024 18:49
@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 Oct 23, 2024
@benpicco benpicco requested review from chrysn and maribu October 23, 2024 15:51
@riot-ci
Copy link
Copy Markdown

riot-ci commented Oct 23, 2024

Murdock results

✔️ PASSED

a574b7b sys/net/application_layer/nanocoap: use coap_build_separate_reply

Success Failures Total Runtime
10337 0 10337 12m:18s

Artifacts

@benpicco benpicco added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Apr 3, 2025
* @returns -ENOSPC if @p rbuf too small
*/
ssize_t coap_build_separate_reply(coap_pkt_t *pkt, unsigned type, unsigned code,
uint8_t *rbuf, unsigned rlen, unsigned payload_len);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it make sense to use this in nanocoap_server_build_separate()?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think I am going to call coap_build_separate_reply from nanocoap_server_build_separate

@crasbe crasbe added the Type: new feature The issue requests / The PR implemements a new feature for RIOT label May 7, 2025
@crasbe
Copy link
Copy Markdown
Contributor

crasbe commented May 7, 2025

You should probably update the title and the description a bit to reflect the current state of this PR 🤔😅

@fabian18 fabian18 force-pushed the pr/coap_fixes_and_gcoap_sep_resp branch from 280ee9a to a574b7b Compare May 8, 2025 11:49
@fabian18 fabian18 changed the title gcoap: minor fixes and separate response gcoap: separate response May 8, 2025
@miri64
Copy link
Copy Markdown
Member

miri64 commented Jun 24, 2025

@chrysn can you maybe have a look?

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: examples Area: Example Applications 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: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants