Network problem
#1
Posted 29 October 2011 - 09:35 PM
#2
Posted 30 October 2011 - 12:29 AM
Debug.Print(Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].IPAddress);
Also, you can just try this:
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); socket.Bind(new IPEndPoint(IPAddress.Any, 80)); socket.Listen(10);
Then sleep the thread (infinite) and pinging will work without the need for an entire web server.
#3
Posted 30 October 2011 - 03:07 AM
Although N+ successfully acquires the address (with DHCP enabled) I cannot see it in the network (I cannot ping it).
Marco,
What is the actual response you are getting when you try to ping it?
#4
Posted 30 October 2011 - 11:39 AM
Marco,
What is the actual response you are getting when you try to ping it?
Ping response (after few seconds): "Destination host unreachable"
It is very strange because N+ dhcp works, I see its MAC address correctly assigned among DHCP server leases..
I tried new FW 4.2 and firmware v4.2.0.0 RC3 but I have same problems.
#5
Posted 30 October 2011 - 11:42 AM
Make sure you are using the right IP when pinging:
Debug.Print(Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].IPAddress);
Also, you can just try this:
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); socket.Bind(new IPEndPoint(IPAddress.Any, 80)); socket.Listen(10);
Then sleep the thread (infinite) and pinging will work without the need for an entire web server.
I tried the code you posted, but I am not able to ping N+ too.
#6
Posted 30 October 2011 - 02:53 PM
Ping response (after few seconds): "Destination host unreachable"
It is very strange because N+ dhcp works, I see its MAC address correctly assigned among DHCP server leases..
I tried new FW 4.2 and firmware v4.2.0.0 RC3 but I have same problems.
Ok, that is the message I thought you were getting. Can you let us know the IP address of your computer and the IP address of your N+? I bet the N+ IP address is not on the same subnet as your router and computer.
Edit: try adding this to your code:
Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].EnableDhcp();
#7
Posted 30 October 2011 - 04:04 PM
Ok, that is the message I thought you were getting. Can you let us know the IP address of your computer and the IP address of your N+? I bet the N+ IP address is not on the same subnet as your router and computer.
Edit: try adding this to your code:
Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].EnableDhcp();
I tried using DHCP (forcing DHCP with the above istruction), in that case the IP address of my PC is 192.168.99.38 and the IP address of N+ is 192.168.99.36, netmask 255.255.255.0, and with a fixed IP; I tried with different netmasks 192.168.2.0, 10.10.10.0.
When I have seen the ping error message, I also had the same idea, a netmask mismatch, but now I think that my N+ has a problem.
Could be and interrupt management issue? The ethernet board seems to works fine but the IP stack doesn't receive anything.
Marco
#8
Posted 30 October 2011 - 05:58 PM
I tried using DHCP (forcing DHCP with the above istruction), in that case the IP address of my PC is 192.168.99.38 and the IP address of N+ is 192.168.99.36, netmask 255.255.255.0, and with a fixed IP; I tried with different netmasks 192.168.2.0, 10.10.10.0.
When I have seen the ping error message, I also had the same idea, a netmask mismatch, but now I think that my N+ has a problem.
Could be and interrupt management issue? The ethernet board seems to works fine but the IP stack doesn't receive anything.
Marco
What is the N+ Default Gateway IP address?
Try this:
Debug.Print(Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].GatewayAddress);
Is the N+ Gateway Address the same as the IP address of your router? Or is it different? It should be the same.
Also, try running a traceroute for the N+ IP address and see where it's failing.
#9
Posted 30 October 2011 - 07:47 PM
What is the N+ Default Gateway IP address?
Try this:
Debug.Print(Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].GatewayAddress);
Is the N+ Gateway Address the same as the IP address of your router? Or is it different? It should be the same.
Also, try running a traceroute for the N+ IP address and see where it's failing.
I made several tests with no encouraging results.
I tried using DHCP and no DHCP, setting default gateway and leaving it blank. Using an hub and using and crossover Ethernet cable.
Previous ping errors were due to a wrong metric on my Ethernet PC card, Now I receive a more correct 'timeout error';
I was able to ping the N+ only in one circumstance: crossover cable and interface speed to 10 Mb full duplex. Any other configuration doesn't work, and in that case it works intermittently.
It seems clear that there is something wrong. I do not know if it is an hardware or software problem, but I have the same results with two different firmware version...
I would like to test another Netduino board.
#10
Posted 30 October 2011 - 07:52 PM
Did you try the .NETMF 4.2 RC1 ?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users