Node-Red Version
3.0.2
Node Version
V18.16.1 (MACOS)
Electron Version
No response
Platform
MACOS12.1
Architecture
x64
My PC has multiple IP addresses, 192.168.8.47 and 192.168.0.17.
I want to use UDP with IP 192.168.0.17 to communicate with 192.168.0.7,I set IP priority,but it doesn't work.
And I set UDP out msg.ip msg.port and other attributes,but it doesn't work.
And I search form and no answers.
So,dear friends,How could I use 192.168.0.17 to do UDP work?
[{"id":"3d6c506f0fde9b2d","type":"udp in","z":"1ff159cb2e02fd26","name":"","iface":"192.168.0.17","port":"48899","ipv":"udp4","multicast":"true","group":"255.255.255.255","datatype":"utf8","x":180,"y":2980,"wires":[["58afb0fd8c39eb0f"]]},{"id":"19b9842366545bec","type":"function","z":"1ff159cb2e02fd26","name":"发送","func":"msg.payload='www.usr.cn'\n// msg.fromip = '255.255.255.255:48899'\n// msg.host = '255.255.255.255'\n// msg.ip = '192.168.0.7'\n// msg.port='48899'\n// msg.des='diy'\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":290,"y":2920,"wires":[["25a4b14ff2fc0433"]]},{"id":"7e62fce750e989dc","type":"inject","z":"1ff159cb2e02fd26","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":2920,"wires":[["19b9842366545bec"]]},{"id":"9727acd08e975d94","type":"debug","z":"1ff159cb2e02fd26","name":"debug 4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":540,"y":2980,"wires":[]},{"id":"58afb0fd8c39eb0f","type":"function","z":"1ff159cb2e02fd26","name":"接收","func":"msg.payload=msg.payload.toString()\nnode.warn(\"@@@串口参数 msg:\" + JSON.stringify(msg, null, 6))\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":390,"y":2980,"wires":[["9727acd08e975d94"]]},{"id":"25a4b14ff2fc0433","type":"udp out","z":"1ff159cb2e02fd26","name":"","addr":"255.255.255.255","iface":"192.168.0.17","port":"48899","ipv":"udp4","outport":"6666","base64":false,"multicast":"multi","x":540,"y":2920,"wires":[]},{"id":"5ccb81f2d6d6901d","type":"comment","z":"1ff159cb2e02fd26","name":"This machine has multiple IP addresses, 192.168.8.47 and 192.168.0.17.","info":"","x":320,"y":3060,"wires":[]},{"id":"3b750831059fdcf7","type":"comment","z":"1ff159cb2e02fd26","name":"I want to use UDP with IP 192.168.0.17 to communite with 192.168.0.7,I set IP priority,but it doesn't work","info":"","x":420,"y":3100,"wires":[]},{"id":"f654dda228bd8507","type":"comment","z":"1ff159cb2e02fd26","name":"How could I use 192.168.0.17 to do UDP work?","info":"","x":240,"y":3140,"wires":[]}]