Hello Everyone,
I have an Arduino Mega and a W5100 Ethernet Shield. I am trying to post some data from the Arduino board to the XAMPP server running on my computer. I do not have a router so I have directly connected my Ethernet shield stacked onto the Arduino Mega to the laptop's Ethernet port via an RJ45 cable. I have also assigned the Ethernet connection a static IP address 192.168.0.1 and my localhost page opens when I put this address in my browser.
In my Arduino sketch I have assigned the Arduino shield an IP address 192.168.0.4, i.e. on the same IP segment. When I try to do client.connect to the server (192.168.0.1), i.e. localhost, I get "Connection failed".
ethernet_test21.ino (1.18 KB)

