Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

N+ loses IP info


  • Please log in to reply
2 replies to this topic

#1 FVN.Net

FVN.Net

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationCentral Belgium, EU

Posted 07 August 2012 - 01:28 PM

I hope this is a common newbie problem although a quick search doesn't reveal a solution. Using MFDeploy I set my N+ to 10.1.1.10 / 255.0.0.0 / DG = 10.1.1.1. No DHCP. I ping from the laptop and it sees the N+. So far so good. In VS2010, I have ported this code to VB: http://netduinohacki...ello-world.html THIS HAS WORKED A COUPLE OF TIMES from the start but it fails to do so now. However, the code is ok since it works from the browser and also replies to my own Windows Forms program. The code GetAllNetworkInterfaces()(0).IPAddress gives 10.1.1.10 when it works but 0.0.0.0 when it doesn't. After this trial, a ping doesn't show the N+ anymore, so I need to run MFDeploy again. Somewhere it has set the N+ to DHCP and since there is no DHCP, all IP's are 0. When the IP info is set again, running the code sets DHCP to 'on' and IP's to 0.0.0.0. Can someone please explain what might be the problem? All input appreciated!

#2 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 07 August 2012 - 01:52 PM

Hi and welcome to the forums!

Two quick questions:
1. Which firmware do you use?
2. Have you commented out this line from that project?
Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].EnableDhcp();

"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#3 FVN.Net

FVN.Net

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationCentral Belgium, EU

Posted 07 August 2012 - 02:39 PM

Hi and welcome to the forums!


Thank you, I hope to one day answer more than have ever asked...

Two quick questions:
1. Which firmware do you use?


Version: 4.2.0 RELEASE CANDIDATE (version 4.2.0.0 RC5)

2. Have you commented out this line from that project?

Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].EnableDhcp();


No -shame on me- I did not and thus fell into the common copy/paste trap. I moved the server code into a separate class and kept this line in Sub Main where I never looked back. Problem fixed, on to the next one.

Thanks for the quick reply!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.