Serial Ports: busy?
- driveoldford
- Level 1
- Posts: 5
- Joined: Thu Sep 17, 2009 12:28 pm
Serial Ports: busy?
I have several software packages for Windoz that provide for a phone/fax answering machine. In the newer wine, I can install, but cannot get access to the Com port. I have created the ln -s in dosdevices, and even did a chmod 777 on dev/ttyS0. The user is a member of groups associated w/ modems, dialout, etc.
I always get "the port is being accessed by another program". I am stuck on two very different machines. Both run Open SuSe 11.0 Anyone solved this?
Thanks, FX
I always get "the port is being accessed by another program". I am stuck on two very different machines. Both run Open SuSe 11.0 Anyone solved this?
Thanks, FX
Serial Ports: busy?
On Thu, 2009-09-17 at 12:43 -0500, driveoldford wrote:
logger. BTW, it applies to all programs, e.g. Kermit and minicom, as
well as WINE apps that are run by normal users. With current,
udev-based, kernels its necessary to reset the permissions
of /dev/ttyS[0-9] after every boot. I added a local rule file
to /etc/udev/rules.d:
$ cat 51-local.rules
#
# Locally defined rules.
#
#
# Give world read/write access to ttyS* and ttyUSB* serial devices
#
KERNEL=="tty[A-Z]*", GROUP="uucp", MODE="0666"
$
This works under Fedora 6 through Fedora 10. Under earlier releases it
was sufficient to add a line containing:
chmod uga+rw /dev/ttyS*
to /etc/rc.d/rc.local so it got run at boot time, but IIRC this doesn't
work with UDEV since all the /dev/ttyS* devices are no longer created ar
boot time.
On Fedora 10 and WINE 1.1.23 this works with all real serial ports (I
have two on the mobo and another 4 on an IPC card) without needing to
add COMn: symlinks to the dosdevices directory. I have never been able
to access USB serial adapters from WINE, probably because they need
special Windows drivers.
Martin
I had a similar problem with a WINE app that downloads files from aI have several software packages for Windoz that provide for a
phone/fax answering machine. In the newer wine, I can install, but
cannot get access to the Com port. I have created the ln -s in
dosdevices, and even did a chmod 777 on dev/ttyS0. The user is a
member of groups associated w/ modems, dialout, etc.
I always get "the port is being accessed by another program". I am
stuck on two very different machines. Both run Open SuSe 11.0 Anyone
solved this?
logger. BTW, it applies to all programs, e.g. Kermit and minicom, as
well as WINE apps that are run by normal users. With current,
udev-based, kernels its necessary to reset the permissions
of /dev/ttyS[0-9] after every boot. I added a local rule file
to /etc/udev/rules.d:
$ cat 51-local.rules
#
# Locally defined rules.
#
#
# Give world read/write access to ttyS* and ttyUSB* serial devices
#
KERNEL=="tty[A-Z]*", GROUP="uucp", MODE="0666"
$
This works under Fedora 6 through Fedora 10. Under earlier releases it
was sufficient to add a line containing:
chmod uga+rw /dev/ttyS*
to /etc/rc.d/rc.local so it got run at boot time, but IIRC this doesn't
work with UDEV since all the /dev/ttyS* devices are no longer created ar
boot time.
On Fedora 10 and WINE 1.1.23 this works with all real serial ports (I
have two on the mobo and another 4 on an IPC card) without needing to
add COMn: symlinks to the dosdevices directory. I have never been able
to access USB serial adapters from WINE, probably because they need
special Windows drivers.
Martin
- driveoldford
- Level 1
- Posts: 5
- Joined: Thu Sep 17, 2009 12:28 pm
Serial Ports
Thanks for the reply. Unfortunately, it does not seem to be permissions problems.
I tried exactly what you had suggested - no go. I have tried three different software packages - all w/ the same result - cannot access the com port.
Anybody else having problems w/ serial ports in Wine?
Thanks, FXS
I tried exactly what you had suggested - no go. I have tried three different software packages - all w/ the same result - cannot access the com port.
Anybody else having problems w/ serial ports in Wine?
Thanks, FXS
Serial Ports: busy?
On Mon, 2009-09-21 at 15:48 -0500, driveoldford wrote:
than two serial ports.
If you have extra ports installed, Linux won't know they are there
unless you add this argument to the boot command:
8250.nr_uarts=6
where the value '6' is the number of ports you have installed (I have 6:
the two on the mother board and another 4 on an PCI serial adapter
card).
If you haven't added any serial cards, check the dmesg report (use
"dmesg | less") to make sure the kernel recognizes all the serial ports
it should. If there are missing ports, try using the '8250.nr_uarts=n'
kernel argument from GRUB's boot-time command prompt to see if it helps.
If it does, edit /boot/grub/grub.conf to make it permanent. Add it to
the default boot stanza (usually the first in the file) by adding it,
preceded by a space, to the end of the 'kernel' line. It will be
automatically copied to the new stanza each time there's a kernel
upgrade, but keep a record of it in a safe place since you'll have to
add it manually after a clean install.
The above assumes that you're using a genuine serial port (implemented
by an 8250 or 16550 chip on the mother board or an adapter card) and not
a USB serial adapter. Wine doesn't support USB serial adapters.
Martin
I forgot one thing, but AFAIK this is only important if you have moreThanks for the reply. Unfortunately, it does not seem to be permissions problems.
I tried exactly what you had suggested - no go. I have tried three different software packages - all w/ the same result - cannot access the com port.
Anybody else having problems w/ serial ports in Wine?
Thanks, FXS
than two serial ports.
If you have extra ports installed, Linux won't know they are there
unless you add this argument to the boot command:
8250.nr_uarts=6
where the value '6' is the number of ports you have installed (I have 6:
the two on the mother board and another 4 on an PCI serial adapter
card).
If you haven't added any serial cards, check the dmesg report (use
"dmesg | less") to make sure the kernel recognizes all the serial ports
it should. If there are missing ports, try using the '8250.nr_uarts=n'
kernel argument from GRUB's boot-time command prompt to see if it helps.
If it does, edit /boot/grub/grub.conf to make it permanent. Add it to
the default boot stanza (usually the first in the file) by adding it,
preceded by a space, to the end of the 'kernel' line. It will be
automatically copied to the new stanza each time there's a kernel
upgrade, but keep a record of it in a safe place since you'll have to
add it manually after a clean install.
The above assumes that you're using a genuine serial port (implemented
by an 8250 or 16550 chip on the mother board or an adapter card) and not
a USB serial adapter. Wine doesn't support USB serial adapters.
Martin
Re: Serial Ports: busy?
Just pick a native Linus program instead. You moved to Linux why? So you can run some crappy windows software?driveoldford wrote:I have several software packages for Windoz that provide for a phone/fax answering machine.
- driveoldford
- Level 1
- Posts: 5
- Joined: Thu Sep 17, 2009 12:28 pm
Serial Ports: busy?
On Sun, 2009-09-27 at 09:39 -0500, driveoldford wrote:
running this command:
ls -l /dev/ttyS*
which should only find ttyS0 and show its access permissions. Post its
output here.
the output from the same command for it as well.
Martin
Then it should be /dev/ttyS0 because that's what I'd expect to see. TryMartin:
"Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled"
So, I guess this means the serial port (there is only one) is found.
running this command:
ls -l /dev/ttyS*
which should only find ttyS0 and show its access permissions. Post its
output here.
This computer should have found at least two serial to have ttyS1. PostI'm still stuck. However, on one of the computers, the serial is defined as ttyS1,
so, I'll try linking to that. Down, but not dead!
the output from the same command for it as well.
Martin
- driveoldford
- Level 1
- Posts: 5
- Joined: Thu Sep 17, 2009 12:28 pm
Here goes:
linux-w5px:/proc # chmod 777 /dev/ttyS*
linux-w5px:/proc # ls -l /dev/ttyS*
crwxrwxrwx 1 root uucp 4, 64 2009-04-14 06:32 /dev/ttyS0
crwxrwxrwx 1 root uucp 4, 65 2009-04-14 06:32 /dev/ttyS1
crwxrwxrwx 1 root uucp 4, 66 2009-04-14 06:32 /dev/ttyS2
crwxrwxrwx 1 root uucp 4, 67 2009-04-14 06:32 /dev/ttyS3
crwxrwxrwx 1 root uucp 4, 68 2009-04-14 06:32 /dev/ttyS4
crwxrwxrwx 1 root uucp 4, 69 2009-04-14 06:32 /dev/ttyS5
crwxrwxrwx 1 root uucp 4, 70 2009-04-14 06:32 /dev/ttyS6
crwxrwxrwx 1 root uucp 4, 71 2009-04-14 06:32 /dev/ttyS7
I should point out that I'm trying two different computers: an old IBM laptop 600X, and, a really old Toshiba desktop. Both! have exactly the same ls listing!
Software is Chyenne Bitware Voice Mail System (works real well). When I try to "setup" the modem - the message is: "... com port currently used by another application ...". But it's not, that I am aware of.
Dmesg on the old Toshiba referenced ttyS1, so, I have links in dosdevices to both com1 and com2. As you can see, I don't think this is a permissions issue.
Interestingly, I have some really old DOS "Testcoms" software. Both report no com port (in xdosemu)!
Is this an old Bios issue?
linux-w5px:/proc # chmod 777 /dev/ttyS*
linux-w5px:/proc # ls -l /dev/ttyS*
crwxrwxrwx 1 root uucp 4, 64 2009-04-14 06:32 /dev/ttyS0
crwxrwxrwx 1 root uucp 4, 65 2009-04-14 06:32 /dev/ttyS1
crwxrwxrwx 1 root uucp 4, 66 2009-04-14 06:32 /dev/ttyS2
crwxrwxrwx 1 root uucp 4, 67 2009-04-14 06:32 /dev/ttyS3
crwxrwxrwx 1 root uucp 4, 68 2009-04-14 06:32 /dev/ttyS4
crwxrwxrwx 1 root uucp 4, 69 2009-04-14 06:32 /dev/ttyS5
crwxrwxrwx 1 root uucp 4, 70 2009-04-14 06:32 /dev/ttyS6
crwxrwxrwx 1 root uucp 4, 71 2009-04-14 06:32 /dev/ttyS7
I should point out that I'm trying two different computers: an old IBM laptop 600X, and, a really old Toshiba desktop. Both! have exactly the same ls listing!
Software is Chyenne Bitware Voice Mail System (works real well). When I try to "setup" the modem - the message is: "... com port currently used by another application ...". But it's not, that I am aware of.
Dmesg on the old Toshiba referenced ttyS1, so, I have links in dosdevices to both com1 and com2. As you can see, I don't think this is a permissions issue.
Interestingly, I have some really old DOS "Testcoms" software. Both report no com port (in xdosemu)!
Is this an old Bios issue?
Serial Ports: busy?
On Sun, 2009-09-27 at 14:27 -0500, driveoldford wrote:
peripheral management came in the system probes the hardware at boot
time and builds an entry in the /dev directory for everything it finds.
This implies that it should not set up device names for non-existent
devices. The extras will never be used since, if you plug in a USB
device with serial ports these are all called /dev/ttyUSB*
How many physical serial ports does each system have?
Assume anything that exists is numbered from zero and only use items in
that range. You could also try limiting it to reality by adding the
8250.nr_uarts=6
kernel argument to the GRUB boot command line Its usually
in /boot/grub/grub.conf and you should add it to the end of the first
'kernel' line in the file. Needless to say, the number after the '=' is
the number of serial ports you actually have - I have six.
loader does: the BIOS starts it and then it uses BIOS disk access calls
to read the Linux kernel into memory. Once that's done it is overwritten
and vanishes.
Martin
To my way of thinking this is a bug in your distro: since UDEVHere goes:
linux-w5px:/proc # chmod 777 /dev/ttyS*
linux-w5px:/proc # ls -l /dev/ttyS*
crwxrwxrwx 1 root uucp 4, 64 2009-04-14 06:32 /dev/ttyS0
crwxrwxrwx 1 root uucp 4, 65 2009-04-14 06:32 /dev/ttyS1
crwxrwxrwx 1 root uucp 4, 66 2009-04-14 06:32 /dev/ttyS2
crwxrwxrwx 1 root uucp 4, 67 2009-04-14 06:32 /dev/ttyS3
crwxrwxrwx 1 root uucp 4, 68 2009-04-14 06:32 /dev/ttyS4
crwxrwxrwx 1 root uucp 4, 69 2009-04-14 06:32 /dev/ttyS5
crwxrwxrwx 1 root uucp 4, 70 2009-04-14 06:32 /dev/ttyS6
crwxrwxrwx 1 root uucp 4, 71 2009-04-14 06:32 /dev/ttyS7
peripheral management came in the system probes the hardware at boot
time and builds an entry in the /dev directory for everything it finds.
This implies that it should not set up device names for non-existent
devices. The extras will never be used since, if you plug in a USB
device with serial ports these are all called /dev/ttyUSB*
How many physical serial ports does each system have?
Assume anything that exists is numbered from zero and only use items in
that range. You could also try limiting it to reality by adding the
8250.nr_uarts=6
kernel argument to the GRUB boot command line Its usually
in /boot/grub/grub.conf and you should add it to the end of the first
'kernel' line in the file. Needless to say, the number after the '=' is
the number of serial ports you actually have - I have six.
No. AFAIK Linux doesn't use the BIOS at all. However, the GRUB bootIs this an old Bios issue?
loader does: the BIOS starts it and then it uses BIOS disk access calls
to read the Linux kernel into memory. Once that's done it is overwritten
and vanishes.
Martin
- driveoldford
- Level 1
- Posts: 5
- Joined: Thu Sep 17, 2009 12:28 pm
Martin:
Thanks for your continued interest and input.
Most of my effort is on the old Toshiba. This is a multi-boot machine w/ Win 2000,Open SuSe 11.0 and Knoppix, which is a debian distro.
This machine has one physical serial port.
In Knoppix, the ls command shows 4 serial ports.
Wine, in Knoppix, is showing the same non-functioning with the software as was the case w/ SuSe 11.0
Just to be sure, I attempted to install all 3 commercial packages that I have. Same result. The software does not seem to properly capture the serial port. W/ communicate Pro (not a very good package) the software claimed that it did, in fact, connect w/ the proper serial port ( a success message) - but - nothing really worked at all and I had to terminate w/ a kill command.
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!
Regards, FXS
Thanks for your continued interest and input.
Most of my effort is on the old Toshiba. This is a multi-boot machine w/ Win 2000,Open SuSe 11.0 and Knoppix, which is a debian distro.
This machine has one physical serial port.
In Knoppix, the ls command shows 4 serial ports.
Wine, in Knoppix, is showing the same non-functioning with the software as was the case w/ SuSe 11.0
Just to be sure, I attempted to install all 3 commercial packages that I have. Same result. The software does not seem to properly capture the serial port. W/ communicate Pro (not a very good package) the software claimed that it did, in fact, connect w/ the proper serial port ( a success message) - but - nothing really worked at all and I had to terminate w/ a kill command.
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!
Regards, FXS
Serial Ports: busy?
Despite what I said earlier, Fedora does the same. This laptop, whichIn Knoppix, the ls command shows 4 serial ports.
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.
I've only tried two WINE apps so far. One 'just works' and can see allWine, in Knoppix, is showing the same non-functioning with the
software as was the case w/ SuSe 11.0
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 sympathise. However, have you looked for a native Linux solution? ThatI 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!
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