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.

natep

Member Since 14 Aug 2012
Offline Last Active Aug 27 2012 05:32 PM
-----

Posts I've Made

In Topic: Insights into DHCP issues

16 August 2012 - 06:17 PM

It just occurred to me that the problem may be only manifested when using a debugger (either MFDeploy or Visual Studio). I am going to run my code again, but with a UDP broadcast from the netduino and monitor the packets in Wireshark. I will post my results once I have tried this.

I tried my idea. I sent debug info over UDP broadcast. Then, by monitoring the UDP packets in Wireshark, I was able to confirm that the problem is present even with neither MFDeploy or Visual Studio open. The NetworkInterface.Address property is still 0.0.0.0. (I also verified the Gateway property. It is exhibiting the same problem.)

I am hoping that one of the SecretLabs staff will jump in and give some thoughts. I have tried to make this as simple and reproducible as possible from the very beginning.

Has anyone been able to reproduce the problem from my first post? Any workarounds or solutions other than a blind Sleep statement?

In Topic: Insights into DHCP issues

16 August 2012 - 05:26 PM

If I set the IP to 0.0.0.0 and Enable DHCP in the Hardware Config, by the time the code above calls the event handler, I have an IP. ('interf.IPAddress')

However, if I give it an IP address of '128.128.128.128' and DISABLE DHCP in the Hardware Config, and then programmitally set it to enable DHCP ('interf.IsDhcpEnabled = true'), I get an IP, BUT - interf.IpAddress always returns 0.0.0.0, even after a lease is acquired.


Thank you for testing. This is helpful.

I think that this topic could easily get off track because everyone is using different code. There are too many variables to eliminate while troubleshooting. Here is my suggestion. Could everyone try to replicate what I did in the initial post? Is the behavior different from what I reported? Again, my steps were to use MFDeploy to set the IP address to "0.0.0.0" and Enable DHCP. Then, I used Visual Studio to deploy the program (from the first post). Then, I closed Visual Studio and connected with MFDeploy to monitor the console statements from my program. The result is shown in the MFDeploy screenshot.

It just occurred to me that the problem may be only manifested when using a debugger (either MFDeploy or Visual Studio). I am going to run my code again, but with a UDP broadcast from the netduino and monitor the packets in Wireshark. I will post my results once I have tried this.

To all who are interested in pursuing this, please try to replicate my scenario from the first post and let us know what you get. Screenshots like mine are very helpful if possible.

In Topic: Insights into DHCP issues

15 August 2012 - 10:54 PM

I think the code that you posted did not included your modified version of Program.cs. I could not find it. From the code you posted above, I can't see any difference between your code and mine except for the "RenewDhcpLease();" statement. I tried to add that "RenewDhcpLease()" to my code right after "EnableDHCP", but it did not change the behavior, as expected. I am still confused as to how your LCD is displaying the correct address. If you do the following steps, does it still display the correct IP on the LCD: 1) Configure the netduino using MFDeploy for an IP of "0.0.0.0" and then select "Enable DHCP". (I want to ensure that the netduino is not storing an old address in the NetworkInterface. This could trick you into thinking that the NetworkInterface.IPAddress property is valid.) 2) Redeploy your program using Visual Studio. 3) Now does the LCD show a "0.0.0.0" address or a "192.168.x.x" address after DHCP is successful? Let me know what you find. Otherwise, I am stumped. I really do think there is a problem in the framework.

In Topic: Insights into DHCP issues

15 August 2012 - 08:12 PM

I had problems finding the part of your code that displays the IP address on an LCD. Is the LCD connected to the netduino? Where is the code that displays the IP on the LCD? I am specifically looking to see if you are using a reference to NetworkInterface.IPAddress to obtain the IP address.

In Topic: Insights into DHCP issues

15 August 2012 - 07:35 PM

I am using a Rev B board. Could you post code as to how you are getting the IP address? If you are able to display a DHCP obtained IP address on an LCD, you must be obtaining it somehow? Are you using the NetworkInterface.IPAddress property as used in my code above? Or something else? Thanks. I would love to find the source of this error.

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.