Skip to content

mDNS queries sent via unicast connection instead of multicast - causes discovery failures for certain devices #144

@tq-kuehnem

Description

@tq-kuehnem

Problem

The sendQuery function (lines 402-420) sends mDNS queries using unicast connections instead of multicast connections.

Impact

Some devices, e.g. the Alfen EV Charger only responds to queries sent via multicast

RFC Compliance

According to RFC 6762 (Multicast DNS), service discovery queries should be sent to the multicast address (224.0.0.251 for IPv4, ff02::fb for IPv6). While the library correctly sends to ipv4Addr (which is the multicast address), it uses a unicast socket to do so, which some devices may filter or ignore.

Question

Should mDNS queries be sent via the multicast connections ipv4MulticastConn/ipv6MulticastConn instead of unicast connections for better compatibility? Or is there a fork that already does this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions