RComm::Read and termination char

Login to reply to this topic.
Thu, 2005-04-21 01:13
Joined: 2005-01-25
Forum posts: 32
Hi All,

I am using RComm to receive data on a BT RFComm connection.
I am a bit counfused about Read()

Is it possible to avoid the use of a termination character?

The way I have it working is that it only reads if the input is terminated by the termination character specified in TCommConfig.

Does it always need at least one termination character?
I tried to set iTerminatorCount to zero in TCommConfig, but it didn't help.

ReadOneOrMore seems not to have this problem, however I would prefer to use Read to be able to set a timeout..

Any suggestion?

Thanks,
Enrico

Thu, 2005-04-21 08:54
Joined: 2004-07-28
Forum posts: 1379
RComm::Read and termination char
Why are you using RComm for BT RFCOMM communctions??  Why are you not using RSocket??

didster

Fri, 2005-04-22 17:31
Joined: 2005-01-25
Forum posts: 32
RComm::Read and termination char
Quote from: didster
Why are you using RComm for BT RFCOMM communctions??  Why are you not using RSocket??

Because all I really need at this point from BT is the serial port functionality I thought TComm was appropriate..

Anyway, I got the point, so I rewrote the program using RSocket and "hardcoding" the BT Address of the device I want to use and it seems to work! Smiley
Thanks for the suggestion!

What are  the virtual comm port settings? Is it possible to change them?


Enrico
Fri, 2005-04-22 22:05
Joined: 2004-07-28
Forum posts: 1379
RComm::Read and termination char
The API isn't designed to be used in that way (direct from RComm that is) which is probably why your having problems.

The settings I belive (i'd have to check back in the office tomorrow) are 9600 8n1.  You can change them, but I belive the driver just ignores what you do (again, i'd have to check - I personally always stick with the defaults).

didster

Sun, 2006-07-30 04:32
Joined: 2005-05-19
Forum posts: 45
Re: RComm::Read and termination char
Didster... can RComm port be used in this way to send data over a CSD connection between two phones?  I have such an application... everything seems to go okay... except that when I have send about 25K of data out... the sender stops working... not sure why.

For this program, I start a CSD connect...loan the data port, configure it for 9600/8/n/1 and then start calling write() async... when runl is called, I go and send the next block... this continues until I have sent about 25K and then it just stops....

any ideas?  should I be sending using sockets?

Thanks

"If we knew what it was we were doing, it would not be called research, would it?" - Albert Einstein

  • Login to reply to this topic.