title: Send sms through AT Command acts weird
body: <p>I am using ComPort component to send SMS messages via a modem the problem is that sometimes i get sms sometimes not sometimes i get the at commands in the body of the text message.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>procedure SendSmsCosmote(numar,text : string);
  const
    buf : Byte = 26;
  begin
    Form1.ComPort1.WriteStr('AT+CMGF=1'+#13#10);
    Form1.ComPort1.WriteStr('AT+CMGS="'+ numar + '"'+#13);
    Form1.ComPort1.WriteStr(text);
    Form1.ComPort1.Write(buf,1);
  end;
  </code></pre>
  
  <p>What am I doing wrong? And why when I read from the modem I get what I sent on the tx line?</p>