Main Site Documentation

Ethernet module does not work or something wrong in my code?


#1

Hi guys,

I am trying to use the fez spider ethernet module.

I used both the methods UseStaticIp and UseDHCP with no success.

UseStaticIP("192.168.0.199", "255.255.255.0", "192.168.0.1");

does not raise any exception, but the spider does not respond to a ping.

UseDHCP()

raises this exception:

Using mainboard GHIElectronics-FEZSpider version 1.0
#### Exception System.Exception - CLR_E_FAIL (3) ####
#### Message:
#### Microsoft.SPOT.Net.NetworkInformation.NetworkInterface::UpdateConfiguration [IP: 0000] ####
#### Microsoft.SPOT.Net.NetworkInformation.NetworkInterface::EnableDhcp [IP: 000f] ####
#### Gadgeteer.Modules.Module+NetworkModule::DHCPThread [IP: 0026] ####
Eccezione first-chance di tipo ‘System.Exception’ in Microsoft.SPOT.Net.dll
Eccezione non gestita di tipo ‘System.Exception’ in Microsoft.SPOT.Net.dll

I saw that the MAC address displayed during the fez spider boot sequence was different than that on the wiznet label. So I tried this:

 byte[] mac = { 0x00, 0x21, 0x03, 0x80, 0x2D, 0xC9 };
ethernet.NetworkSettings.PhysicalAddress = mac;

During the next startup of the spider, the MAC displayed during the startup was right.

I also noticed that when I plug the ethernet cable on the module and on the router, the ethernet module act led is switched off; the router led is also switched off.

Missing something?


#2

If the LED is not lighting up then there might be something wrong from the hardware side. Try a different Gadgeteer cable and make use it is attached to Socket E.


#3

:frowning:

I used two different gadgeteer cables. Nothing.
The module is connected to socket E (nr. 7).

Anything else I can try?

Thank you!

Ste.


#4

Guys,

don’t ask me why (probably because the weather is rainy and I am on holiday today :D), but I found an old router and I decided to try with this.

And the ethernet module works fine…

The router that does not work with the spider has 2 days, it’s quite a new model.

Now I’m going to find the reason why it does not work…

May be it is affraid of spiders?


#5

Spiders are scary to some, you know :slight_smile:


#6

I believe that the Spiders ship with a default MAC address?

The unique address is on the EMX module, and should be set with MFDeploy.

It could be that some routers do not like the default MAC address?


#7

Try a crossover cable


#8

Thank you all!
Seems to be a router problem.
Restarting the router, all is working fine.

Uhm, I hate this type of problems that finally do not have a REAL solution!

Thank you for your help!

Ste.