Can not perform ChatServer and ChatClient, help me!

Hello, I found problems when I tried to do experiment with ChatServer and ChatClient using 2 of my PC (Notebook and Netbook)

I am using Arduino UNO and Arduino Ethernet Shield and pile those up.
Then I have connect my Notebook to UNO using RS-232 and my Ethernet shield to Netbook using LAN cable.
Then I compile ChatServer in my Notebook then I upload it, then I compile ChatClient in my Netbook.
Then I open for the serial monitor of Notebook, but it show none.

Is there any wrong with my cable connection? or my steps?
Or I lose some step to do? Telnet?

I get the code of ChatServer (http://arduino.cc/en/Tutorial/ChatServer)and ChatClient (http://arduino.cc/en/Tutorial/ChatClient).
I insert mac address same with my Ethernet Board mac address.

This what I insert in my ChatServer:

...
byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0xFE, 0xAC }; //same with the sticker
IPAddress ip(192,168,1, 27); // same with my Notebook LAN IP address
IPAddress gateway(192,168,1, 1);
IPAddress subnet(255, 255, 0, 0);
...

This what I insert in my ChatClient:

...
byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0xFE, 0xAC }; //same with the sticker
IPAddress ip(192,168,1, 42); // same with my Netbook LAN IP address
...

Anyone can help me? I'm really newbie in Networking and Microcontroller

Vielen Dank.

IPAddress ip(192,168,1, 27); // same with my Notebook LAN IP address
IPAddress ip(192,168,1, 42); // same with my Netbook LAN IP address

Are you saying those are the IP addresses of your notebook and netbook?

They should be the IP address you are giving your Arduino, and must be different (in the last number) to any other device on your network.

IPAddress ip(192,168,1, 27); // same with my Notebook LAN IP address
IPAddress ip(192,168,1, 42); // same with my Netbook LAN IP address

Are you saying those are the IP addresses of your notebook and netbook?

Yes, this is IP address of Ethernet adapter Local Area Connection of my notebook and netbook.

dxw00d:
They should be the IP address you are giving your Arduino, and must be different (in the last number) to any other device on your network.

I GIVE IP address to my Arduino Ethernet Shield? any number?

Yes, the sketch is not using DHCP, so you need to set the IP address. It should be on the same subnet as your existing machines, so the first three numbers should be the same (192,168,1) and the last number needs to be unique on your network, and preferable outside your router's DHCP scope. I would try

IPAddress ip(192,168,1, 99);

unless you already have 99 machines on your network.

So, in my ChatServer, I write:

...
IPAddress ip(192,168,1, 77);
IPAddress gateway(192,168,1, 77);
IPAddress subnet(192, 168, 1, 77);
...

and in my ChatClient, I write:

...
IPAddress ip(192,168,1,77);

// Enter the IP address of the server you're connecting to:
IPAddress server(1,1,1,1);
...

am I right?

No. There was no need to change these:

IPAddress gateway(192,168,1, 1);
IPAddress subnet(255, 255, 0, 0);

Unless you are trying to connect to the APNIC Debogon Project in Australia, you probably need to change:

// Enter the IP address of the server you're connecting to:
IPAddress server(1,1,1,1);

So, I should write for ChatServer:

...
IPAddress ip(192,168,1, 77); // this is for the Arduino IP Address
IPAddress gateway(192,168,1, 1);
IPAddress subnet(255, 255, 0, 0);
...

then for the ChatClient:

...
IPAddress ip(192,168,1,77);

// Enter the IP address of the server you're connecting to:
IPAddress server(1,1,1,1);

Am I right?
if so, what should I do to chat?

Do you have two Arduinos? Both the ChatServer and ChatClient have to run on an Arduino/Ethernet shield.

I only have one Arduino UNO and one Arduino Ethernet Shield, I pile those up.

My notebook connect to the UNO using RS 232 then my Arduino Ethernet Shield connect to my Netbook using straight LAN cable.

Both the ChatServer and ChatClient have to run on an Arduino/Ethernet shield

How to run both of them? compile it? or upload it?
I have upload the ChatServer to Arduino UNO but I can not upload the ChatClient to Arduino Ethernet Shield since it only connect via LAN cable no RS 232.

You can't run both at the same time. Both of those sketches need an ethernet shield, they aren't designed to run over serial.

You can't run both at the same time

Run?You mean compile it?or upload it?
I think if I use my notebook to upload the ChatServer to Arduino then upload again the ChatClient, so the ChatServer will be replaced..
What do you think?

Both of those sketches need an ethernet shield, they aren't designed to run over serial.

Is there something wrong with my device connection?

What are you actually trying to achieve?

You can upload either of the sketches to the Arduino/Ethernet shield. If you upload one, then the other, the second will overwrite the first.

dxw00d:
What are you actually trying to achieve?

You can upload either of the sketches to the Arduino/Ethernet shield. If you upload one, then the other, the second will overwrite the first.

What I am trying to achieve is I can chat between this two of my netbook and notebook using ChatServer and ChatClient.

Hmm, how I can upload the sketch to Ethernet Shield since I use only LAN cable to connect it to my netbook?

Both the ChatServer and ChatClient have to run on an Arduino/Ethernet shield

How you do this?Can you tell me the steps?

What I am trying to achieve is I can chat between this two of my netbook and notebook using ChatServer and ChatClient.

You can't do that with only one Arduino and Ethernet shield.

You can't upload a sketch to the Ethernet shield. The sketch runs on the Arduino that the shield is attached to.

You would need two Arduinos, each with an Ethernet shield.

 Chat  Server
 
 A simple server that distributes any incoming messages to all
 connected clients.  To use telnet to  your device's IP address and type.
 You can see the client's input in the serial monitor as well.
 Using an Arduino Wiznet Ethernet shield. 
 
 Circuit:
 * Ethernet shield attached to pins 10, 11, 12, 13
 * Analog inputs attached to pins A0 through A5 (optional)

But when I see the sketch comments, it seems like I just need an Arduino and an Ethernet Shield.
What do you think?How about the "Telnet" things?maybe we forgot that?

Try it and see. You have the hardware.

Finally, it can work!

I give this input sketch to my notebook:

...
IPAddress ip(192,168,1, 77);
IPAddress gateway(192,168,1, 77);
IPAddress subnet(192, 168, 1, 77);
...

then I upload it to my arduino UNO

Then this input sketch to my netbook:

...
IPAddress ip(192,168,1,77);

// Enter the IP address of the server you're connecting to:
IPAddress server(1,1,1,1);
...

Then I open RUN, then type TELNET, then type o 192.168.1.77 [23] in my netbook and in my notebook

Finally it results that everytime I type something in cmd in my netbook, it will also appears on my netbook (in serial monitor)

But I still want to improve it...
Vielen Dank for your all input and suggest. :smiley: