Problem with two mgetty tasks on two different serial ports

Ruben Fagundo (ruben@npv.com)
Tue, 11 May 1999 21:32:53 -0400


I was wondering if any one had seen something similar to this.  I have
tried several variations to try and solve this, but this is what I have
concluded.  Any help appreciated.

I have two mgetty tasks running on two com ports com1 and com2 as seen
in this segment of the RH5.1 Linux inittab:

d4:12345:respawn:/sbin/mgetty -x 9 /dev/ttyS0
d5:12345:respawn:/sbin/mgetty -x 9 /dev/ttyS1

I want them to both accept concurrent login, and/or fax messages,
independent of each other, i.e, one could be receiving a fax, while the
other has a ppp connection going, or two ppp connections going.  The
problem is that when both mgetty tasks are going at the same time, and a
fax comes in, it picks up the line, then hangs it up again.  I am using
two external Courier V. Everything modems at this point, and the same
thing happens on both.  Here is the section of the log file.

Notice that at 12:09, the  "alarm signal occurred".  I am also including
the matching section of the messages file for completeness.  I have
tried this on both modems with the same results.  minicom seems to work
OK.  The com ports all have separate IRQ's.  When I disable one of the
mgetty tasks, from the inittab, everything works fine.  Also note that
the additional com port is coming from an ISA card that was added
because the system only had one com port natively.  I'm lost on this
one....

05/08 12:08:56 yS0   makelock(ttyS0) called
05/08 12:08:56 yS0   do_makelock: lock='/var/lock/LCK..ttyS0'
05/08 12:08:56 yS0   lock made
05/08 12:08:57 yS0   tio_get_rs232_lines: status: RTS CTS DSR DTR
05/08 12:08:57 yS0  lowering DTR to reset Modem
05/08 12:08:57 yS0   tss: set speed to 38400 (017)
05/08 12:08:57 yS0   tio_set_flow_control( HARD )
05/08 12:08:57 yS0   waiting for line to clear (VTIME), read:
05/08 12:08:58 yS0  send: ATS0=0Q0&D3&C1 OK[0d]
05/08 12:08:58 yS0  mdm_send: 'ATI'
05/08 12:08:58 yS0    got:ATS0=0Q0&D3&C1 OK[0d]
05/08 12:08:58 yS0   mdm_gis: string 1: 'ATS0=0Q0&D3&C1 OK'
05/08 12:08:58 yS0    got:[0d][0a]NO CARRIER[0d]
05/08 12:08:58 yS0   mdm_gis: string 2: 'NO CARRIER'
05/08 12:08:58 yS0    got:[0a]
05/08 12:09:08 yS0  Warning: got alarm signal!
05/08 12:09:08 yS0  mdm_read_byte: read returned -1: Interrupted system
call
05/08 12:09:08 yS0  mdm_get_line: cannot read byte, return: Interrupted
system call
05/08 12:09:08 yS0   mdm_identify: string '<ERROR>'
05/08 12:09:08 yS0  mdm_identify: can't get modem ID
05/08 12:09:08 yS0  mdm_send: 'AT+FCLASS=?'
05/08 12:09:08 yS0    got:AT+FCLASS=?[0d]
05/08 12:09:08 yS0    got:[0d][0a]0,1,2.0[0d]
05/08 12:09:08 yS0   mdm_gis: string 1: '0,1,2.0'
05/08 12:09:08 yS0    got:[0a][0d][0a]OK[0d]
05/08 12:09:08 yS0  available modem classes: 0,1,2.0
05/08 12:09:08 yS0  mdm_send: 'AT+FCLASS=2.0'
05/08 12:09:08 yS0    got:[0a]AT+FCLASS=2.0[0d]
05/08 12:09:08 yS0   mdm_command: string 'AT+FCLASS=2.0'
05/08 12:09:08 yS0    got:[0d][0a]OK[0d]
05/08 12:09:08 yS0   mdm_command: string 'OK' -> OK
05/08 12:09:08 yS0  mdm_send: 'AT+FAA=1;+FCR=1'
05/08 12:09:08 yS0    got:[0a]AT+FAA=1;+FCR=1[0d]
05/08 12:09:08 yS0   mdm_command: string 'AT+FAA=1;+FCR=1'
05/08 12:09:08 yS0    got:[0d][0a]OK[0d]
05/08 12:09:08 yS0   mdm_command: string 'OK' -> OK
05/08 12:09:08 yS0  mdm_send: 'AT+FBO=1'
05/08 12:09:08 yS0    got:[0a]AT+FBO=1[0d]
05/08 12:09:08 yS0   mdm_command: string 'AT+FBO=1'
05/08 12:09:08 yS0    got:[0d][0a]OK[0d]
05/08 12:09:08 yS0   mdm_command: string 'OK' -> OK
05/08 12:09:08 yS0  mdm_send: 'AT+FNR=1,1,1,0'
05/08 12:09:08 yS0    got:[0a]AT+FNR=1,1,1,0[0d]
05/08 12:09:08 yS0   mdm_command: string 'AT+FNR=1,1,1,0'
05/08 12:09:08 yS0    got:[0d][0a]OK[0d]
05/08 12:09:08 yS0   mdm_command: string 'OK' -> OK
05/08 12:09:08 yS0  mdm_send: 'AT+FLI="617-436-5141"'
05/08 12:09:08 yS0    got:[0a]AT+FLI="777-868-2141"[0d]
05/08 12:09:08 yS0   mdm_command: string 'AT+FLI="777-868-2141"'
05/08 12:09:08 yS0    got:[0d][0a]OK[0d]
05/08 12:09:08 yS0   mdm_command: string 'OK' -> OK
05/08 12:09:08 yS0  mdm_send: 'AT+FCC=1'
05/08 12:09:08 yS0    got:[0a]AT+FCC=1[0d]
05/08 12:09:08 yS0   mdm_command: string 'AT+FCC=1'
05/08 12:09:08 yS0    got:[0d][0a]OK[0d]
05/08 12:09:08 yS0   mdm_command: string 'OK' -> OK
05/08 12:09:08 yS0   waiting for line to clear (VTIME), read:
05/08 12:09:09 yS0   removing lock file
05/08 12:09:09 yS0  waiting...
05/08 12:18:34 ##### failed dev=ttyS0, pid=431, got signal 15, exiting

