hi,
i have a temperature sensor connected to my ethernetshield and the shield to an arduino uno.
When i change the code of the webserver example a bit so i can read in degrees centigrade it works, but only when i connect straight to my computer and i need to change the ip of my pc to be in the same range.
When i connect to my router and then to my pc i can't connect any more.
yyy898:
i have a temperature sensor connected to my ethernetshield and the shield to an arduino uno.
When i change the code of the webserver example a bit so i can read in degrees centigrade it works, but only when i connect straight to my computer and i need to change the ip of my pc to be in the same range.
When i connect to my router and then to my pc i can't connect any more.
Connecting an Arduino webserver to your PC instead of to your router sounds wrong.
So that seems to be a LAN problem, no Arduino problem.
A typical home network configuration is:
router connected to internet service provider (router "WAN" port)
each station (PC, Arduino network shield) is connected to the router (router "LAN" ports)
If your router has not enough LAN ports, you need an additional "home LAN switch" to multiply the number of LAN ports in your network.
Find out your IP configuration. When you are on Windows 7, open a command interpreter window (execute "cmd.exe") and run the command ("ipconfig"). The values for IPv4 address, default gateway and subnet mask will give you some informations about the configuration you may use with your Arduino.
If for example:
IPv4 address: 192.168.2.200
subnet mask: 255.255.255.0
default gateway: 192.168.2.1
Then you just select an IP address if 192.168.2.x where 'x' is replaced by a number in the range 2..254 which is NOT already in use by some other device in your network.
yyy898:
ok, changed the ip of arduino to 192.168.0.177, and i changed the port to 8080 (just in case 80 is blocked for some reason)
As your LAN network seems to be operating at 192.168.0.x addresses, IP 192.168.0.177 should be fine for your Arduino webserver. I cannot see any problem.
If you have any problems, please check:
Do you have an "Ethernet Shield with Wiznet W5100", or is your hardware different?
What is the output when pinging the IP address with ICMP echo requests?
ping 192.168.0.177
How much experience do you have with networking? Are you familiar with the assignment of IP addresses, netmasks and gateways?
You must assign an IP to the Arduino that is within the netmask range of the localnet your PC is on. Use an IP that is outside the IP range of the localnet DHCP server.
jurs:
As your LAN network seems to be operating at 192.168.0.x addresses, IP 192.168.0.177 should be fine for your Arduino webserver. I cannot see any problem.
If you have any problems, please check:
Do you have an "Ethernet Shield with Wiznet W5100", or is your hardware different?
What is the output when pinging the IP address with ICMP echo requests?
ping 192.168.0.177
Please check mechanical connections between UNO and Ethernet shield.
Especially when combining "compatible" no-name boards with each other, the following problems may arise with the 6-pin ISP connection between both boards:
male headers too short
==> possibly short circuit between UNO-USB and soldering side of Ethernet shield
male headers too long
==> possibly the 6-pin ISP header connection will not fit correctly
Please check mechanical stacking of the shield and take special care that:
no short circuit between UNO USB and soldering side of shield can occur and
that the 6-pin ISP header between UNO and shield create a firm connection
Same problem here. Ip, Subnet, Mac all in range, but there is no local connection. D-link DL524 router and TP-Link WR840N router too (both are not working). I have another TP-Link router, the same UNO is working fine there.