Re: Reading from serial port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2011-01-17 at 05:51 -0600, luboss wrote:
> 1. opened the port with win32 appl. called hwtest
> 2. restored previous settings (backed up with stty -g -F /dev/ttyS0) 
> 3. placed card, nothing comes from the port. (cat /dev/ttyS0 works)
> 
> I tried another COM test. It died after choosing the port to test.
> In windows with the same reader those programs work well.
> 
The only programs I've tried both worked: they are Win95 programs and
work with Wine set to emulate Win 98. I have 6 serial ports (ttyS0 and
ttyS1 are on the motherboard, ttyS2-ttyS5 are on a multiport PCI
adapter. Once I'd added a kernel parameter to enable all six serial
ports they were all immediately available to both Linux native programs
and the Windows apps. I did not need to add symlinks - they just
appeared as COM1: - COM6:. However my Wine apps have never been able to
access USB serial adapters, though I admit I haven't tried again since I
installed the PCI multi-serial adapter.

Disclaimer for the following comments: I haven't tried to code for
serial ports in the Windows environment since Win 95 and I've only
programmed Windows with Borland C compilers. If a serial port API has
been implemented for Win2K and its successors I don't know about it so
you should ignore what follows.

I think a major problem is the absence of a standard DOS or Windows
serial port API. This forced developers to either roll their own using
assembler or C code to access the hardware directly or to use third
party libraries such as Willies Software's COM-DRV. It follows from this
that there is no standard way of coding for serial ports and so IMO it
will always be hit and miss whether any particular program can access
serial ports under Wine.


Martin





[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux