UDP Packet received not showing up in Serial Monitor

Hi guys,

I have a problem receiving UDP packet from another IP address in m arduino. Well, im restricted to take a side with "seeing UDP packet arriving in arduino" or "using my arduino's serial monitor and lsoe the UDP" . Ofcourse its a lack of knowledge. here is my problem;

Im Usinf DFRobo wifi shield based on Wizfi210. I have set it up as UDP server on port 5000 using the WizfiSmartScript. Perfect till now. Then i went to a program called Packet Sender to send test UDP packets to the Arduino Ip address. Perfect till now. So now comes the problem. I open serial monitor and i see nothing. I uploaded my code to arduino that uses a serial monitor on 115200 baud. But, when i upload the basic Blink code to arduino, and set my Switches on Wifi shield from WIFI to USB, I see the UDP packet arriving on Arduino's Serial monitor. If i change the switch to WIFI,still on same code, nothing shows up. The only way im seeing the UDP packet on serial monitor is when i upload the blink code to arduino (Blink code doesnt use serial monitor...if that helps) and set the switch to USB. But i want to se the UDP packet along with my arduino code that uses serial.begin - How can i just use UDP in my code normally just like i can use TCP. here is my code that im trying to use with UDP ( the sen UDP packet is of the form 10 20 30 40, so this code should divide it into four ints...it works well on TCP).

String inData;
char charBuf[20];
int partOne;
int partTwo;
int partThree;
int partFour;
char *token;

void setup() {
Serial.begin(115200);
pinMode(3, OUTPUT);
analogWrite(4,LOW);
delay(10000);

}

void loop() {
while (Serial.available() > 0)
{
char recieved = Serial.read();
inData += recieved;

// Process message when new line character is recieved
if (recieved == '\n')
{
inData.toCharArray(charBuf, 20) ;
token = strtok(charBuf, " ");
//Serial.print(inData);
// token should be 192

if(token)
partOne = atoi(token);
token = strtok(NULL, " ");
// token should be 128
if(token)
partTwo = atoi(token);
token = strtok(NULL, " ");
// token should be 1
if(token)
partThree = atoi(token);
token = strtok(NULL, " ");
// token should be 50
if(token)
partFour = atoi(token);
Serial.println(partOne);
Serial.println(partTwo);
Serial.println(partThree);
Serial.println(partFour);
analogWrite(3, partOne);
inData = ""; // Clear recieved buffer
}
}
}

Urgent help is required please !!!!