473,387 Members | 1,516 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,387 software developers and data experts.

How to view data being sent to a port?

ken
Hi all,
I'm using the MS VB example "How to: Receive Strings From Serial Ports
in Visual Basic" and would like to see the data being received. I have
two virtual serial ports COM5 and COM6 setup using Virtual Serial
Ports Driver XP . The code below is looking at COM6 and I'm sending
data via COM5 with Hyper Terminal.

I know this works because when I send data (MS VB example " How to:
Send Strings to Serial Ports in Visual Basic") on COM6 I'm able to
view it on COM5 with Hyper Terminal.

Can anyone tell me how to view the data being received? I tried doing
things like cboReceive.text = Incoming, cboReceive.text = returnStr .
So any help would be great. Thanks all.
Regards,
Ken
"How to: Receive Strings From Serial Ports in Visual Basic"
Function ReceiveSerialData() As String
' Receive strings from a serial port.
Dim returnStr As String = ""

Using com1 As IO.Ports.SerialPort = _
My.Computer.Ports.OpenSerialPort("COM1")
Do
Dim Incoming As String = com1.ReadLine()
If Incoming Is Nothing Then
Exit Do
Else
returnStr &= Incoming & vbCrLf
End If
Loop
End Using

Return returnStr
End Function

Jan 17 '06 #1
0 1066

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

Similar topics

4
by: yaron | last post by:
Hi, I have a problem when sending data over TCP socket from c# client to java server. the connection established ok, but i can't send data from c# client to java server. it's work ok with...
2
by: K.K. | last post by:
I am writing program that will recieve or sent data to selected port (users can select which port they want to recieve or sent) but I don't know how or whick object I can use.
1
by: Patriicia | last post by:
A legacy application (I don't have the source code for the application) transmits reports to a printer. One of the reports that are sent to the printer needs to be inserted into a database. With...
3
by: TulasiKumar | last post by:
hi all, My requirment is i want to listen one perticular TCPIP port for one IPAddress,Wheneverver the data in coming to this port that data i will be save one text file..For...
5
by: chapeau_melon | last post by:
Hello, I'm basicly not a programmer... I found some C++ codes on the net that almost satisfy me needs, wich is to communicate with an other device that sends data to me, wich I have to receive...
1
by: Laszlo Nagy | last post by:
Hi All, I'm using a simple program that uploads a file on a remote ftp server. This is an example (not the whole program): def store(self,hostname,username,password,destdir,srcpath):...
2
by: Seth | last post by:
I am doing a project with a embedded processor. I have a program that can take the data from the serial port and send it out a tcp port of my choosing. I want to be able to read that stream and...
10
by: John Salerno | last post by:
I wrote some pretty basic socket programming again, but I'm still confused about what's happening with the buffer_size variable. Here are the server and client programs: -------------- from...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.