I have my Netduino Plus 2 go out to a web service to look up some values that I would like it to use in my project. One of the values that I have the Netduino check is its IP address. There may be a reason for me to change an IP address of a Netduino that is in the field so I have a method in my project that I would like to change the static IP address when it is called. The method takes a string.
I am getting a SocketException with a code of 10022 for invalid argument. This happens when I call this.Socket.Bind. My class has a property called Socket to hold the Socket value. Is it because my socket already has an endpoint ? I adding this.Socket = null and then this.Socket = new (....... thinking we need a new socket to work with.
Please advise how I can change my IP address from one static IP address to another.