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

Comm Port setup not complete

Hello

I am using a serial port to communicate with an embedded device. I am using CreateFile, WriteFile & ReadFile. It all works great until I run a VB6 application that uses the serial port. After I run the VB6 application, the ReadFile no longer waits for a character, it simply falls through. If I open HyperTerm and close it, again my app works.

CreateFile, GetCommState, SetupComm, SetCommState & PurgeComm all return successfully. Any ideas

Thanks
Pete
Nov 17 '05 #1
2 1723
"PeteC" <an*******@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.com...
I am using a serial port to communicate with an
embedded device. I am using CreateFile, WriteFile
& ReadFile. It all works great until I run a VB6
application that uses the serial port. After I run the
VB6 application, the ReadFile no longer waits for
a character, it simply falls through. If I open
HyperTerm and close it, again my app works. CreateFile, GetCommState, SetupComm, SetCommState & PurgeComm all return

successfully. Any ideas?

I would suggest that you take a look at SetCommTimeouts(), too.

If that fails you, I'd double check the return codes from each of the
functions. It seems as though one or more may have no effect and that
HyperTerminal is actually setting the prort's state.

Regards.
Will
Nov 17 '05 #2
Will

You know, I hate how obvious things are once you find the problem

Thanks
Pete
Nov 17 '05 #3

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

Similar topics

2
by: Will | last post by:
Does Python have comm port support built in or does someone have a tool for sending and receiving data in & out of a PC com port? How about for the Mac ? Thanks - Will
3
by: al | last post by:
Hi, I am creating an application in access 97, so coding in vba. I am at the stage of sending values to my external machine, but am stuck at a point. I need to send each character at an...
1
by: sarath1111 | last post by:
hi all, I am using comm port for serial communication between 2 PC's using C language. Once I have initialized the COMM port, Is there any option of closing the port in C language. Thanks in...
7
by: Michael Chong | last post by:
I wrote a program that communicate with SerialComm. In every 300 milliseconds, my program continuously send & receive data via the serial port once the program starts. My program is once in a...
3
by: Frank Perry | last post by:
Howdy, I'm trying to write data out the com port. I have taken the code from the sample on the MSDN Library CD and used the parts that seem relevant. I can open the com port with CreateFile...
4
by: Iceman.Aragorn | last post by:
I'm having an odd problem where im reading input from a comm port (the maker of the software that exports the data TO the comm port is unhelpful). What im reading is fixed length (13 character)...
2
by: Hank | last post by:
Hello, I would like to get some opinions on using the Comm Port with Access 2000. We have a few jobs coming in that require us to interface with a PLC via the Comm Port. My partner feels we...
2
by: herat007 | last post by:
hi , i have developed a prog in vb to send sms , but i get an error error:8020 "Error reading from comm port" my prog for mscomm_oncomm() is Private Sub MSComm1_OnComm() Dim strMessage As...
6
by: cleary1981 | last post by:
Hi, I am trying to get setup to write a realtime program for serial port communication. Problem im having is that sun say that java.comm is no longer available and that rxtx site just baffles me....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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
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...

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.