예제 #1
0
        private static void SetupNetworking()
        {
            Microsoft.SPOT.Net.NetworkInformation.NetworkInterface NI = Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0];

            NI.EnableStaticIP("192.168.0.50", "255.255.255.0", "192.168.0.198");
            Debug.Print("Got IP: " + NI.IPAddress.ToString());
        }
예제 #2
0
        public StaticEthernetNetwork(string ipaddress, string netmask, string gateway)
        {
            _ethernet = Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0];
            if (_ethernet == null)
            {
                throw new NullReferenceException();
            }

            _ethernet.EnableStaticIP(ipaddress, netmask, gateway);
        }