.netmf

How do I change the IP, Subnet Mask, Default Gateway using .netmf?

Your question is missing one or more of these details:[ul]
The name of the product.
The code you’re trying to run.
Details on your setup.[/ul]
(Generated by QuickReply)

The short answer is: it depends on what hardware you’re using.

1 Like

Ha sorry. I have a program that is sending a socket message with strings of what i want to set the IP, gateway, and subnet to. The hardware is the Mountaineer Ethernet Mainboard. The code is C# in the Console Application Micro Framework. I’m just not sure what commands i can/should use after i parse out the strings to set the Mainboard.
Clear as mud? If i forget some info you need let me know

I believe for the Mountaineer board, you want to use MFDeploy to change those parameters. You can also do it in code using the NetworkInterface.EnableStaticIP/EnableDhcp and related methods.

1 Like

What using do i need in order to use NetworkInterface.EnableStaticIP because the compiler doesn’t recognize it as a function. Is MFDeploy part of the Gadgeteer Framework or am i just missing something lol?

MFDeploy is part of NetMF installation

Typical location (this one for 4.2) C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Tools

1 Like

HAHA i just realized that i have used MFDeploy I just forgot that it had that kind of application. Thanks

Now off of that Im going to be sending socket messages from the Mountaineer Mainboard to 2 computers. So i’m going to need to call the IP address that i set with MFDeploy in order to send it in the socket message. would this be a proper way to do that?

string IP = IPAddress.GetDefaultLocalAddress().ToString();

Why would you need to send the IP in the message? The receiving side will know what the source IP is, that’s part of the IP packet already.