Skip to content

CoAP Multicast Group Request Gets No Response

DodaTech Updated 2026-06-26 1 min read

In this tutorial, you'll learn about CoAP Multicast Group Request Gets No Response. We cover key concepts, practical examples, and best practices to help you understand and apply this topic effectively.

The Problem

CoAP multicast request to all-nodes group address receives no responses.

Quick Fix

Wrong

coap.request('coap://[FF02::FD]/temperature');  // No response```

No responses received. Multicast request sent but ignored.


### Right

```cpp
#include <coap.h>

#define MULTICAST_IP "224.0.1.187"
#define MULTICAST_PORT 5683

void multicast_receive_handler(coap_context_t *ctx,
    coap_session_t *session, coap_pdu_t *request,
    coap_binary_t *token, coap_string_t *query,
    coap_pdu_t *response) {

  coap_pdu_set_code(response, COAP_RESPONSE_CODE_CONTENT);
  unsigned char buf[] = "{"device":"sensor-01","temp":25.0}";
  coap_add_data(response, sizeof(buf) - 1, buf);
}

int main() {
  coap_context_t *ctx = coap_new_context(NULL);

  // Join multicast group
  struct coap_address_t addr;
  coap_address_init(&addr);
  coap_set_mcast_addr(&addr, MULTICAST_IP, MULTICAST_PORT);

  coap_join_mcast_group_intf(ctx, MULTICAST_IP, NULL);

  // Register resource handler
  coap_resource_t *res = coap_resource_init(
    (const uint8_t*)"temperature", 11, 0);
  coap_register_handler(res, COAP_REQUEST_GET, multicast_receive_handler);

  coap_start(ctx);
}```

All devices on the multicast group receive the GET. Each responds with its temperature data.


## Prevention

CoAP multicast enables one-to-many communication. IPv4: 224.0.1.187, IPv6: FF02::FD. Port 5683. Clients send requests to the multicast address; multiple servers respond with unicast. Only NON-confirmable messages are allowed for multicast (CON would cause ACK implosion). Responses are sent as unicast to the requester.

DodaTech engineers apply these same patterns across Doda Browser, DodaZIP, and Durga Antivirus Pro for production IoT reliability.

## FAQ

<details style="margin-bottom:12px;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden"><summary style="cursor:pointer;padding:14px 18px;font-weight:600;font-size:1.05rem;background:#f8fafc;border-bottom:1px solid #e2e8f0;color:#1e293b">### Can I use CON for multicast?</summary><div style="padding:14px 18px;color:#475569;line-height:1.7;background:#fff"><p>No. Only NON (non-confirmable) messages are allowed for multicast. CON would cause all receivers to ACK simultaneously (ACK implosion).</p>
<h3 id="what-multicast-addresses">What multicast addresses?</h3><p>IPv4: 224.0.1.187 (All CoAP Nodes). IPv6: FF02::FD (link-local), FF05::FD (site-local). Use scope appropriate for your network.</p>
<h3 id="are-responses-sent-to-multicast">Are responses sent to multicast?</h3><p>No — responses are unicast to the requester. Each server responds individually. The client collects responses as they arrive (with some timeout).</p>
</div></details>

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro