Arduino-Arduino Communication using Internet.

Hello, I came up with quite different idea to communicate b/w two arduino devices using internet.

I am using two of 328 arduinos and two normal ethernet sheilds. what I am thinking to do is to communicate using Rs232 serial communication.

Can anyone help me out in what to do and who to make them communicate using internet,or any other idea of doing this communication please. m not good in this device. Thanks for looking. Regards.

If you have ethernet shields, the idea is to get rid of the wire between the Arduinos. Using serial needs a wire between the,

The Arduino can run client and server code (small client and small server) simultaneously. So, one client can call on the other server, and vice versa.

So, what do want to do with the serial port, and why would you transform the TTL levels that the Arduino uses to RS232 levels just to send down the wire (and need to convert back to TTL levels) you don't need?

How can I do to use one server/client in the same project? Because, I'm trying to communication two Arduino through internet (Ethernet Shield)?

Regards

Get started with the examples on http://arduino.cc/en/Tutorial/HomePage try to understand how they work before moving on, networking seems simple but can be quite complicated.

One of your Arduinos will have code that makes it act as a web server and the other Arduino will act like a browser, sending web requests to it.

The data can go in both directions because you can send a web request from Arduino B to Arduino A and that request can both contain data to send in the request parameters and receive values back in response from the server (A).

The choice of which Arduin acts like a server then just becomes a matter of which Arduino needs to initiate the communication.

Could be me, but why not forego the overhead of HTTP? Just open a socket to the other arduino... I'm fairly sure I've seen an example of that.

Just open a socket to the other arduino.

You could use raw sockets, using UDP instead of TCP, there are dozens of protocols to be used. See IANA http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml And looking only at TCP/UDP there are protcols build on top of that like HTTP, See http://www.iana.org/assignments/port-numbers As you can see HTTP is not the only choice but then again I think it is one of the most used, better understood ones.

And yes, you can ask IANA for a port and/or protocol number for your own dedicated protocols. BTW, the fact that these numbers are registered doesn't mean too much. e.g. HTTP on other ports is quite common.

Question is why you want those two Arduino's talk to each other? What do they chat about? Please tell us something about what kind of information should be exchanged? That helps for choosing the right/ meaningfull protocols.

Thanks.... But .... I need both Arduinos acts like a WebServer and WebClient. Because I need receive and sending data from two Arduinos. I konw its not possible the two Arduinos initiate a communication together, but this is ok. I need only one per time. My application is simple, I need to turn an LED connected to Arduino1 through a button in Arduino2. And turn on other LED connected to Arduino2 through a button in Arduino1. Everything though internet.