• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

Receive String From RS232

Started by adyble, May 26, 2009, 09:29:08 am

Previous topic - Next topic

adyble

Hi

I am testing then codes_demo in dephi 7. I am reading from a com port that is sending continuous data, I am trying to get the data as text , line by line , similar to how hyperterminal does it.

is there a demo for this or can you advise me please.

Thanks

Andy Dyble

Roman Novgorodov

Hello

It seems like you want to handle an incoming data separated by lines.

You can take a look the sources of following demo project:
demos\vcl\SimplePacket\SimplePacket.dpr

It monitors #13#10 char separator and raises routine after line detection.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

adyble

I can't get any data using this demo, however Terminal demo works perfectly.
I just can;t work out how to extract each line of data so I can parse it

Thanks
Andy

Roman Novgorodov

Hello

Do you know end of line sequence?

Is it two chars #13#10 or single char #13 ?

In last case you need to modify sources of demo.

Please find line:

EndOfPacket:string=#13#10;
and replace it with:
EndOfPacket:string=#13;

Please note that you are wrong:
The Hypertemrinal does not detect lines.
It shows every char.
And when it receives #13, it moves the caret on new line.

Roman Novgorodov
DeepSoftware.Com
forums.nrCommLib.com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

KarpovSergei

I bound as tranceiver and I can receive message from the SMSC like QuerySm but the problem is that I cannot receive on the short code like "1234" provision for me on the smsc.

How can I achieve that. Just to receive from short code, since I can received delivery message from my smsc already.

Any help will be appreciated.

Thank you

Roman Novgorodov

Hello

I don't understand your problem.
Please show more samples of string from remote clinet.

You can detect packet (string) if you are sure that:
1) String has a fixed length
OR
2) String has a fixed char sequence at the end (or at the begining)

Roman Novgorodov
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.