code for sending sms in pdu mode
<p>I m trying this code for sending sms in text mode but this code is not working for pdu mode when i change <code>AT+CMGF=0</code>, so what should i do? </p>

<pre><code>bool isSend = false;
string recievedData = ExecCommand(port, "AT", 300, "No phone connected");
recievedData = ExecCommand(port, "AT+CMGF=1", 300, "Failed to set message format.");
String command = "AT+CMGS=\"" + PhoneNo + "\"";
recievedData = ExecCommand(port, command, 300, "Failed to accept phoneNo");
command = Message + char.ConvertFromUtf32(26) + "\r";
recievedData = ExecCommand(port, command, 5000, "Failed to send message"); //3 seconds
if (recievedData.EndsWith("\r\nOK\r\n"))
{
    isSend = true;
}
else if (recievedData.Contains("ERROR"))
{
    isSend = false;
}
return isSend;
</code></pre>
