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

Unable to receive data through Terminal

Started by EduardoMoo, July 01, 2008, 11:38:06 am

Previous topic - Next topic

EduardoMoo

Hi,

I'm trying to receive data through the serial port using the Terminal property of the nrComm component. This has worked successfully using the same code in many instances, but for a particular instance, I receive no data. I can see that data is being sent (using Hyperterminal) and my settings match those of the hyperterminal connection exactly. (I'm not attempting to use both connections at once). The Com port in question is via a USB to Serial adapter. However I've used the same adapter before without issue.

Do you have any suggestions? I'm using version 7.18.

Many thanks.

Roman Novgorodov

Hello

You should use the OnAfterReceive event for process all incoming bytes.
You can open Demos\Codes\ demo project that shows HEX/DEC codes of all incoming chars.

Please note that:

  • For some cases, the reading incoming chars Terminal control can raise a trouble because TnrComm has a multithreaded implementation.

  • If you are using the cracked version of nrComm Lib, it can have a hidden limitation on amount of incoming chars

  • Better if you try the latest trial version of product. It has some changes related with multithread working with Termianl property



Good luck!

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.

gwoods

This sounds a bit like what's happening to me now.

I'm using 8.04 with XP 3.  Delphi 6.  Code is quite old and has been working for some time.  BUT now it is only sending data, but not receiving.  Using OnAfterReceive.  Hyperterminal woekd fine, as does the demo codes with nrcomm.  I have checked hardware and seeing data coming into computer.  Have used software sniffer program to examine traffic and see data going out but not comming in.  However I do see the data with the sniffer program when using HyperTerminal and the demo programs.  Has anybody got any ideas?

Regards,
Garry

Roman Novgorodov

Hello

You can check that TnrComm.OnAfterReceive event is assigned to your handler.
Also you can add tsRxChar value into TnrComm.TraceStates property.

Better if you will install latest trial version of nrComm Lib and test it.

If all above does not help, please prepare simple project that shows problem and upload its sources.

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.

gwoods

Thanks Roman. 

Already using tsRxChar.
I do Physics, not software:-)  How do I go about: "You can check that TnrComm.OnAfterReceive event is assigned to your handler"

Garry

Roman Novgorodov

Hello

QuoteI do Physics, not software:-)

Great words!

But I prefer following:
---------------
A human being should be able to change a diaper, plan an invasion, butcher a hog,
conn a ship, design a building, write a sonnet, balance accounts, build a wall,
set a bone, comfort the dying, take orders, give orders, cooperate, act alone,
solve equations, analyze a new problem, pitch manure, program a computer, cook
a tasty meal, fight efficiently, die gallantly. Specialization is for insects.
(C) Robert A. Heinlein
----------------

ok. Never mind. :-)

Do you try the latest version of nrComm Lib?
You can take it here:
http://www.deepsoftware.com/

Or I need see your project.

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.

gwoods

Beautiful quote!  Never butched a hog or died gallantly!

Tried latest version.  No differemce.  Now understand "You can check that TnrComm.OnAfterReceive event is assigned to your handler",  and it's ok.  BUT

We noww think this issue has been with us for a long time, and has been hidden behind other issues.  We are using FormActivate to set up and test the comms, at the end of the procedure the call is made to TMsgTread.ProcessMess, after which all comms starts to works.  Are we doing something stupid here?

Garry

Roman Novgorodov

Hello Garry

The latest version TnrComm has UseMainThread property for control mutlithread behavior. You can play with it.

I can't recommend anything better because I don't see your code.

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.

gwoods

G'day Roman,

Using UseMainThread control makes no difference.  I have cut my code from 10k lines to 120!  How should I send you a copy to look at?

Regards,
Garry

Roman Novgorodov

Hello

Yes I want to see code. You can send it here in attachment or in private (personal message)

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.

gwoods

Quote from: Roman Novgorodov on July 28, 2010, 07:44:34 am
Hello

Yes I want to see code. You can send it here in attachment or in private (personal message)

Roman Novgorodov
DeepSoftware.Com


Roman,

I sent code to you (private email) about a month ago.  Any comments?

Regards,
Garry

Roman Novgorodov

Hello

I don't see any private messages from you.
Please resend.
Or tell me exact date and "from:" email address of old message. We will try to find it.

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.

gwoods

Roman,  Just resent.  From address is gwoods@a-research.com.au.  orginal sent 28 July.  Regards, Garry

gwoods


gwoods

Roman,

Any updates?  Have you looked at the code?

Regards,
Garry