473,386 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

RS232 class

Hi,

Do you know some good RS232C class? There is one in
VB.NET 101 Examples, but I think it is poor.

1.
I can't for e.g. read into my application all data
received. I must tell how many bytes I would like to
read. If I specify too many exception occures, if too
less there are still some data in buffer.

2.
I use a GPS receiver which send data by RS232. Every line
end with codes 10 and 13. I would like to read from RS232
Class one, or more such lines of data. But full lines! I
have noticed that this class gives me what it has -
sometime partial data.
Is it a spoecific thing about RS232 serial transmition or
only of this class?

Thanks.

Przemo
Nov 21 '05 #1
3 2304
Hi,

I use a GPS receiver which send data by RS232. Every line
end with codes 10 and 13. I would like to read from RS232
Class one, or more such lines of data. But full lines! I
have noticed that this class gives me what it has -
sometime partial data.
Is it a spoecific thing about RS232 serial transmition or
only of this class?
<<

This is normal. Just append new data to a string buffer, and use the
Substring method to determine if the CRLF is present -- if it is, then
process the buffer up to the CRLF, and retain the balance for the next set
of data that you receive.

I have a .NET DecodeGPS example class in my book (and a .NET serial class).
See below.

Also, you may be interested in getting the (free) Visual Basic .NET Resource
Kit from Microsoft (do a search for it). I contains a serial class from Sax
Software that is quite complete.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
Nov 21 '05 #2
* "Przemo" <p.**********@deltatrans.pl> scripsit:
Do you know some good RS232C class? There is one in
VB.NET 101 Examples, but I think it is poor.


Thomas Scheidegger's Serial Port FAQ (in German)
<URL:http://groups.google.com/groups?selm=O2UyhTLvDHA.1680%40TK2MSFTNGP12.phx.gb l>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3
Przemo,

Will you be so kind not to multipost. Now you have three very good answers
one in the newsgroup dotnet.general and two in the newsgroup languages.vb.

However readers of those newsgroup sees only one or two.

Use instead of this crossposting, than everybody sees three answers and can
use those. (crossposting sending one message to more newsgroup in one time).

Thanks in advance.

Cor

Do you know some good RS232C class? There is one in
VB.NET 101 Examples, but I think it is poor.

1.
I can't for e.g. read into my application all data
received. I must tell how many bytes I would like to
read. If I specify too many exception occures, if too
less there are still some data in buffer.

2.
I use a GPS receiver which send data by RS232. Every line
end with codes 10 and 13. I would like to read from RS232
Class one, or more such lines of data. But full lines! I
have noticed that this class gives me what it has -
sometime partial data.
Is it a spoecific thing about RS232 serial transmition or
only of this class?

Thanks.

Przemo

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dan | last post by:
I wnat to see in browser an status from an device connected on rs232 port The java class for read from serial port is: //Serial.java import java.io.*; import java.util.*; import...
6
by: Przemo | last post by:
Hi, Do you know some good RS232C class? There is one in VB.NET 101 Examples, but I think it is poor. 1. I can't for e.g. read into my application all data received. I must tell how many...
0
by: Jason T | last post by:
I've downloaded and installed the '101 Visual Basic and C# Code Samples' from http://www.microsoft.com/downloads/details.aspx?familyid=08e3d5f8-033d-420b-a3b1-3074505c03f3&displaylang=en I have...
6
by: Ken Breit | last post by:
I am using the RS232.vb class to talk to the serial port. The problem I am having is when I try to read if anything is on the comm port. I call the read method, with the number of bytes I am...
8
by: Terry Olsen | last post by:
I'm trying to use the RS232 class that was in the Platform SDK (i think). Has anyone else used this with events successfully? Here's what i've got: ====================== Public WithEvents...
2
by: Mika M | last post by:
Hi! My application uses Rs232-class, which was shipped with "101 VB.NET Samples\Framework - Using the COM Port". I need to sent certain kind of string into peripheral equipment attached to...
2
by: KCUK | last post by:
I have created a software to receive data from an equipment through RS232 communication. It is a simple application of the RS232 class. The software does receive strings from the equipment every time...
4
by: Dave Harry | last post by:
I found the RS232 class from MS's 101 VB samples. Writing to the port works fine. (I've got hyperterminal on the other comm port and a crossover cable between COM1 and COM2) The port is opened...
5
by: =?Utf-8?B?Q2hyaXN0aWFuIEhhdmVs?= | last post by:
Hi, how can I access the RS-232 hardware interface using C# and .NET2.0 to send and receive messages to a hardware component? Christian
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.