The Godfather talking
You can run, but you can't hide.
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 24, 2024, 08:01:32 20:01


Login with username, password and session length


Pages: 1 [2]  All
Print
Author Topic: How to connect Ethernet Shield as client with PC, with router in between?  (Read 10076 times)
0 Members and 1 Guest are viewing this topic.
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #25 on: February 13, 2015, 05:03:10 05:03 »

I think you confused with DHCP Server-Client and Application Server-Client. Hope below wiki provide a little explanation
http://en.wikipedia.org/wiki/Client%E2%80%93server_model

If keep using your current architecture. Your major issue is only "How Arduino knows PC IP address is?" when PC is varying.

My suggestion is to implement Arduino in "Server" mode. Seek for Ethernet "Server" class on Arduino API, you should have a clue on what may be. Hope this help.


Yeah! i am confused little bit, initially i had to make my Arduino Ethernet Shield as Client and my PC as server, with direct connection it works fine.
But when they both are connected to router, then it PC and Ethernet Shield is working as client for Router.
I can't implement my Arduino Ethernet Shield as Server, as the project i am doing is very big and it will be a mess to setup my Arduino as server.
I just have to keep IP address of my PC as static.
Logged
bigtoy
Active Member
***
Offline Offline

Posts: 238

Thank You
-Given: 337
-Receive: 297


« Reply #26 on: February 16, 2015, 04:45:03 04:45 »

Yes, you can set your PC to have a static IP address. Or, some routers allow you to assign a static IP to clients, in which case your PC can remain using DHCP and the router will always give it the same address.

Just make sure the Arduino and and the PC both are within the same subnet, ie, their IP addresses are almost the same.
Logged
kreutz
Active Member
***
Offline Offline

Posts: 183

Thank You
-Given: 994
-Receive: 125


« Reply #27 on: February 17, 2015, 01:30:38 13:30 »

...... it will be a mess to setup my Arduino as server.
I just have to keep IP address of my PC as static.

You can set both IPs as static without any problems/complications at all, also using your arduino shell as a server is just as simple as using it as a client.
Logged
kreutz
Active Member
***
Offline Offline

Posts: 183

Thank You
-Given: 994
-Receive: 125


« Reply #28 on: February 17, 2015, 03:04:02 15:04 »

Arduino Ethernet Shield Web Server Tutorial: http://startingelectronics.com/tutorials/arduino/ethernet-shield-web-server-tutorial/
Logged
Pages: 1 [2]  All
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC