Hi All,

to day when i read from comport make i procedure like this under:

function MySendSerial(atcommand: String): String;
var
  ser: TBlockSerial;
  buf: String;
begin
  ser := TBlockSerial.Create;

  //ser ----> initialization;

  try
    ser.AtTimeout := 1500;
    buf := ser.ATCommand(atcommand);
    Result := buf;
  finally
   FreeAndNil(ser);
  end;
end;

but sometimes this procedure return not all what modem response, even if 
AtTimeut = 6000 or 30000


when i make modification like this under:

function MySendSerial(atcommand: String): String;
var
  ser: TBlockSerial;
  buf: String;
begin
  ser := TBlockSerial.Create;

  //ser ----> initialization;

  try
    ser.AtTimeout := 1500;
    buf := ser.ATCommand(atcommand);

        while serCanRead(100) do begin
          buf := buf + ser.RecvPacket(200);
        end;

    Result := buf;
  finally
   FreeAndNil(ser);
  end;
end;

but with this modification it work but little slower . It is something wrong 
with reading and timeout when ser.AtCommand is working ???


thx for some response

regs Mirek
 


-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to