vgetty problem

Sebastian Fritsch (s.fritsch@usa.net)
Sun, 20 Sep 1998 19:01:18 +0200


Hello,

about one or two weeks ago I wrote that I have a problem with vgetty.
Now I took the time to log it with vgetty debug level 6. But I'm not
able to understand where the error is.

First I show you the log file. Then I print the used script.

1:

09/20 18:46:09 yS0  vgetty: Executing shell script
/home/faxadmin/bin/vb.sh with s
hell /bin/sh
09/20 18:46:09 yS0    vgetty: opening pipes
09/20 18:46:09 yS0    vgetty: forking shell
09/20 18:46:09 yS0   vgetty(0): HELLO SHELL
09/20 18:46:09 yS0    vgetty: Got pipe signal
09/20 18:46:09 yS0    vgetty: queued event 0x4004 at position 0005
09/20 18:46:09 yS0    vgetty: unqueued event 0x4000 at position 0000
09/20 18:46:09 yS0    vgetty: voice_handle_event got event 0x4000 with
data <_>
09/20 18:46:09 yS0    vgetty: unqueued event 0x4000 at position 0001
09/20 18:46:09 yS0    vgetty: voice_handle_event got event 0x4000 with
data <_>
09/20 18:46:09 yS0    vgetty: unqueued event 0x4000 at position 0002
09/20 18:46:09 yS0    vgetty: voice_handle_event got event 0x4000 with
data <_>
09/20 18:46:09 yS0    vgetty: unqueued event 0x4000 at position 0003
09/20 18:46:09 yS0    vgetty: voice_handle_event got event 0x4000 with
data <_>
09/20 18:46:09 yS0    vgetty: unqueued event 0x4000 at position 0004
09/20 18:46:09 yS0    vgetty: voice_handle_event got event 0x4000 with
data <_>
09/20 18:46:09 yS0    vgetty: unqueued event 0x4004 at position 0005
09/20 18:46:09 yS0    vgetty: voice_handle_event got event 0x4004 with
data <_>
09/20 18:46:09 yS0   shell(1): HELLO VOICE PROGRAM
09/20 18:46:09 yS0   vgetty(1): READY
09/20 18:46:09 yS0   vgetty: initialized communication
09/20 18:46:09 yS0    vgetty: Got pipe signal
09/20 18:46:09 yS0    vgetty: queued event 0x4004 at position 0006
09/20 18:46:09 yS0    vgetty: unqueued event 0x4004 at position 0006
09/20 18:46:09 yS0    vgetty: voice_handle_event got event 0x4004 with
data <_>
09/20 18:46:09 yS0   shell(1): DEVICE INTERNAL_SPEAKER
09/20 18:46:09 yS0    vgetty: queued event 0x4000 at position 0007
09/20 18:46:09 yS0    Elsa MicroLink: _INT_SEAK: (6)
09/20 18:46:09 yS0   voice command: 'AT#VLS=2' -> 'VCON'
09/20 18:46:09 yS0    vgetty: AT#VLS=2
09/20 18:46:09 yS0    Elsa MicroLink: AT#VLS=2
09/20 18:46:09 yS0    Elsa MicroLink: ERROR
09/20 18:46:09 yS0  vgetty: Modem returned ERROR: Interrupted system
call
09/20 18:46:09 yS0   vgetty(1): READY
09/20 18:46:09 yS0    vgetty: unqueued event 0x4000 at position 0007
09/20 18:46:09 yS0    vgetty: voice_handle_event got event 0x4000 with
data <_>
09/20 18:46:09 yS0    vgetty: Got pipe signal
09/20 18:46:09 yS0    vgetty: queued event 0x4004 at position 0008
09/20 18:46:09 yS0    vgetty: unqueued event 0x4004 at position 0008
09/20 18:46:09 yS0    vgetty: voice_handle_event got event 0x4004 with
data <_>
09/20 18:46:09 yS0   shell(1): GOODBYE
09/20 18:46:09 yS0   vgetty(1): GOODBYE SHELL
09/20 18:46:09 yS0    vgetty: Got child changed status signal
09/20 18:46:09 yS0    vgetty: queued event 0x4001 at position 0009
09/20 18:46:09 yS0   vgetty: shell exited normally with status 0x0000
09/20 18:46:09 yS0    vgetty: queued event 0x4000 at position 0010
09/20 18:46:09 yS0    Elsa MicroLink: _NO_DEV: (1)
09/20 18:46:09 yS0   voice command: 'AT#VLS=0' -> 'OK'
09/20 18:46:09 yS0    vgetty: AT#VLS=0
09/20 18:46:09 yS0    Elsa MicroLink: AT#VLS=0
09/20 18:46:09 yS0    Elsa MicroLink: OK
09/20 18:46:09 yS0   vgetty: leaving voice mode
09/20 18:46:09 yS0    vgetty: queued event 0x4000 at position 0011
09/20 18:46:09 yS0   voice command: 'AT#CLS=2' -> 'OK'
09/20 18:46:09 yS0    vgetty: AT#CLS=2
09/20 18:46:09 yS0    Elsa MicroLink: AT#CLS=2
09/20 18:46:09 yS0    Elsa MicroLink: OK
09/20 18:46:09 yS0   voice command: 'AT' -> 'OK'
09/20 18:46:09 yS0    vgetty: AT
09/20 18:46:09 yS0    Elsa MicroLink: AT
09/20 18:46:09 yS0    Elsa MicroLink: OK
09/20 18:46:09 yS0   vgetty: Restoring signal handlers
09/20 18:46:09 yS0  closing voice modem device
09/20 18:46:10 yS0   removing lock file

