FEZ PANDA II WITH SEEED GPRS / GSM SHIELD PROBLEM

I have a panda II board and an Seeed GPRS shield (seeedstudio.com/wiki/index.p … ield_v0.9b) The problem is that I cannot send a SMS, I use the following code and get no errors. Nothing happen. Please help. :confused: :confused:

On the GPRS shield I use the jumpers in Xduino position so I can use the COM1 port of the PANDA.

[code] static SerialPort GSM = new SerialPort(“COM1”, 19200, Parity.None, 8, StopBits.One);

    public static void Main()
    {

        Debug.Print("wait 30 sec startup gsm");
        for (int i = 0; i < 30; i++)
        {
            Thread.Sleep(1000);
            Debug.Print(i.ToString());
        }

        sendSMS("testSMS");

    }
    static string sendCommand2GSM(string command, int delay)
    {
        byte[] bytes = Encoding.UTF8.GetBytes(command);
        GSM.Write(bytes, 0, bytes.Length);
        Thread.Sleep(delay);
        byte[] inData = new byte[GSM.BytesToRead];
        GSM.Read(inData, 0, GSM.BytesToRead);
        string str1 = new string(Encoding.UTF8.GetChars(inData));
        return str1;
    }


    static void sendSMS(string message2Send)
    {
        try
        {
            GSM.Handshake = Handshake.None;
            GSM.Open();
            Debug.Print("gsm conn open");
            string GSMResponse = "";
            string GSMCommand = "";
            GSMCommand = "AT+CMGF=1";
            GSMResponse = sendCommand2GSM(GSMCommand + "\n\r", 1000);
            Debug.Print("send start command");
            GSMCommand = "AT+CMGS=\"0681480290\"";
            GSMResponse = sendCommand2GSM(GSMCommand + "\n\r", 1000);
            Debug.Print("send sms");
            GSMResponse = sendCommand2GSM(message2Send + (char)26, 15000);
            Debug.Print("done");
        }
        finally
        {
            GSM.Close();
        }
    }[/code]

Hi~

Something you need to know:
1.the GPRS can work only be sent command of serial , when your jumper connected Xduino , mean you used the hardware serial of arduino(D1/D2).
2.send command like this code:

 Serial.print("AT+CMGF=1\r");

the “\r” is necessary , not necessary include of " \n"

regards,
deray