############ messages log file #############
May  8 12:09:01 awc PAM_pwdb[433]: (login) session opened for user root
by (uid=0)
May  8 12:09:01 awc login[433]: ROOT LOGIN ON tty1
May  8 12:09:41 awc ifup-ppp: pppd started for ppp1 on /dev/ttyS1 at
115200
May  8 12:09:41 awc modprobe: can't locate module ppp0
May  8 12:09:41 awc kernel: registered device ppp0
May  8 12:09:41 awc pppd[474]: pppd 2.3.3 started by root, uid 0
May  8 12:09:42 awc chat[477]: send (ATZ^M)
May  8 12:09:42 awc chat[477]: expect (OK)
May  8 12:09:42 awc chat[477]: ATZ^M^M
May  8 12:09:42 awc chat[477]: OK
May  8 12:09:42 awc chat[477]:  -- got it
May  8 12:09:42 awc chat[477]: send (ATDT967-2002^M)
May  8 12:09:43 awc chat[477]: expect (CONNECT)
May  8 12:09:43 awc chat[477]: ^M
May  8 12:10:01 awc chat[477]: ATDT967-2902^M^M
May  8 12:10:01 awc chat[477]: CONNECT
May  8 12:10:01 awc chat[477]:  -- got it
May  8 12:10:01 awc chat[477]: send (^M)
May  8 12:10:01 awc chat[477]: expect (ogin:)
May  8 12:10:01 awc chat[477]:  24000/ARQ/V34/LAPM/V42BIS^M
May  8 12:10:02 awc chat[477]: ^M
May  8 12:10:02 awc chat[477]: ^MRedelease 5.1 (Manhattan)
May  8 12:10:02 awc chat[477]: ^MKernel 2.0.34 on an i586
May  8 12:10:02 awc chat[477]: ^M
May  8 12:10:02 awc chat[477]: ^M^M