Trying to get a Fez Connect Shield working with a Fez Domino

HI,
I am trying to connect to a Fez Connect Shield + Fez Domino and not having much luck
(I had a project with this working years ago and tried the old code by no luck)

Here is the code:

        const Int32 c_port = 80;
        byte[] ip = { 192, 168, 1, 199};
        byte[] subnet = { 255, 255, 255, 0 };
        byte[] gateway = { 192, 168, 1, 1 };
        byte[] mac = { 0x54, 0x6F, 0x60, 0x61, 0x73, 0x7A };
        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);
        NetworkInterface.EnableStaticDns(new byte[] { 192, 168, 1, 1 });
        Socket server = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
        IPEndPoint localEndPoint = new IPEndPoint(new IPAddress(ip), c_port);
        server.Bind(localEndPoint);
        server.Listen(1);
        Debug.Print(server.LocalEndPoint.ToString());
        while (true)
        {
            // Wait for a client to connect.
            Socket clientSocket = server.Accept();
  • The local server IP print as : 0.0.0.0:0
  • JMP1 is soldered on the shield
  • I’ve tried 2 shields (both v1.5) and both behave the same
  • Domino is v1.1
  • My managed switch, see the MAC address i’ve entered
  • The leds are all working on the shield
  • I get the same behaviour whether the shield is plugged in or not!! :confused:
  • The error output is:

Exception System.Exception - 0x00000000 (1)

#### Message: Fail[invalid ip,port]

#### GHIElectronics.NETMF.Net.SocketNative::accept [IP: 007f] ####
#### GHIElectronics.NETMF.Net.Sockets.Socket::Accept [IP: 0023] ####
#### NetLib4._1TestAppDominoConnentShield.Program::Main [IP: 009e] ####

A first chance exception of type ‘System.Exception’ occurred in GHIElectronics.NETMF.W5100.dll

I know there are very old discussions about this but none of the links work.
Does anyone have any suggestions?

Try different MAC?

Is your gateway 192.168.1.1 or 192.168.0.1?

Hi,
I tried many different MACs now, none seem to make a difference. Does matter what it is? I’ve tried random, I even tried the one when i worked years ago
My gateway is 192.168.1.1

What I find most worrying, is I get exactly the same behaviour whether I have the hardware shield plugged in or not…

So, it makes me think the domino isn’t even communicating with the shield…

(I think perhaps when I had it working in the past maybe I was using the Panda II board not the domino. )

How about delay a bit

NetworkInterface.EnableStaticDns(new byte[] { 192, 168, 1, 1 });

Thread.sleep(10*1000);

then print local IP?

socket wont work if ip is still 0.0.0.0.

And because it is static IP, any device else use same IP?

Sadly, both no good. I tried sleep 60secs, and I tried a different IP. :frowning:

I am only using power from USB. Do I need to use external power into 9V socket?

const Int32 c_port = 80;
        byte[] ip = { 192, 168, 1, 199};
        byte[] subnet = { 255, 255, 255, 0 };
        byte[] gateway = { 192, 168, 1, 1 };
        byte[] mac = { 0x54, 0x6F, 0x60, 0x61, 0x73, 0x7A };
        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);
        NetworkInterface.EnableStaticDns(new byte[] { 192, 168, 1, 1 });

      Thread.Sleep(-1);

From PC try to ping 192.168.1.199

If you can’t ping then can’t do anything else. Step by step first.

trying with an external power source would be a smart option. From memory, the WIZ chips had decent power draw requirements so relying on the USB for that to work would not be a good idea

Hey guys,
Thanks for helping out. I know these devices are very old… :slight_smile:

So… some good news and ‘I’m still confused’ news.

Good: I tried something different this morning. I swapped the Domino with a Panda II board and it worked straight away. No issues at all.

‘Confused’: But the annoying thing is a still have a couple of domino board (not Panda II’s) which I wanted to finish a project with and use the shields with.

Surely, swapping proves that it is the Domino board which is misbehaving?

If so, is the only possible difference the firmware? (As i think both boards use the same chipset?)

My next thought was to see the firmware version on the boards. I loaded the ‘USBIzi Updater’, and tried the steps. ie. Press and hold, LDR, Press and release Reset, then release LDR

But the app just keep response with ‘No response from device’ when I then try and do a ‘ping’ or ‘get firmware version’

Am I not doing the right thing?