473,398 Members | 2,427 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,398 software developers and data experts.

Serial Port Visual Basic 08

2
Hello every one ,
This is my first message on fourm ....looking forward to reply

This is regarding serial port in visual basic 2008.

when i run the following VB program. After 2 minutes it will will show on my hyperterminal (configured at 9600, 8bit,1 stop bit ). And I will get strange characters like }~j2 .......

Basically, i need help in reading and writing data in ( hex ) and display messages on hyperterminal:

Code:
Expand|Select|Wrap|Line Numbers
  1. Public Class Form1
  2.     Sub SendSerialData(ByVal data As String)
  3.     ' send string to serial port
  4.      Using com1 As IO.Ports.SerialPort = _ 
  5.                My.Computer.Ports.OpenSerialPort("COM1")
  6.           com1.WriteLine(data) 
  7.      End Using
  8.    End Sub
  9. End Class
Attached Images
File Type: jpg msg_1.jpg (6.9 KB, 826 views)
File Type: jpg msg_2.jpg (6.2 KB, 1805 views)
Feb 21 '09 #1
5 4432
debasisdas
8,127 Expert 4TB
Question moved to .net forum.
Feb 21 '09 #2
Plater
7,872 Expert 4TB
Are you setting the baudrate and databits correctly on both sides?
Your VB app does not seem to be doing that.
Feb 23 '09 #3
jen786
2
do you have a sample code i can use as a reference....
Feb 24 '09 #4
tlhintoq
3,525 Expert 2GB
Just to confirm something... This is running between two computers, right? Hyperterm on one PC, and your application on the other.

Suggestion: Don't rely on the serial port being already configured the way you want it, and just open it as-is. Make a new port object, set the baud, parity, stopbits, databits and flow control yourself. *THEN* open it. Now there is no doubt as to its settings.

PS - The images you attached are so small as to be unreadable
Feb 25 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: IanHale | last post by:
Is there any way of simply using the COM port from Visual Basic? All the solutions I've found seem to require the use of Visual Studio whereas I only have the the 'basic' version. I'm not after...
3
by: Todd | last post by:
Hello Oh ye Gods of .Net, I'm going to finally upgrade from VB(5) to NET. I havent written in much of anything else than Visual Basic. Will I need to buy Visual Studio or can I get by with...
2
by: Matthew Ryan via .NET 247 | last post by:
I have a fairly large heritage VB 6 application that controlsabout 5 serial port devices with a fairly complicated but lineartimer scheme to service all of them (a work around of the singlethread...
3
by: Essam | last post by:
Hi All I have two programs ; both of them I need to give read/write access to the same Comm Port. How can I do so; using Code or third party tool/library
5
by: EMW | last post by:
Hi, For my windows application I'm using OpenNetCF's serialport stuff but I'm having a small problem. In my program I want to list a range of available ports to select. This works fine for the...
4
by: Dave Cullen | last post by:
I need help using the serial port under VB.NET. I found a control called AxMSComm which I assume is the comm control, but there's no documentation in my MSDN help. Where can I find descriptions of...
2
by: Hugh Janus | last post by:
I am trying to receive GPS data into a pocket PC 5.0. I am using the device emulator. The main PC has a bluetooth dongle connected and is bonded with the bluetooth GPS transmitter to COM8. In...
5
by: =?Utf-8?B?UGV0ZXIgSm9uZXM=?= | last post by:
Hi, Hopefully this is a pretty basic question. I need to perform serial IO using VB.Net (VS2005/Framework 2.0) but the devices I communicate with can be either RS-232 or 422/485. Is this a...
4
by: JDS | last post by:
I have an application that interfaces with a USB device using the .Net serial port. The code works fine, displaying live data on the screen; that is until the USB lead is pulled out from the PC...
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: 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:
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
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,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.