Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi TComPort - send AT commands. Two or more commands (https://www.delphipraxis.net/85623-tcomport-send-commands-two-more-commands.html)

mr_fahrrad 2. Feb 2007 11:57


TComPort - send AT commands. Two or more commands
 
Hi,
In the code:

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
  ComPort1.WriteStr('AT' + chr(13));
  ComPort1.WriteStr('ATI1' + chr(13));
end;
Only the first command is executed, how i make to the two command be executed?

v2afrank 2. Feb 2007 12:06

Re: TComPort - send AT commands. Two or more commands
 
I guess you send both commands, but the modem ignores the second one.
I would suggest you two wait for the "OK" from the modem before you send the second command

mr_fahrrad 2. Feb 2007 12:21

Re: TComPort - send AT commands. Two or more commands
 
There are a easy way to make the command wait until the last command return OK before send?


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:05 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz