Hi Sunxiao,
Set it in code: Cli.LineEnd := #$FA;
But you where takling about "hex string". Now it looks we are talking
about binary data. Wich of the 2 is it?
Met vriendelijke groeten,
Wilfried Mestdagh
Op 29-12-16 om 14:41 schreef sxbug:
Hi Wilfried Mestdagh
Thank you for your replay.
> in SAMPLE OverbyteIcsTcpSrv, I haven't changed a lot.
Unless you change a lot, as previously advised, it simply will not work
with binary data.
There are numerous ICS components and samples that deal with binary
data, you have lots of source code to examine and borrow.
> I have make a a
Hi Angus
in SAMPLE OverbyteIcsTcpSrv, I haven't changed a lot.
I have set breakpoint in DataAvailable event, but I found it not execute,
maybe the server can not receive these HEX string?
I have make a attachment(my PROG), Ask the teachers to guide .
Thanks !!!
> I have turn off LineMode, when I send "FA 0A 02 FF AA 55 01 00
> B3 06" HEX string by client, the server can not receive any thing.
Please show the code you have added to DataAvailable event to process
the buffer you have filled using the Receive function.
It is your problem to write code
Hi Wilfried Mestdagh
Thank you for your replay.
I have understand the structure of the packet .But I can NOT set lineEnd to
#FA, it auto change to #0.
What can I do ? Thanks
sunxiao
At 2016-12-29 18:15:03, "Wilfried Mestdagh" wrote:
>Hi,
>
>Mostly w
Hi Angus
Thank you for your replay.
In OverbyteICSTcpSrv.dpr, I can not set LineEnd to #FA, if I set to #FA ,it
change to #0 auto.
I have turn off LineMode, when I send "FA 0A 02 FF AA 55 01 00 B3 06" HEX
string by client, the server can not receive any thing.
What can I do? Thanks
Hi,
Mostly when there is data packet of several length there is a length
byte, or a packet type where you can see what kind of data it is (and
the length of it). In the first case I see 21 as second byte and the
packet you show is 33 long. So probably 21 is the length. In that case
you check
> I found OverbyteICSTcpSrv.dpr can achieve my need. but it
> only recieve string include #13#10. How can I deal with ?
Turn off LineMode and receive one character at a time, checking them
one at a time until you've got enough.
You have to understand the protocol to process it properly.
In th