Passing Serial to Ethernet communication

Hi, I have a program that uses serial communication and it works just fine. Now I want instead using a serial communication I want to change the program for communicating through Ethernet using the Arduino Ethernet Shield. What do I have to change? I already put the SPI and Ethernet library in the code, IP, MAC and Ethernet.begin(mac, ip); but it still doesn’t work.
Any help please!!

but it still doesn’t work.

That's a real shame. Too bad you didn't post any code, or explain what the heck "it doesn't work" means.

sorry here is the code;

#include <SPI.h>
#include <Ethernet.h>

byte mac = { 0x90, 0xA2, 0xDA, 0x00, 0x8A, 0xB7 };
byte ip = { 192,168,1, 177 };
byte server = {192,168,1, 254 };

Client client(server,80);

unsigned long ethernetdata;
int inbyte;
int pinNumber;
int sensorVal;
int analogRate;
int digitalState;

void setup()
{

Ethernet.begin(mac, ip);

}

void loop()
{

getEthernet();
switch(ethernetdata)
{
//Case 1: escrita de analogico ou digital
case 1:
{

getEthernet();
switch (ethernetdata)
{
case 1:
{
//Escrita analogica
getEthernet();
pinNumber = ethernetdata;
getEthernet();
analogRate = ethernetdata;
pinMode(pinNumber, OUTPUT);
analogWrite(pinNumber, analogRate);
pinNumber = 0;
break;
}
case 2:
{
//Escrita digital
getEthernet();
pinNumber = ethernetdata;
getEthernet();
digitalState = ethernetdata;
pinMode(pinNumber, OUTPUT);
if (digitalState == 1)
{
digitalWrite(pinNumber, LOW);
}
if (digitalState == 2)
{
digitalWrite(pinNumber, HIGH);
}
pinNumber = 0;
break;

}
}
break;
}

case 2:
{
getEthernet();
switch (ethernetdata)
{
case 1:
{
//Leitura analogica
getEthernet();
pinNumber = ethernetdata;
pinMode(pinNumber, INPUT);
sensorVal = analogRead(pinNumber);
Serial.println(sensorVal);
sensorVal = 0;
pinNumber = 0;
break;
}
case 2:
{
//Leitura digital
getEthernet();
pinNumber = ethernetdata;
pinMode(pinNumber, INPUT);
sensorVal = digitalRead(pinNumber);
Serial.println(sensorVal);
sensorVal = 0;
pinNumber = 0;
break;
}
}
break;
}
}
}
long getEthernet()
{
ethernetdata = 0;
while (inbyte != ‘/’)
{
inbyte = Serial.read();
if (inbyte > 0 && inbyte != ‘/’)
{

ethernetdata = ethernetdata * 10 + inbyte - ‘0’;
}
}
inbyte = 0;
return ethernetdata;
}

I’m using the hypertherminal (TCP/IP (Winsock)) to send and receive communication from the arduino.

long getEthernet()
{
  ethernetdata = 0;
  while (inbyte != '/')
  {
    inbyte = Serial.read();

The ethernet shield is not connected to the serial port. So, why are you reading from the serial port?

You created a client, but never bother trying to connect that client to the server, seeing if the client is connected, or if the client has any data to read.

Why does the getethernet() function return a global variable? If it really needs to return a value, why isn't the returned value captured?

I'm using the hypertherminal (TCP/IP (Winsock)) to send and receive communication from the arduino.

I'd recommend that you try connecting to a real server, and understand client/server communications, first.