Ethernet module worked but now doesn't work

The Ethernet_J11D module has been working fine on my system, but now the network won’t come up. I’ve tried two different Spider Mainboards and ethernet modules. I’ve used the J11D on this router for months but now it won’t work.

I updated the firm ware on the old board. The new one works with other modules.

You have 2 Spider mainboards and 2 Ethernet modules?

Do you use DHCP or fixed IP ?

DHCP dont work with my DHCP Server provided by my router. It works fine with Microsoft DHCP server.
If you use DHCP try fixed IP

Is the led on or blinking on the module ?

Can you provide some details or your test code.

Yes, I have two mainboards and two ethernet modules. I work on .NET Gadgeteer quite a lot and have friends with parts.
I have had no problems with the Ethernet module until the last couple of days. Now the network up event never occurs.
I have always had to use DHCP.
I’m not doing anything different now, but the network is never up.
When I look at the debugger, even though I just called UseDHCP, it says under NetworkSettings, IsDhcpEnabled: 0. and IsDynamicDnsEnabled: 0.

Ethernet has always worked fine on this system. I reinstalled the firmware on the older board, but that didn’t help either. I like this platform and have work to do on it that requires an Internet connection. I don’t have a wifi module.

Ethernet Network events does not work correctly with the current release. This has been fixed in the coming SDK release.

I guess I lucked out for the past couple of months. It was fun while it lasted. So is there any reason to try to send a web request when the only network event I get is NetworkDown?

I installed the Gadgeteer beta SDK from http://tinyclr.com/forum/12/4891/ and Ethernet J11D is still not working.

We did not release the GHI NETMF SDK yet, Not Beta. Probably Mike is referning to a different to another SDK.

In another word, the fix is not pubic yet. To give you guys more details, the issue is in EMX module firmware which is independent from .NET Gadgeteer but Ethernet J11module driver depends on. So the issue will be fixed automatically with the new GHI NETMF v4.1 and .NET Gadgeteer Package.

I created my own ethernet class that works with the EthernetJ_11D module for .NET Gadgeteer. It isn’t difficult to adapt the code here: http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/Index.html

My class is specialized for one sensor module sending a POST request to a web service, but I’ll share the code on my blog if anybody wants it.

Please do! ;D

Interim solution to Ethernet_J11D failure: Interim Solution to Ethernet_J11D Event Failure | Integral Design

Implements an ethernet class in lieu of Ethernet_J11D driver.

That’s smart! 8)

Nice one! I like header image on your blog. ;D

Yes, that hardware looks kind of familiar. It’s great stuff!

Do we have a date for this fix yet?

I am getting strange results where very occasionally the web event fires.

This is my minimal test example. Maybe I’m just doing something wrong. But it does work sometime, if the wind is in the right direction.


public partial class Program
    {
        GT.Networking.WebEvent sayHello;

        void ProgramStarted()
        {
            ethernet.UseDHCP();
            ethernet.NetworkUp += new GTM.Module.NetworkModule.NetworkEventHandler(ethernet_NetworkUp);
            ethernet.NetworkDown += new GTM.Module.NetworkModule.NetworkEventHandler(ethernet_NetworkDown);
            led.TurnBlue();
        }


        void ethernet_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state)
        {
            led.TurnGreen();
            string ipAddress = ethernet.NetworkSettings.IPAddress;
            WebServer.StartLocalServer(ipAddress, 80);
            sayHello = WebServer.SetupWebEvent("hello");
            sayHello.WebEventReceived += new WebEvent.ReceivedWebEventHandler(sayHello_WebEventReceived);
        }

        void sayHello_WebEventReceived(string path, WebServer.HttpMethod method, Responder responder)
        {
            string content = "<html><body><h1>Hello World!!</h1></body></html>";
            byte[] bytes = new System.Text.UTF8Encoding().GetBytes(content);
            responder.Respond(bytes, "text/html");
        }


        void ethernet_NetworkDown(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state)
        {
            led.TurnRed();
        }



Is this the same problem or is it something different:

Microsoft.SPOT.Net.NetworkInformation.NetworkInterface networkInterface = Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0];
networkInterface.EnableDhcp();
Debug.Print("IP: " + networkInterface.IPAddress);

This works.

ethernet.NetworkUp += EthernetNetworkUp;
ethernet.UseStaticIP(
	"192.168.10.50",
	"255.255.254.0",
	"192.168.10.1",
	new []
	{
		"192.168.10.1",
		"208.67.222.222"
	}
);

This works. (Where ethernet is an instance of Gadgeteer.Modules.GHIElectronics.Ethernet_J11D and EthernetNetworkUp is an event handler for NetworkUp - It’s a shame that only two DNS servers can be specified and that this limitation isn’t documented in the XML documentation.)

ethernet.NetworkUp += EthernetNetworkUp;
ethernet.UseDHCP();

This does not work - The event handler is never called and no DHCP lease is assigned.

Also as an aside, it would be nice if WebServer.SetupWebEvent() could take an empty string as its parameter to allow the “Hey, it works:-) Your own .NET Gadgeteer Web Server is up and running!” catch-all page to be replaced.

If you disconnect the cable after running the application and connect it back DHCP will work and you will get NetworkUP event.

There is a big in Gadgeteer’s NetworkModule class when using DHCP. This is fixed already and will be available in the next release.

My name is Simon Monk, and I have a contract with O’Reilly / Maker Press to write ‘Getting Started with .NET Gadgeteer’. The book is based around the Fez Starter Kit.

I have written a chapter based on the Ethernet module that is due for delivery of manuscript on Tuesday of next week and when I started the chapter, I naively assumed that the Ethernet module worked as documented.

Fot the second time of asking, I would be very grateful if you could tell me WHEN this update with the fix will be released.

Also, will the Ethernet interface will work as documented, so that I can submit the manuscript with fingers crossed and make any corrections needed later in the publishing process.

I apologise if this sounds curt, but I have wasted quite a lot of time trying to get this to work, and it sounds like I am not the only one.

If you wish to continue this discussion off line, I can be reached at (removed by admin)

Microsoft is working on multiple enhancements in the gadgeteer core and we are also adding few enhancements and working with them directly on multiple changes and fixes. As you know, gadgeteer is very new and we are finding places for a lot of cool additions and improvements. For these reasons, there is no set date. It could be this week or could be in few weeks. Either way, we are doing our best. I belive that particular ethernet bug is already fixed.

Meanwhile, we can help you proceeed without waiting. Joe is our expert he can help better in that area.

I will email you and copy microsoft in a sec.

Regarding the default event handler:

Please see patch #11442 @ http://gadgeteer.codeplex.com/SourceControl/list/patches