Article View: borland.public.cppbuilder.nativeapi
Article #3391Re: Comm Port kicking my butt
From: Helmut Giese
Date: Sun, 18 Jun 2006 22:54
Date: Sun, 18 Jun 2006 22:54
41 lines
2575 bytes
2575 bytes
On 18 Jun 2006 06:50:35 -0700, "JD" <nospam@nospam.com> wrote: > >"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote: >> >> Is data being written to the COM port that you can read in >> the first place? > >I don't know how to respond to that. I posted my code. What >do you think? Hi JD, looking at your code cannot answer Gambit's question, because his question relates to the run-time of your program. I will re-phrase it: Are you sure that some other computer is actually _sending_ something to the port you're reading at? Here is what I would try out: - Connect your COM port to whatever source you have (if you have a null modem cable this could well be the second COM port of your machine). - Start HyperTerminal on _your_ COM port. - Get your source to send something - do you see the data arrive in HyperTerminal? If not, you have to fix your setup until the communication works. Hint: If your ports are connected with a null-modem cable something easy as "copy c:\autoexec.bat COM2:" can be really useful. - Note the state of the handshake lines. (You do have this device which lots of LEDs to show the current state of each line? If you don't have it: run - don't walk - out to get one - they are life savers.) - Back in your program: Make sure the handshake lines have the exact same state as noted when working with HyperTerminal. - Repeat whatever you did to send something to HyperTerminal - your program should receive it now. Final hint: I would try at first with a null-modem cable and "copy c:\autoexec.bat COM2:" Until you get this to work there is no point in trying anything else. HTH Helmut Giese
Technical Details
Message-ID:
<4495d5eb.35456619@forums.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44944ca9$1@newsgroups.borland.com> <449450ef$1@newsgroups.borland.com> <449454bd$1@newsgroups.borland.com> <44947586$1@newsgroups.borland.com> <44955a2b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5117e51131b9ac21 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: hgiese@ratiosoft.com (Helmut Giese) Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Comm Port kicking my butt Date: Sun, 18 Jun 2006 22:54:50 GMT Message-ID: <4495d5eb.35456619@forums.borland.com> References: <44944ca9$1@newsgroups.borland.com> <449450ef$1@newsgroups.borland.com> <449454bd$1@newsgroups.borland.com> <44947586$1@newsgroups.borland.com> <44955a2b$1@newsgroups.borland.com> X-Newsreader: Forte Free Agent 1.11/32.235 NNTP-Posting-Host: 84.138.200.183 X-Trace: newsgroups.borland.com 1150672875 84.138.200.183 (18 Jun 2006 16:21:15 -0700) Lines: 41 Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail