mDNS SD on esp8266

Posted on
  • i am trying to receive dns sd broadcast messages on my esp8266 using the following code:

    var wifi = require("Wifi");
    
    wifi.connect("awifi", {password:"apwd"}, function(err){
        console.log(err);
        const dgram = require('dgram');
        const srv = dgram.createSocket('udp4');
        srv.addMembership('224.0.0.251');
        srv.bind(5353, '0.0.0.0', bound => {
            console.log('bound');
            function onDatagram(msg, info) {
                console.log('memory');
            }
    
            bound.on('message', onDatagram);
            bound.on('close', function(err) {
              console.log('s:close', err);
            });
        });
    });
    
    wifi.stopAP();
    

    unfortunately i get only the following warning:

    WARNING: Recv 869 too long (UDP)!

    any ideas how to overcome this? I assume its a problem about max datagram message size?

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

mDNS SD on esp8266

Posted by Avatar for aluedeke @aluedeke

Actions