Giter VIP home page Giter VIP logo

netduino.ip's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

netduino.ip's Issues

NetduinoExtensions problems with Netduino.IP 1.0.1

I'm sharing a same project on a Netduino Plus 2 and a Netduino 3 Wifi.
In this project I'm using the NetduinoExtensions assembly.
After the update of the Netduino.IP 1.0.1 on the NP2, I'm not able to start the project because I receive this error message:

Link failure: some assembly references cannot be resolved!!
Assembly: MQTT (1.0.0.0) needs assembly 'NetduinoExtensions' (4.3.2.1)
Assembly: NetduinoExtensions (4.3.2.1) needs assembly 'Netduino.IP' (1.0.0.0)
Error: a3000000

Seems that the NetduinoExtensions is able to use only the specific version 1.0.0.0 and not the new one.

Modifying DNS servers using original MFDeploy results in incorrect behaviour when DHCP is enabled

Please refer to this thread: http://forums.netduino.com/index.php?/topic/12008-netduinoip-dns-resolution/

It seems that the non-IPv6 version of MFDeploy is not correctly setting the "get DNS servers via DHCP" flag in the ER_CONFIG sector when you enter all-zeros for the DNS servers.

This results in the network being incorrectly configured with no DNS servers and an attempt to read the DNS server addresses throws NullReferenceException, and Netduino is unable to resolve any host names, even though the DNS servers have been provided and correctly received in the DHCP Offer.

CW suggested that a workaround might be possible in a future firmware version.

Here is the code I am using to read the DNS servers (Dbg.Trace can be replaced with Debug.Print):

    static void WaitForValidIpAddress()
        {
        NetworkInterface[] networkInterfaces;
        Dbg.Trace("Waiting for valid IP address", Source.NetworkServer);
        do
            {
            Thread.Sleep(100);
            networkInterfaces = NetworkInterface.GetAllNetworkInterfaces();
            } while (networkInterfaces[0].IPAddress == "0.0.0.0");

        Dbg.Trace("Found " + networkInterfaces.Length + " network interfaces - details as follows...", Source.NetworkServer);
        for (int i = 0; i < networkInterfaces.Length; i++)
            {
            var nic = networkInterfaces[i];
            Dbg.Trace("Network interface: " + i, Source.NetworkServer);
            Dbg.Trace("  Interface type: " + nic.NetworkInterfaceType, Source.NetworkServer);
            Dbg.Trace("  IPv4 address: " + nic.IPAddress, Source.NetworkServer);
            Dbg.Trace("  Default gateway: " + nic.GatewayAddress, Source.NetworkServer);
            Dbg.Trace("  Subnet mask: " + nic.SubnetMask, Source.NetworkServer);

            var dnsServers = nic.DnsAddresses;
            Dbg.Trace("  DNS servers:", Source.NetworkServer);
            foreach (var dnsServer in dnsServers)
                {
                Dbg.Trace("    " + dnsServer, Source.NetworkServer);
                }
            }
        }

Standards compliance issue with DHCP MaxDHCPMessageSize option

When monitoring Netduino traffic using Microsoft Message Analyzer, I noticed it was flagging up a compliance issue in the DHCP protocol.

image

According to RFC2132:

"The code for this option is 57, and its length is 2. The minimum legal value is 576 octets".

I noticed that on Technet there is a documentation mistake, which says "The maximum legal value for this option is 576". That is incorrect, 576 is the minimum value

I believe that is the link layer size and includes 64 octets header and 512 octets payload, that's the smallest link layer packet that hosts are supposed to accept.

Problems with EnableStaticDns() & EnableDynamicDns() Methods in NetworkInterface class

The EnableStaticDns() & EnableDynamicDns() methods in the NetworkInterface class both throw a NotImplementedException. Although the methods are implemented, there is an underlying method UpdateConfiguration() which throws the exception.

FYI - The InitializeNetworkInterfaceSettings() method is also unimplemented.

Please see Netduino.IP / Microsoft.SPOT.Net / NetworkInterface.cs.

The subject methods DO work on a Netduino Plus 2 (which uses the OLD networking stack).
They do NOT work on a Netduino 3 Wi-Fi or on the Netduino 3 Ethernet (which use Netduino.IP)

For more information see:
http://forums.netduino.com/index.php?/topic/12341-n3-ethernet-it-doesnt-work/

DNS resolution fails if the first DNS server is unreachable

When multiple DNS servers are specified and the first server in the list is unreachable (e.g. it is offline) then DNS lookup fails instead of trying the next server.

Expected result: All DNS servers in the list should be tried before throwing an exception.

Resolving.
Ready.
ConnectionHandler available
[Network Server    ] Waiting for valid IP address
[Network Server    ] Found 1 network interfaces - details as follows...
[Network Server    ] Network interface: 0
[Network Server    ]   Interface type: 6
[Network Server    ]   IPv4 address: 192.168.0.41
[Network Server    ]   Default gateway: 192.168.0.1
[Network Server    ]   Subnet mask: 255.255.255.0
[Network Server    ]   DNS servers:
[Network Server    ]     192.168.0.26
[Network Server    ]     192.168.0.1
[Network Time      ] Attempting to st the time from pool.ntp.org
 Uncaught exception 

A SocketException is thrown when pool.ntp.org fails to resolve on the first server, which was turned off. The second server in the list is the ADSL router and was available and working at the time. Other hosts on the network were able to successfully resolve pool.ntp.org.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.