- Netduino Forums
- → andybareweb's Content
andybareweb's Content
There have been 5 items by andybareweb (Search limited from 26-April 23)
#39970 IoT and Netduino+
Posted by andybareweb on 23 November 2012 - 12:09 AM in Netduino Plus 2 (and Netduino Plus 1)
#38182 How to check if ethernet is connected?
Posted by andybareweb on 29 October 2012 - 05:14 PM in Netduino Plus 2 (and Netduino Plus 1)
Hi,
I know that i'm digging an old thread but I have the similar question and I must manually set the IP address (so no DHCP).
Is there any way to do it ?
Thanks.
Cédric
Hi Cédric:
var interfaces = Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces(); foreach (var networkInterface in interfaces) { Debug.Print(networkInterface.IsDhcpEnabled ? "Dhcp Enabled" : "Static Ip"); Debug.Print(networkInterface.IPAddress); if (networkInterface.IsDhcpEnabled) { networkInterface.EnableStaticIP("192.168.0.9", "255.255.255.0", "192.168.0.1"); } }
This prints out whether you're already Dhcp Enabled or Static, and if Dhcp it sets to static.
You'd probably want to be a little cleverer around releasing leases if you want to be friendly to your dhcp server, but otherwise the above works.
Regards
Andy
#37915 Netduino Sam-BA connection not found
Posted by andybareweb on 24 October 2012 - 11:16 AM in Netduino Plus 2 (and Netduino Plus 1)
#37841 Netduino Sam-BA connection not found
Posted by andybareweb on 23 October 2012 - 12:37 PM in Netduino Plus 2 (and Netduino Plus 1)
Hi!
Just a question, how does Windows call it? If it still sees a "Netduino" in the device manager, it's not yet reset.
Ah-hah! It is Netduino, good intuition.
I must have not hit the erase properly (tentative worried fingers...) I'll retry.
Many thanks
Andy
#37836 Netduino Sam-BA connection not found
Posted by andybareweb on 23 October 2012 - 11:21 AM in Netduino Plus 2 (and Netduino Plus 1)
- Netduino Forums
- → andybareweb's Content
- Privacy Policy