G400D DHCP issue

I am observing an issue while trying to get an IP address on G400D. Enabling DHCP seems to work only after loading network configuration with FEZ Config tool and reapply the (same) settings. If I rerun the application using VisualStudio then no dhcp request is send by the G400D. Is there’s still something buggy with the networking stack?

Are U using the built in ethernet?

Some time ago one said that it’s better to enable dhcp before opening ethernet, enabling an already enable wasz forbidden etc…
With the last release is it still valid?

It seems really related with visual studio. When I start without the deugger attached it works properly, the problem occurs only when I deploy using visual. :-[

1 Like

I am using visual studio 2013. Do you think this can be related?

or not so funny…

Let’s go for an update of VS…

I remember a note by GHI that DHCP is not working the first time (attempt) after using FezConfig…

I observe the opposite. It works after FEZConfig, it works without VS but does not work when I debug with VS.

I have installed VS2015 but do not succeed to open the solution (made with VS2013)… does anyone know how do this?

I think that the problem is that I just install VS2015 without reinstalling .NETMF nor the GHI SDK. I reinstall it now and will try asap.

where can i find it?

I have installed this one: .NET Micro Framework project system - Visual Studio Marketplace

I will give it a try

Ok now the solution can be opened but still an error when I try to deploy:

Ok it seems that the project was not selected as the start projetc…

I also observe the following thing: On VS2015 We can not iterate on a string to retrieve each char. This is painfull!!!

I still observe a non DHCP request with VS2015 :wall:

Ok Here’s the sample code.

using System;
using System.Threading;
using Microsoft.SPOT;
using GHI.Networking;

namespace TEST_DHCP
    public class Program
        public static void Main()
            var netif = new EthernetBuiltIn();

            while (netif.IPAddress == "")
                Debug.Print("Waiting for DHCP");

I can confirm that using VS2013 or VS2015 There’s no DHCP transaction on G400D There’s nothing show on wireshark. If I reboot the G400D it works well but again as soon as I try to debug no dhcp discover is send by the G400D.

@ leforban - All of our tests with built in Ethernet on G400 work fine when debugging. Can you try to update the firmware? In what are you using the G400D?

I am using G400D on a custom board. Fez config shows…

@ leforban - Even if you are up to date, just reload the firmware again to be sure nothing got corrupt.

Indeed reloading firmware fixes the issue. :clap:

But after a while the issue is back :wall: :wall: :wall: :wall:

This may be something in my code but my application is really huge and don’t even know where to start…

@ leforban - Try the test code again. Do it 3 times. If it gives an error all 3 times, then reload the firmware, and try the test code again. Keep resetting it and count the number of times before the issue returns. If the test code causes a problem then it’s not your application code.

Also, try looking for external factors to ensure that it’s not the envrionment causing the issue. Can you send a picture of this custom board?