SMS Via Comport AT+ commands

I use Delphi and want to send SMS via the COM Ports + Mobile phone combination.
I am using the AT+ commands but I get SMS which includes the commands. I want only the message to come.
Sample SMS



Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shaun VermaakTechnical Specialist IVCommented:
Please add some code...

What happens if you omit the AT commands, perhaps they are not used if you get these commands in the message string?
Allan_FernandesAuthor Commented:
This is the code. If I skip any line it does not work

// DFM has  object ComPort: TComPort

procedure Tform_Starter.Button8Click(Sender: TObject);
  n:Integer ;
  ComPort.Port:='COM3' ;
  ComPort.BaudRate:=br9600 ;
  ComPort.Parity.Bits:=prNone  ;
  ComPort.DataBits:=dbEight ;
  ComPort.StopBits:=sbOneStopBit ;
  ComPort.Open ;
  if ComPort.Connected then
    memo_Text.lines.add('Not Connected') ;

  sleep(4000) ;

  sysSndStr:='AT+CMGF=1'+#13#10 ;
  n:=ComPort.WriteStr(sysSndStr) ;
  memo_Text.lines.add(IntToStr(n)) ;
  sleep(4000) ;

  sysSndStr:='AT+CMGS="9867015256"'+#13#10+'"HI"'+#26+#13#10 ;
  n:=ComPort.WriteStr(sysSndStr) ;
  memo_Text.lines.add(IntToStr(n)) ;

  sleep(4000) ;

  ComPort.Close  ;

Open in new window

Allan_FernandesAuthor Commented:
I tried Synapse and it worked fine

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Allan_FernandesAuthor Commented:
of late Experts Exchange has never been able to provide me solutions. Quality has fallen badly
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.