-
Cool, I will try .... and I guess also socket.setMulticastInterface() can help.
But currently UDP receiving is ok already. I need a help to make correct UDP sending.Thanks for the link https://nodejs.org/api/dgram.html, if it is fully implemented than by just using socket.send(msg, [offset, length,] port [, address] [, callback]) it should work.
Can you give me in hand in that, PLEASE...?
p.s. I did not go much in C code as I act already on .bin file with JS scripts only.
Txs, Vasily.
-
I give up now at 3AM. Seams that sending UDP package does not work.
I tried all possible ways I can immagine, also intalled SmartSniff to check on PC what are UDP package around. As well did a script that ESP will send simplest UDP package to my PC and not to Alexa. All tries are hopeless, nothing is sent (apparently).I tried to adapt CaptivePortal as it declared to be working. Still no success.
Any help appresciated.
For multicast support you need to use socket.addMembership() method (The dgram module is mostly compatible with node.js' https://nodejs.org/api/dgram.html). There are node.js ssdp implementations available to have a look at.
Here is an Espruino specific example of an mdns (multicast DNS) module I crafted.