3Gshield + arduino mega2560 rev3 Taking picture issue

Hi,

Currently im doing a project on transferring image via 3G connection and i just got my 3G shield and mega 2560 rev3 board .

I have serial comm jumper on USB side, ensure the camera is connected correctly(metal side facing up)

and initial test on the camera sensor if its working:

serial monitor:
AT
OK
AT+CCAMS
OK

so i continued with using a sample code to try taking picture

int led = 13;
int onModulePin = 2;        // the pin to switch on the module (without press on button) 

int x = 0;

char name[20];

void switchModule(){
    digitalWrite(onModulePin,HIGH);
    delay(2000);
    digitalWrite(onModulePin,LOW);
}

void setup(){

    Serial.begin(115200);                // UART baud rate
    delay(2000);
    pinMode(led, OUTPUT);
    pinMode(onModulePin, OUTPUT);
    switchModule();                    // switches the module ON

    for (int i=0;i < 5;i++){
        delay(5000);
    }   

    Serial.println("AT+CCAMS");     //starts the camera
    while(Serial.read()!='K');

    Serial.println("AT+CCAMSETD=640,480");     //sets VGA (640*480) resolution
    while(Serial.read()!='K');
    
    Serial.println("AT+FSLOCA=0");     //stores the image file in the 3G module
    while(Serial.read()!='K');
    

}

void loop(){

    delay(1500);
    while(Serial.available()!=0){
        Serial.read();
    }
    Serial.println("AT+CCAMTP");     //takes a picture, but not saved it
    while(Serial.read()!='K');  

    Serial.println("AT+CCAMEP");     // saves the picture into C:/Picture    
    Serial.flush();     
    while(Serial.read()!='/');
    while(Serial.read()!='/');

    x=0;
    do{
        while(Serial.available()==0);
        name[x]=Serial.read();
        x++;
    }while(x < 19);

    while(Serial.read()!='K');  
    Serial.println(name); 

    Serial.println("AT+CCAME");     // stops the camera
    while(Serial.read()!='K');  

    while(1);
    
}

Right after uploading the code,

my serial monitor shows:
AT+CCAMS

which means there is no reply from the 3G shield

i just couldnt figure out what is the problem

regards

You seem to be using the same serial port to talk to the camera, and to display output on the serial monitor. Is there some trick here that makes that a reasonable thing to do?

sorry but can you explain what you mean by same serial port?