:= 46;
ComPort.PutChar(#$01);
ProcessBar.Progress := 53;
ComPort.PutChar(#$90);
ProcessBar.Progress := 62;
while Step = 21 do
begin
Application.ProcessMessages;
if DoStop then Exit;
end;
IMEI92 := Copy(PanaGD9xIMEI, 10, 1);
IMEI92 := IMEI92 + Copy(PanaGD9xIMEI, 12, 1);
IMEI92 := IMEI92 + Copy(PanaGD9xIMEI, 14, 1);
IMEI92 := IMEI92 + Copy(PanaGD9xIMEI, 16, 1);
IMEI92 := IMEI92 + Copy(PanaGD9xIMEI, 18, 1);
IMEI92 := IMEI92 + Copy(PanaGD9xIMEI, 20, 1);
IMEI92 := IMEI92 + Copy(PanaGD9xIMEI, 22, 1);
IMEI92 := IMEI92 + Copy(PanaGD9xIMEI, 24, 1);
IMEI92 := IMEI92 + Copy(PanaGD9xIMEI, 26, 1);
IMEI92 := IMEI92 + Copy(PanaGD9xIMEI, 28, 1);
IMEI92 := IMEI92 + Copy(PanaGD9xIMEI, 30, 1);
IMEI92 := IMEI92 + Copy(PanaGD9xIMEI, 32, 1);
IMEI92 := IMEI92 + Copy(PanaGD9xIMEI, 34, 1);
IMEI92 := IMEI92 + Copy(PanaGD9xIMEI, 36, 1);
IMEI92 := IMEI92 + Copy(PanaGD9xIMEI, 38, 1); GD92IMEI.Text := IMEI92;
UserInfo.Caption := ''Read Phone IMEI OK !'';
Step := 22;
ComPort.PutChar(#$00);
ProcessBar.Progress := 69;
ComPort.PutChar(#$80);
ProcessBar.Progress := 77;
ComPort.PutChar(#$02);
ProcessBar.Progress := 85;
ComPort.PutChar(#$94);
ProcessBar.Progress := 92;
ComPort.PutChar(#$00);
ProcessBar.Progress := 100;
while Step = 22 do
begin
Application.ProcessMessages;
if DoStop then Exit;
end;
Soft92 := ''GAD'' + Copy(PanaGD9xSW, 16, 1);
Soft92 := Soft92 + Copy(PanaGD9xSW, 18, 1);
Soft92 := Soft92 + ''A'' + Copy(PanaGD9xSW, 22, 1); Soft92 := Soft92 + Copy(PanaGD9xSW, 24, 1);
GD92SW.Text := Soft92;
ProcessBar.Progress := 0;
UserInfo.Caption := ''Read Phone Info OK !'';
end;
procedure TPanasonicGD92.ComPortTriggerAvail(CP: TObject; Count: word);
var ST: string; Rs: string; // I: Integer;begin if Step = 1 then
begin
ProcessBar.Progress := 0;
ComPort.PutChar(#$00);
ProcessBar.Progress := 25;
ComPort.PutChar(#$80);
ProcessBar.Progress := 50;
ComPort.PutChar(#$01);
ProcessBar.Progress := 75;
ComPort.PutChar(#$5C);
ProcessBar.Progress := 100;
end; St := GetCOMData(Count);
Rs := ResponseArray[Step];
if Step = 20 then begin
PanaGD9xCode := St;
Rs := St;
end;
if Step = 21 then
begin
PanaGD9xIMEI := St; Rs := St;
end;
if Step = 22 then begin
PanaGD9xSW := St;
Rs := St;
end;
if Pos(Rs, St) > 0 then
Inc(Step);
end;
end.