0.0.0.0 indicates you don’t have a network address. Are you using DHCP or fixed IP address? And have you confirmed networking works in your environment with either other apps using networking or through debug? This thread https://www.ghielectronics.com/community/forum/topic?id=10855 has a few example code blocks you can use to test and confirm networking works before you go to a web server
WAN implies the ADSL or cable connection, not your LAN - but that is not what I meant.
Your device (your Fez) has to obtain an address. Either that address is manually assigned to it, in code or through the configuration app/s, or it is assigned by DHCP. You need to know which one to choose - if this is a home network you can be pretty sure that DHCP will be the right answer.
You then have to make sure the code you implement uses your chosen address mechanism.
You then have to make sure that the application works to get the address - your 0.0.0.0 shows that this is failing. You need to dig into why, and that other thread I pointed out may have example code so you can try to diagnose where the process may not be working…
@ Brett - The event handler .NetworkUp() is called, that mean that there’s an lan connection, the port is open as well. At the tutorial the author isn’t mention something like that can happen.
At the beginning of the program :
void ProgramStarted()
{
ethernet.UseDHCP();
ethernet.NetworkUp += new GTM.Module.NetworkModule.NetworkEventHandler(ethernet_NetworkUp);
ethernet.NetworkDown += new GTM.Module.NetworkModule.NetworkEventHandler(ethernet_NetworkDown);
led.TurnBlue();
}
NetworkUp() implies there’s a link. Nothing else. As Andre points to you need to know ADDRESS level interactions, so again the earlier link has a great little routine to be used in the network address change event that can help uncover some of that - but I will almost guarantee you’re never hitting that.
If you want to maximise the input, tell us about your network - like whether it’s a home network or a corporate managed network, info on the router you’re talking about, how your PC is configured, what your router can tell you about registered DHCP clients etc. In fact it’s probably worth telling us what mainboard and network module you’re using too in case that’s important.
Edit: just saw your post from a few seconds before mine. The code relies on getting an address when the network state change happens, but that’s not guaranteed. You should move your webserver startup code out of there - and to help diagnose, perhaps if you put in a 10-pass loop with a 10-sec delay between iterations and watch the address value there (or use the addresschange event)