.. versuche es mal so:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
data: TidBytes;
begin
idTCPClient1.Port := 49151;
idTCPClient1.Host := '192.168.80.133';
idTCPClient1.Connect;
if idTCPClient1.Connected then
begin
setLength(data,17);
data[0] := $04;
data[1] := $01;
data[2] := $02;
data[3] := $23;
data[4] := $3c;
data[5] := $00;
data[6] := $0a;
data[7] := $01;
data[8] := $ff;
data[9] := $00;
data[10] := $00;
data[11] := $00;
data[12] := $00;
data[13] := $00;
data[14] := $00;
data[15] := $00;
data[16] := $fe;
idTCPClient1.IOHandler.Write(data);
idTcpClient1.IOHandler.WriteLn();
idTCPClient1.Disconnect;
end;
end;
Am Ziel kommt dann das an:
Code:
0000000: 0401 0223 3c00 0a01 ff00 0000 0000 0000
0000010: fe0d 0a
Grüße
Klaus