2:

#! /usr/local/bin/vm shell
 
#
# Define the function to receive an answer from the voice library
#
 
function receive
     {
     read -r INPUT <&$VOICE_INPUT;
     echo "$INPUT";
     }
 
#
# Define the function to send a command to the voice library
#
 
function send
     {
     echo $1 >&$VOICE_OUTPUT;
     kill -PIPE $VOICE_PID
     }
 
#
# Let's see if the voice library is talking to us
#
 
ANSWER=`receive`
 
if [ "$ANSWER" != "HELLO SHELL" ]; then
     echo "$0: voice library not answering" >&2
     exit 1
fi
 
#
# Let's answer the message
#
 
send "HELLO VOICE PROGRAM"
 
#
# Let's see if it worked
#
 
ANSWER=`receive`
 
if [ "$ANSWER" != "READY" ]; then
     echo "$0: initialization failed" >&2
     exit 1
fi
 
#
# Set the device
#
 
if [ "$1" = "dialup" ]; then
     send "DEVICE DIALUP_LINE"
else
     send "DEVICE INTERNAL_SPEAKER"
fi
 
#
# Let's see if it worked
#
 
ANSWER=`receive`
 
if [ "$ANSWER" != "READY" ]; then
     echo "$0: could not set output device" >&2
     exit 1
fi
 
#
# Let's send demo.rmd if it exists
#
 
if [ -f demo.rmd ]; then
     send "PLAY demo.rmd"
 
     #
     # Let's see if it works
     #
 
     ANSWER=`receive`
 
     if [ "$ANSWER" != "PLAYING" ]; then
          echo "$0: could not start playing" >&2
          exit 1
     fi
 
     ANSWER=`receive`
 
     if [ "$ANSWER" != "READY" ]; then
          echo "$0: something went wrong on playing" >&2
          exit 1
     fi
 
fi
 
#
# Let's record a new demo.rmd if we are connected to the dialup
# line
#
 
if [ "$1" = "dialup" ]; then
     #
     # Let's send a beep
     #
 
     send "BEEP"
 
     #
     # Let's see if it works
     #
 
     ANSWER=`receive`
 
     if [ "$ANSWER" != "BEEPING" ]; then
          echo "$0: could not send a beep" >&2
          exit 1
     fi
 
     ANSWER=`receive`
 
     if [ "$ANSWER" != "READY" ]; then
          echo "$0: could not send a beep" >&2
          exit 1
     fi
 
     #
     # Let's start the recording
     #
 
     send "RECORD demo.rmd"
 
     #
     # Let's see if it works
     #
 
     ANSWER=`receive`
 
     if [ "$ANSWER" != "RECORDING" ]; then
          echo "$0: could not start recording" >&2
          exit 1
     fi
 
     ANSWER=`receive`
 
     if [ "$ANSWER" != "READY" ]; then
          echo "$0: something went wrong on recording" >&2
          exit 1
     fi
 
     #
     # Let's send a final beep
     #
 
     send "BEEP"
 
     #
     # Let's see if it works
     #
 
     ANSWER=`receive`
 
     if [ "$ANSWER" != "BEEPING" ]; then
          echo "$0: could not send a beep" >&2
          exit 1
     fi
 
     ANSWER=`receive`
 
     if [ "$ANSWER" != "READY" ]; then
          echo "$0: could not send a beep" >&2
          exit 1
     fi
 
fi
 
#
# Let's say goodbye
#
 
send "GOODBYE"
 
#
# Let's see if the voice library got it
#
 
ANSWER=`receive`
 
if [ "$ANSWER" != "GOODBYE SHELL" ]; then
     echo "$0: could not say goodbye to the voice library" >&2
     exit 1
fi
 
exit 0