Tag Archives: Network

Networking with the FEZ Panda II

First of all: using the ethernet connection with the FEZ Panda II works well if you follow the steps from GHIElectronic’s eBook “FEZ Internet of Things”. You just set up MAC, IP, netmask, gateway and DNS server settings and you are ready to go.

But, there is actually a drawback: although the FEZ Panda II uses the .NET Microframework 4.x (NETMF), it does not fully support the System.Net namespace due to resource limitations of the device!

This means that all code using System.Net from the NETMF will not work, giving you a System.NotSupportedException. One disadvantage of this is, that most 3rd party NETMF projects using networking will not work as well.

The workaround to this problem is to use the network classes provided by GHIElectronics. In detail, it helps to add the following references to your project:

  • GHIElectronics.NETMF.Net
  • GHIElectronics.NETMF.W5100
  • GHIElectronics.NETMF.W5100.Http

Those references provide all the classes used to successfully establish network connections via TCP or UDP. As said above, the examples in the eBook are very useful, so I’ll not go into detail here ;)

Now that I basically got the network connection working I’m going to think about some example usages and over the course of the next weeks I’ll share my observations (and maybe some code too) here.

Choosing a private MAC address

When doing some research for connection my Netduino to the local network (using the Connect Shield) I stumbled upon the fact that I not only need to set the IP adress, network mask and gateway, but also the device’s MAC address – something that you normally don’t need to do because the vendor of the network device burned a globally unique MAC address into the device.

While it should not be a serious problem to randomly generate a MAC address (which might interfer with a real device’s MAC address somewhere on the planet) I wanted to do it “the right way”. There are many hints on the internet how to choose a private MAC address, mainly for use in virtual computers and many information about the pattern how MAC addresses for vendors are built.

So, to cut a long story short, I’ve come to the conclusion that it can be considered safe to use a MAC address starting with 01 followed by a random combination. I’ll give it a try and if it doesn’t work, then I’ll do some more in-depth research on the topic ;)