xringd problem

xringd problem

Post by Navindra Umane » Fri, 30 Jan 1998 04:00:00



Hi, I have xringd installed and it works fine, mostly.  I can get my
computer online just by phoning in.

My problem is that xringd detects RINGs even when the phone is not
ringing.  I've notice it do this when I'm online and I'm doing a mouse
operation (moving, clicking).  This is very annoying because xringd
plays a sound file every time it thinks the phone has rung (as
configured) and when the right (or wrong) RING sequence is detected,
it tends to bring my computer offline (again, as configured).

Does anyone know why this would happen?  This same phenomenon happens
with the simple uartcount.c[1] provided with xringd -- it detects
rings when there aren't any and it usually happens when I'm online
using the mouse.  My mouse is on /dev/ttyS0 and my modem on
/dev/ttyS1.  I'm running Debian 1.3.

Thanks,
Navin

[1] Here's the source for any Linux gurus who would care to glance at
    it:

/* uartcount: (linux) display the modem input interrupt counters */

#include <stdio.h>
#include <termios.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <linux/serial.h>

int main(int argc, char **argv)
{
        int fd;
        struct serial_icounter_struct c;

        if ((fd = open(argc == 2 ? argv[1] : "/dev/modem",
                        O_RDONLY | O_NONBLOCK | O_NOCTTY)) < 0) {
                perror("cannot open modem device");
                exit(1);
        }
        while (1) {
                if (ioctl(fd, TIOCGICOUNT, &c) != 0)
                        exit(1);
                printf("Count: RI=%6d # CD=%6d # CTS=%6d # DSR=%6d\n",
                       c.rng, c.dcd, c.cts, c.dsr);
                ioctl(fd, TIOCMIWAIT, TIOCM_RNG | TIOCM_CTS |
TIOCM_DSR | TIOCM_CD);
        }

Quote:}

--
"Evolution is not only about survival, it's about domination."  --Prey
 
 
 

xringd problem

Post by Victor Wagn » Fri, 06 Feb 1998 04:00:00


: Hi, I have xringd installed and it works fine, mostly.  I can get my
: computer online just by phoning in.

: My problem is that xringd detects RINGs even when the phone is not
: ringing.  I've notice it do this when I'm online and I'm doing a mouse
: operation (moving, clicking).  This is very annoying because xringd
: plays a sound file every time it thinks the phone has rung (as
: configured) and when the right (or wrong) RING sequence is detected,
: it tends to bring my computer offline (again, as configured).

: Does anyone know why this would happen?  This same phenomenon happens
: with the simple uartcount.c[1] provided with xringd -- it detects
: rings when there aren't any and it usually happens when I'm online
: using the mouse.  My mouse is on /dev/ttyS0 and my modem on
: /dev/ttyS1.  I'm running Debian 1.3.

: Thanks,
: Navin

: [1] Here's the source for any Linux gurus who would care to glance at
:     it:

[deleted]

You should make your program aware of lock files. If it detects that
there is modem activity it should first look to
/var/lock/LCK..ttyS1, and if this file exists and contain ID of valid
process, assume that it is another process playing with modem.

--
--------------------------------------------------------
I have tin news and pine mail...


 
 
 

xringd problem

Post by Navindra Umane » Sat, 07 Feb 1998 04:00:00


At one point in *spacetime
(actually 5 Feb 1998 23:01:49 +0300 in comp.os.linux.misc),


> You should make your program aware of lock files. If it detects that
> there is modem activity it should first look to
> /var/lock/LCK..ttyS1, and if this file exists and contain ID of valid
> process, assume that it is another process playing with modem.

This sounds like an excellent idea, thanks!  I'll be sure to try it
and let you know how it goes.  BTW, I'd like to point out that this
isn't my program but some of the source code included with xringd.

Navin
--
"Evolution is not only about survival, it's about domination."  --Prey

 
 
 

1. xringd and multiple telephone companies

Does xringd behave well for many telephone companies?  If I'm travelling
through several countries in Europe, dragging a computer with me, will
xringd have problems?  Is it a lot of hassle to get it working right for a
new phone company's system?

Thanks!

2. My Adaptect 1520 not found

3. xringd question.

4. Error while loading ramdisk: Error 0x08

5. xringd doesn't detect rings

6. thread extensions ideas

7. xringd resets?

8. Using USR PnP Modem

9. Xringd

10. Question: xringd and multiple telephone companies

11. xringd doesn't see RING

12. problems, problems, 37.5 GB, problems, 1024, problems...

13. Installation problems, problems, problems!