Ethernet not working on EMX, October 24th package

Have EMX developement-board and after update to 4.2.5 I can’t get any connection via Ethernet. Simple sample programs doesn’t work.
Tried to change Ethernet Setup via MSDEPLOY brings Error “Invalid configuration data from Plug-In”.
In former 4.2. - versions , the display shows me IP-Adress at startup, V4.2.5.0 doesn’t have this information. Right ?

any ideas ?

regards
Ralf (a little bit frustrated because I am more googling than programming at the moment…)

Google will give results on thus new feature. Instead see the example code we added on codeshare. We will be documenting this some more in near future.

@ Gus,
can you please confirm, if Version 4.2.5.0 is displaying it’s IP-Adress and MAC at startup or not ?
I only see

EMX
Version: 4.2.5.0
Debug: USB1
LCD: 320 x 240

and Ethernet seems to be not working.

no it doesn’t display the IP

There is a good sample how to configure the network interfaces.

http://www.tinyclr.com/codeshare/entry/588

I meant to say google will not :slight_smile:

@ Gus
Yes, this gaves more sense

Hi Guys,

I have the same problems, even after using the codeshare example, the system keeps on trying to get or a DHCP address or when I use static the system keeps on complaining about something like [em]IP Address not set yet.[/em] I’m having a Cobra and just updated to the october released version.

So after correcting the source to its new environment (new 4.2 project, copying over the sources and changing all the namespaces, ref stuff) got it compiling and ran into the message as mentioned above.

Tried the codeshare example, but no luck this time …

Any help would by much appreciated, just had my DPWS up and running, was quite overwelmed to see the Cobra in my network with just a view lines of code.

Cheers,

Peter

@ pewe - you have used the example as is?

Hi Gus,

it seems that ones the message is displayed, the one with the not IP Address not set etc., it does not recover, kind of … after just changing all the Debug.Prints into LCD.DrawText+LCD.Flush and of course some deploy cycles. all of a sudden I had an IP address, and than again not and then again an IP address. Maybe the retrieval logic for getting the ip address needs to be reviewed adequately to confirm this behavior … but it seems its working now … perfect not bad at all … so far so good …

Thanks for the samle code … maybe I’ll post the - Just a couple of lines DPWS code once I get it back in the saddle again …

TIA,

Peter.

Hi Gus,

there is quite a stable behavior after some testing to get it working. What I had to do was the following:

  1. Cables Power, Micro-USB, LAN connected and powered on my device. Result is that the 7" LCD displays - IP Address Not Set Yet
  2. Fired up VS2010 (Ultimate edition), Opened the solution and ran/deployed it without changing (F5) -> Same result
  3. Disconnected the network cable. Result -> LCD Displays - Built-in Ethernet Cable is Disconnected!
  4. Reconnected the network cable. Result in exception on line with NetworkAvailablityBlocking.Set();
  5. VS Displays a message to break, continue. Choose continue, and an IP address got assigned. (DHCP on)

The VS output window is getting some errors, maybe its a lead to the finding the cause of this behavior.

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

    #### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (3) ####
    #### Message: 
    #### NetStats.Program::Eth1_CableConnectivityChanged [IP: 0049] ####
    #### GHI.Premium.Net.EthernetBuiltIn::NetworkChange_NetworkAvailabilityChanged [IP: 0021] ####
    #### GHI.Premium.Net.NetworkChangeExtension::OnNetworkChangeCallback [IP: 0099] ####
    #### GHI.Premium.Net.NetworkChangeExtension+NetworkChangeExtensionListener::OnEvent [IP: 000d] ####
    #### Microsoft.SPOT.EventSink::EventDispatchCallback [IP: 0014] ####
 Uncaught exception 

Without VS it stays on nr. 1. Normally it is not bad being on number 1, but in this situation its not the optimal. I’ve attached the solution to replicate this behavior.

I’m not that good in english but is the word Availablity as in the errornous line of code not misspelled ? Maybe that’s causing this all due to some typo ?

Once the cobra/emx is up and running, it behaves stable. Serving my simple HTML5 page without any complains so far …

Cheers,

Peter.

P.S. The netstat.jpg you have to rename in netstat.zip and contains the solution.

Web page screen shot

The 3. part as mentioned in the PS

Hi Gus,

the solution attached as a renamed zip does not work. If you require this, please let me know howto get it to you.

Tia,

Peter.

Gusi@ ghiel…

Mail is send out, can you confirm…

Yep

Hi Gus,

found some other unexpected behavior:

After expanding the routine as below:


        private static void ProcessClientGetRequest(HttpListenerContext context)
        {
            HttpListenerRequest request = context.Request;
            HttpListenerResponse response = context.Response;

            Debug.Print("URL: " + [b]request.Url.AbsoluteUri[/b]);
            Debug.Print("Remote request from: " + request.RemoteEndPoint.Address.ToString() + ":" + request.RemoteEndPoint.Port.ToString());
            Debug.Print("User agent: " + request.UserAgent);
            Debug.Print("User host address: " + request.UserHostAddress);
            Debug.Print("User host name: " + request.UserHostName);
            Debug.Print("Languages (" + request.UserLanguages.Length +"):");
            foreach (string s in request.UserLanguages)
            {
                Debug.Print("  - " + s);
            }
            response.OutputStream.Write(outBuffer, 0, outBuffer.Length);
        }

Got the following feedback, nothing dramatic but still …

#### Exception System.InvalidOperationException - 0x00000000 (1) ####
#### Message: 
#### System.Uri::get_AbsoluteUri [IP: 0009] ####
#### NetStats.Program::RunServer [IP: 0041] ####
#### NetStats.Program::Main [IP: 01eb] ####

Cheers,

Peter

Hi,

I can confirm pewe’s troubles at his post #9

With Gus’ sample code, my EMX evaluationboard sometimes gets connection to ethernet, sometime not.
If not, it hangs in the loop “IP address is not set yet.”, even if the IP is fixed and DHCP is switched off.

The name “[em]NetworkAvailabilityBlocking[/em]” can be corrected in the definition from sourcecode, but this is not the reason.

Ralf

using the SimpleHttpServer - Demo from Gus at EMX developer-board:

Now I always get an error :

[em]unhandled exception “GHI.Premium.Net.NetworkInterfaceExtensionException” in “GHI.Premium.Net.dll” [/em]

at this line:

NetworkInterfaceExtension.AssignNetworkingStackTo(Eth1);

The source code is absolute unchanged.

very confusing…

Ralf

Tryed to re-install Firmware because of the errors above (don’t had another idea):
But Updater updates only tinybooter. Then: “no responding from device”.

We planned to use EMX in our new industrial control system, but now I think about to give up further test’s with these GHI modules.

Ralf