Re: Urgent, COM port problem

From: CE (hcheng_at_optonline.net)
Date: 02/27/04


Date: Fri, 27 Feb 2004 18:01:32 -0500

Thanks so much!!!

When use createfile() function, it works,WriteFile() call does not return
error.my setting is:
 dcb.BaudRate = 9600;
 dcb.Parity = NOPARITY;
 dcb.ByteSize = 8;
 dcb.StopBits = ONESTOPBIT;
 dcb.fDtrControl = DTR_CONTROL_DISABLE;
 dcb.fOutxCtsFlow = TRUE;
 dcb.fRtsControl = RTS_CONTROL_ENABLE;

When I use same program with old small image, no problem.
For this new image, I can't see data from my Serial device. But I don't get
error return code from WriteFile() call.

"Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in
message news:eaVR4MY$DHA.2804@tk2msftngp13.phx.gbl...
> Check the registry on the running device. Is the COM port driver listed
in
> HKLM/Drivers/Active? If not, check the settings in the registry for the
> driver (HKLM/Drivers/BuiltIn). If this is the case, you should probably
> capture the debug output from the OS and see if anything shows up.
>
> If the driver *is* listed, what happens when you try to send data to it?
> Does the data simply not appear, but CreateFile() works? Does the
> WriteFile() call return an error? If so, what error? Are you sure that
you
> don't have handshaking enabled and one of the handshake signals connected
to
> the wrong value (telling the port not to send)?
>
> Paul T.
>
> "CE" <hcheng@optonline.net> wrote in message
> news:OyFQpzX$DHA.792@TK2MSFTNGP11.phx.gbl...
> Blank
> I use PB4.2 built a CE 9MB image and I wrote a com port test program, I
can
> send data to COM port, no problem. Then I add some components to CE image,
> now CE image is about 20MB, now I found my program can't send data to
COM1.
> I have no idea why this happen, I searched components I added, they have
> nothing to do with COM port.
>
>
>
> Does any body know what caused this and how to fix this? Thank you very
> much!
>
>
>
>
>
>
>
>



Relevant Pages

  • Re: Bluetooth Com port coding ?
    ... DId the CreateFile actually open? ... you send a WriteFile and what did the WriteFile report? ... it is probably time to call the tech support people for your scanner ... I have a Bluetooth barcode scanner and it has an incoming com port ...
    (microsoft.public.vc.mfc)
  • Re: Serial Port
    ... Use CreateFile and open COMx file where x is the number of port to open. ... Then I can use WriteFile and ReadFile functions... ...
    (microsoft.public.dotnet.languages.vc)
  • Re: How to use modem AT Commans in MFC application
    ... Typcially you would write to the com port. ... Open a com port using CreateFile. ... write to it using WriteFile. ... Ali R. ...
    (microsoft.public.vc.mfc)
  • Re: can not delete excutable in Pocket PC [or WinCE]
    ... For serial I/O, as we've discussed in this group previously, you can close ... WriteFile() operation under way on the port to complete with an error. ... when it gets an error back from ReadFile or WriteFile, ...
    (microsoft.public.dotnet.framework.compactframework)
  • RE: Problemn creating a Virtual COM Port
    ... I don't think the XDAII uses Widcomm stack? ... If RegisterDevice is failing on every port then it is likely due to the ... HANDLE hCommPort = CreateFile(szComPort, GENERIC_READ | GENERIC_WRITE, ...
    (microsoft.public.pocketpc.developer.networking)