[Wine] Serial Ports: busy?

Martin Gregorie martin at gregorie.org
Tue Sep 29 21:33:56 CDT 2009


> In Knoppix, the ls command shows 4 serial ports.
>
Despite what I said earlier, Fedora does the same. This laptop, which
has no serial ports, still shows /dev/ttyS[0-3] if you run:

	ls /dev/ttyS*

The problem becomes one of working out which, if any, of these devices
work. Try setserial:

	setserial -a /dev/ttyS0

where -a tells setserial to report everything it knows about the serial
device. There are three possible outcomes:

1) $ setserial -a /dev/ttyS0
   /dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
	   Baud_base: 115200, close_delay: 50, divisor: 0
	   closing_wait: 3000
	   Flags: spd_normal skip_test
 
   This means the device file exists and is mapped to a physical serial
   port, known as a UART. The following word is its type: usually it
   will be an 8250, 16550 or 16550A.

2) # setserial -a /dev/ttyS0
   /dev/ttyS0, Line 0, UART: unknown, Port: 0x03f8, IRQ: 4
	   Baud_base: 115200, close_delay: 50, divisor: 0
	   closing_wait: 3000
	   Flags: spd_normal skip_test auto_irq

   This means that the device file exists but it is mapped to a broken
   or non-existent UART, described as 'unknown'.

3) # setserial -a /dev/ttyS4
   /dev/ttyS4: No such file or directory

   The device file doesn't exist.

> Wine, in Knoppix, is showing the same non-functioning with the
> software as was the case w/ SuSe 11.0
>
I've only tried two WINE apps so far. One 'just works' and can see all
six serial ports, but it is known to run under all versions of Windows
from Win98 to XP. This program downloads data from a flight recorder and
can configure it (set aircraft registration, pilot details and sync its
clock to the PC).

The other one, from the same company, can't see any serial ports. This
program was written for Windows 95/98 and has never been upgraded for
later versions of Windows. It does the same as the downloader and in
addition can analyse and display the data it has downloaded.

What is the most target version of Windows for your programs? This may
have a bearing on their ability to see the serial ports.

IME serial ports are a nightmare under DOS or Windows 95/98. I tried
programming serial ports under DOS/Win95 and could not discover any
documented serial port APIs for DOS, Windows or on the Broland C
libraries. I tried using some public domain assembler without much
success before buying the COMM-DRV package from Willies Computing Inc,
which worked perfectly. I tend to generalise this to mean that everybody
who tried serial programming on the same platform ran into the same
problems and everybody used a different solution. Consequently, I think
it may be pot luck whether a program of that age can use WINE for serial
comms.
   
> I can tell you that this is an embarrassment for me since one of our
> business lines is to convert people to linux! But the "answering/fax
> machine" is running on Windoz!
>
I sympathise. However, have you looked for a native Linux solution? That
may be the way to go, particularly as I'd expect a sensibly designed
Linux FAX solution to interface more or less seamlessly with e-mail via
the local MTA.


Martin





More information about the wine-users mailing list