It is possible that EMX set the passed static IP by itself according to the gateway in the network, if the ethernet connect to a network
In my project the static IP setting is as follow:
Eth1.Open(); static string myIP = "192.168.178.204"; NetworkInterfaceExtension.AssignNetworkingStackTo(Eth1); Eth1.CableConnectivityChanged += new EthernetBuiltIn.CableConnectivityChangedEventHandler(Eth1_CableConnectivityChanged); Eth1.NetworkAddressChanged += new NetworkInterfaceExtension.NetworkAddressChangedEventHandler(Eth1_NetworkAddressChanged); Eth1.NetworkInterface.EnableStaticIP(myIP, "255.255.255.0", "192.168.178.1");
I like something as follow:
static-iP = static-iP_Function(); subnet-Mask = subnet-mask_Function() gateway = gateway_Function() Eth1.NetworkInterface.EnableStaticIP(static-iP, subnet-Mask, gateway");
I don’t want to set the software fpr IP always manually, if I connect EMX board to a new network. Is it possible?