Ethernet shield initialization problem

Hi,

I am using a FEZ Panda 2 and the FEZ connect shield andI have a problem with the initialization of the networking stuff.

When I initialize the network using “WIZnet_W5100.Enable” and “NetworkInterface.EnableStaticIP” I must wait a few seconds (5 works very well) before I can send data (UDP in my case). Otherwise the packages are lost. No exception is thrown or something else.

Is there any way to determine whether the networking components are ready to use?
Is the initialization asynchronous?

Thank you…

You can always use an analyser to check if the packets were really sent in first few seconds or not.

What do you mean with "analyser "? Can I use this in the code of my panda?

Something like wire shark software.

Nothing is received when I send data directly after initializing the networking compontents.
When I use same code with the short delay, wireshark shows the broadcast UDP packge which was sent from the Panda.

Can’t the link led signal be used to indicate that?

Have you looked at the network initialisation code in what I would call the “reference” projects, from Nicolas3 and Jasdev?
http://code.tinyclr.com/project/308/netconfig-wiz5100-http-configuration-framework/
http://code.tinyclr.com/project/421/fez-connect-driver/

Both are well tested and used, and neither seem to have this issue (although no UDP is in use). You should look at how they initialise the network and follow their approach; a “random” length of time hard coded is obviously not good and prone to come back and bite you later.