Re: serial port communuication



On Feb 15, 12:21 pm, Fenster <fens...@xxxxxxxxxxxxx> wrote:
In message <OmuisKHUHHA.4...@xxxxxxxxxxxxxxxxxxxx>, Ian Semmel
<any...@xxxxxxxxxxxxxxxxx> writes





Are you using SetCommState on the port ?

If so, are you first doing a GetCommState ? This sets up the DCB
structure to valid values

"hari" <haricib...@xxxxxxxxx> wrote in message
news:1171455246.402743.203120@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all,

I m communicating to a printer device through serial port.It
is failing to open the port,but when I disable and enable the com port
in device manager,it works fine(i.e)it communicates with the printer
and reads the configuration settings of the printer).

Regards
Hari

I would be wary of using/trusting GetCommState(), lots of people seem to
have problems with this function, see other threads/newsgroups.

--
Fenster- Hide quoted text -

- Show quoted text -

After CreateFile , the API's are failing,
(setcommstate,getcommstate,SetCommTimeouts).On giving
Getlasterror(),it gives error code 1 .(Incorrect function).but after
disabling and enabling com port in Device manager,all the API are
failing. :(

Regards
Hari

.



Relevant Pages

  • Re: serial port communuication
    ... is failing to open the port,but when I disable and enable the com port ... After CreateFile, the API's are failing, ... disabling and enabling com port in Device manager,all the API are ...
    (microsoft.public.vc.mfc)
  • Re: serial port communuication
    ... is failing to open the port,but when I disable and enable the com port ... After CreateFile, the API's are failing, ... disabling and enabling com port in Device manager,all the API are ...
    (microsoft.public.vc.mfc)
  • Re: serial port communuication
    ... is failing to open the port,but when I disable and enable the com port ... in device manager,it works fineit communicates with the printer ... and reads the configuration settings of the printer). ...
    (microsoft.public.vc.mfc)
  • Re: device pcic and card
    ... unknown: ... PNP0100: adding irq mask 0x1 ... isa_probe_children: disabling PnP devices ... strange result for test aux port. ...
    (freebsd-current)
  • The reboot doesnt work anymore in today -CURRENT..
    ... Location Bus Device Pin Link IRQs ... port error, restarting port 1 ... unknown: not probed ... isa_probe_children: disabling PnP devices ...
    (freebsd-current)