Exception for open an UDP socket

Is the address you are supplying the device (local) address or the remote?

It’s a local adress.

From here: Network samples? - #8 by Bauland, you may need to put a sleep

I have a method Waitforbutton() so I do my-self the delay.They are a feedback of the connection in the console with this:

wifi.IndicationReceived += (s, e) => Debug.WriteLine($"WIND: {WindToName(e.Indication)} {e.Message}");
wifi.ErrorReceived += (s, e) => Debug.WriteLine($"ERROR: {e.Error} {e.Message}");