Domino + Arduino Ethernet Shield V6

Hi all

I am having a problem when trying to the the sample network code. It fails on the line that says Socket clientSocket = server.Accept()

I get the following error:

#### GHIElectronics.NETMF.Net.SocketNative::accept [IP: 007f] ####
#### GHIElectronics.NETMF.Net.Sockets.Socket::Accept [IP: 0023] ####
#### MySocketServer::Main [IP: 00d8] ####

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

Additional information: Fail[invalid ip,port]

Below is my code, can anybody help? I’ve been trying everything without any luck.

    public static void Main()
    {

        byte[] mac = { 0x90, 0xA2, 0xDA, 0x00, 0x43, 0x97 };
        WIZnet_W5100.Enable(SPI.SPI_module.SPI1, (Cpu.Pin)FEZ_Pin.Digital.Di10, (Cpu.Pin)FEZ_Pin.Digital.Di7, true); // WIZnet interface on FEZ Connect
        byte[] ip = { 172, 21, 220, 206 };
        byte[] subnet = { 255, 255, 248, 0 };
        byte[] gateway =  { 172, 21, 220, 1 };

        NetworkInterface.EnableStaticIP(ip, subnet, gateway, mac);
        NetworkInterface.EnableStaticDns(new byte[] { 172, 21, 220, 34 });
        
        Socket server = new Socket(AddressFamily.InterNetwork,
        SocketType.Stream, ProtocolType.Tcp);

        IPEndPoint localEndPoint = new IPEndPoint(IPAddress.Any, 80);

        server.Bind(localEndPoint);
        server.Listen(1);

        while (true)
        {
            // Wait for a client to connect.
            Socket clientSocket = server.Accept();

            // Process the client request. true means asynchronous.
            //new ProcessClientRequest(clientSocket, true);
        }
    }

Hello !

You probably need to modify your shield a bit. Seee the wiki : GHI Electronics – Where Hardware Meets Software
(The SPI pins are not the same).

Good luck :wink:

Thanks Nicolas3, that sorted me out. Ethernet working like a charm now!

I don’t know if I’m blind or something, but I don’t see a trace running to the 3.3v pin, maybe they fixed that on the V6.

Thanks again for the quick response and helping me out!