Fez Domino + Connect Shield + LAN

Hi everybody.

I have been playing with the Fez Domino + Connect Shield. I have wrote a program based on sockets.
My problem is connectivity. I have plugged my LAN-cable into my Router and enabled DHCP.
This works fine, but I would like to plug the LAN-cabel directly into my PC, so I have a connection between the Connect Shield and Ethernet on my PC.
I probably won’t be able to access the internet, but this is okay if I can get it to work as a localhost solution.

But DHCP obviously does not work when connected directly to my PC, så how do I find an IP to access the Fez Domino device?

Assign a static IP and use a crossover cable.

Cool, but can you be a bit more specific?

Something like this?

byte[] ip = { 192, 168, 0, 200 };
byte[] subnet = { 255, 255, 255, 0 };
byte[] gateway = { 192, 168, 0, 1 };
byte[] mac = { 0x00, 0x26, 0x1C, 0x7B, 0x29,0xE8 };
WIZnet_W5100.Enable(SPI.SPI_module.SPI1, (Cpu.Pin)FEZ_Pin.Digital.Di10,
(Cpu.Pin)FEZ_Pin.Digital.Di7, true);
NetworkInterface.EnableStaticIP(ip, subnet, gateway, mac);

But how do I find out the values to put in ip, subnet, gateway etc? I know i can find som information with ipconfig in the cmd, but which values should I use?

On your PC, run cmd and type ipconfig /all . This will give you the subnet, gateway, and DNS values. If you are not your own network administrator, ask him or her for a static IP to match the subnet you are on.

Also, please use code tags for an code you post on this forum. Makes it a lot easier to read.

Actually, what you will find with a typical PC using DHCP is that if you use a network link between two “devices” where one isn’t a DHCP server, they should go into auto configure mode and give you an address in the 169.x.x.x address space. A Fez will not do this, so if you want to just use a Fez and PC directly connected together you would need to implement the Auto Discover behaviour yourself, OR you could set a permanent IP address on both the PC and the Fez that was on the same network address range.

So it comes down to what your use-case is. If you just want this to work on your PC and you’re ok making manual changes, just set fixed IP addresses on both ends and you’re done. If you want to have this portable and so it’d work anywhere, anytime, on anyone’s PC, then you need to look at matching the auto configure behavior.