Elektrine lite

← Feed

@osterwood@chaos.social

Post #1219793

2025-12-12 03:31 UTC

@chrysn where would the MCU/server host name be? In the URI-host option field? Or embedded in the message payload itself? (Sorry for the naive questions, I’m new to CoAP)

Replies (1)

  • @chrysn@chaos.social 2025-12-12 03:42

    @osterwood It'd be in an option before the payload -- so the server can, in minimal cases, ingest the request sequentially into a state machine, and can then produce its response. A message might be (sans SLIP escapes): 40 (version 1, confirmable with zero-length token) 01 (GET) 12 34 (message ID), followed by options 31 (1-byte host name) 61 ("a") 84 (4-byte path) 74656d70 ("temp"). So it's GET coap://a/temp. This request has no payload; a POST might, that comes after the headers.

    Open ##1219794