Getting Started with Netduino: Connecting to the Internet
#1
Posted 28 October 2012 - 02:45 AM
#2
Posted 28 October 2012 - 04:09 AM
#3
Posted 28 October 2012 - 08:59 AM
ntools
TCP Listener (Beta) · FTP Server (Alpha)
Netduino Plus Go Module · Xml Parser
http://ntools.codeplex.com/
#4
Posted 28 October 2012 - 09:32 AM
I tried disabling DHCP and using a static IP with no luck.
#### SocketException ErrorCode = 10060
ERROR: host name could not be resolved
Did you also enter static DNS servers?
- Arron Chapman likes this
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#5
Posted 28 October 2012 - 06:15 PM
Did you also enter static DNS servers?
Dan,
What version of NETMF do you have? 4.2?
From a suggestion in this forum, I do always:
//My Netduino Plus MAC on the sticker ...very important!!
byte[] MAC = { 0x5C, 0x86, 0x4A, 0x00, 0x4E, 0x5B };
//The ip address I assign to my Netduino plus
Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].EnableStaticIP("192.168.1.102", "255.255.255.0", "192.168.1.254");
Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].PhysicalAddress = MAC;
//In my case, I provide statict addressing
//Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].EnableDhcp();
and it works perfect on the network my customer has.
Let me know if I can help!!
#6
Posted 28 October 2012 - 06:53 PM
#7
Posted 29 October 2012 - 03:10 AM
Have to double-checked that your'e referring SecretLabs.Hardware.NetduinoPlus and not SecretLabs.Hardware.Netduino (or something close to those names) ?
My code does reference this library.
Lets begin, by checking that there's actually established a connection. Try something lile Debug.Print(Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].IPAddress) to verify, that the device actually gets an IP.
The code from Chapter 8 already includes a debug statement like this. It does show me an IP.
If you get an IP, then try to ping it from the cmd (Windows-Key+R -> type cmd -> enter -> ping ip-address-here -> enter -> wait for result -> cheer/cry).
I'm still crying
#8
Posted 29 October 2012 - 03:22 AM
Did you also enter static DNS servers?
I didn't until I read your post, but it still didn't work. I looked up my DNS IP with ipconfig and used it (192.168.1.1) in both "Primary DNS" and "Secondary DNS" fields. From what I read in GSIOT, you could leave those entries as 0.0.0.0. Thanks for your help.
Edit: I also made sure that the Ethernet connection I'm using for the Netduino is good by plugging it to my laptop with wireless shut off. It connected no problem.
#9
Posted 29 October 2012 - 03:37 AM
Dan,
What version of NETMF do you have? 4.2?
I have version 4.1 since this is what is recommended in the Download section of this site.
From a suggestion in this forum, I do always:
//My Netduino Plus MAC on the sticker ...very important!!
byte[] MAC = { 0x5C, 0x86, 0x4A, 0x00, 0x4E, 0x5B };
...
I tried all your suggestions and my browser still doesn't want to connect to the Netduino. I am running the example code from Chapter 8.
Let me know if I can help!!
I really appreciate the it! Here is a screenshot of my current network settings in MFDeploy:
network_settings.png 23.54KB 39 downloads
#10
Posted 29 October 2012 - 04:14 AM
#11
Posted 29 October 2012 - 04:26 AM
Just to confirm: when you ping the device's IP address, you don't get a response. Correct?
Does the "ACT" led on the Netduino Plus blink? If not, there may be a settings mismatch.
Also...are your Netduino Plus and PC are connected to the same Ethernet hub?
When I ping the IP address, I get the message "Request timed out."
The ACT led is blinking when I run the program. My Netduino is physically connected to the wireless router that my laptop is also connected to. My cable modem only has one Ethernet port that the wireless router is occupying.
#12
Posted 29 October 2012 - 05:35 AM
And if you unplug your Netduino's Ethernet connection, does the ping from your PC show the same result?When I ping the IP address, I get the message "Request timed out."
Can you copy the output of your Netduino's IP settings here, along with the output from "ipconfig" on your PC? So we can see the DHCP subnet settings?
Have you tried plugging your computer directly into the same hub as the Netduino Plus?
If all else fails, Wireshark can help diagnose what's going on...although you'd need to share a connection between your PC and the Netduino to do that.
Chris
#13
Posted 29 October 2012 - 10:57 AM
I have version 4.1 since this is what is recommended in the Download section of this site.
I tried all your suggestions and my browser still doesn't want to connect to the Netduino. I am running the example code from Chapter 8.
I really appreciate the it! Here is a screenshot of my current network settings in MFDeploy:
network_settings.png 23.54KB 39 downloads
I noticed in your MFDeploy screenshot that your default gateway isn't in the same IP pool as the DHCP assigned IP address(192.168.5.XXX vs 192.168.1.XXX). Since you're using 24-bit networking, a lot of things are going to go south here. It also suggests that you might have some sort of configuration issue in the netduino or your router.
--Edit my bad: I saw that was your old static IP address.
#14
Posted 31 October 2012 - 08:52 PM
Hi Dan,
And if you unplug your Netduino's Ethernet connection, does the ping from your PC show the same result?
Can you copy the output of your Netduino's IP settings here, along with the output from "ipconfig" on your PC? So we can see the DHCP subnet settings?
Have you tried plugging your computer directly into the same hub as the Netduino Plus?
Chris,
I assume when you ask me if I've pinged Netduino, you mean that I've done so from the command line and not the MFDeploy window. In this case, I tried pinging Netduino both connected and not connected to Ethernet and I still receive the error "Request timed out.":
Pinging 192.168.5.129 with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Ping statistics for 192.168.5.129: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
I also tried plugging my laptop directly into the router and I get the same error.
Here is my ipconfig output:
Windows IP Configuration Host Name . . . . . . . . . . . . : Dietzgen Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Broadcast IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No DNS Suffix Search List. . . . . . : hsd1.wa.comcast.net. Ethernet adapter Local Area Connection 10: Connection-specific DNS Suffix . : hsd1.wa.comcast.net. Description . . . . . . . . . . . : Intel(R) PRO/1000 PL Network Connection #6 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::fde7:af3a:59b7:3dd2%44(Preferred) IPv4 Address. . . . . . . . . . . : 192.168.1.131(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Lease Obtained. . . . . . . . . . : Wednesday, October 31, 2012 1:32:34 PM Lease Expires . . . . . . . . . . : Thursday, November 01, 2012 1:32:33 PM Default Gateway . . . . . . . . . : 192.168.1.1 DHCP Server . . . . . . . . . . . : 192.168.1.1 DHCPv6 IAID . . . . . . . . . . . : 838866264 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-15-46-55-DB-00-1A-6B-D2-CD-93 DNS Servers . . . . . . . . . . . : 192.168.1.1 75.75.75.75 75.75.76.76 NetBIOS over Tcpip. . . . . . . . : Enabled
I've attached screenshots of my IP settings and output from MFDeploy.
Hope this helps you track my bug.
Thanks a lot.
Attached Files
#15
Posted 31 October 2012 - 09:06 PM
Also, when I printed out the complete IP information (that I posted in my reply to Chris), I saw that there were three DNS addresses. One was the gateway (router) address, and the others I didn't recognize. My final settings included the gateway address as primary DNS and one of the other addresses as the secondary.
Update: I am able to run the example code with 0.0.0.0 substituted for the DNS addresses in the MFDeploy network configuration.
Thanks for all the help, everyone. Encountering all these problems is speeding up the learning process. I'm still a little perplexed why it didn't work in the first place, however.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users