fax recieve script?

bcrawford (bcrawford@sympatico.ca)
Tue, 26 Oct 1999 14:02:20 -0400


Gert Doering wrote:

> Hi,
>
> On Mon, Oct 25, 1999 at 03:36:19PM -0400, bcrawford wrote:
> > Since vgetty will not properly switch from voice to data mode on my
> > box/modem,
> > is it possible to have vgetty start a shell script to recieve a fax
> > instead of starting its own fax reciever?
>
> Hmmm, how is this fax script supposed to have more success where vgetty
> fails?  Usually the problem is in the modem itself (being too dumb to
> properly switch)...
>
> gert
> --
> USENET is *not* the non-clickable part of WWW!
>                                                            //www.muc.de/~gert/
> Gert Doering - Munich, Germany                             gert@greenie.muc.de
> fax: +49-89-35655025                        gert.doering@physik.tu-muenchen.de

Sorry, I should have been a bit more clear about what the problem was in the
first place,
My GVC (a rockwell) 56k voice/fax modem is hanging at "fax_wait_for_ok"  when
trying to recieve a fax, with vgetty set to recieve voice:fax:data.
However, if it is set to recieve  fax:data or just fax, it works fine.   So I
assume that the problem is in the switch from voice to fax mode.
I have tried everything in the docs, recompiling a few times, and everything else
i could thing of to make it switch properly  (mostly adjusting line speeds and
switchbd to every value the modem supports)  I am aware that my stupid rockwell
is at fault, but i really dont want to buy another modem ($$$)  and I cant find a
Xytel at all here or a USR for less than $300.

Marc had suggested using DTMF tones to select voice mode, which is a good idea,
but the problem itself is that my modem does not like to switch from voice to
fax.

I am curious about invoking a shell script to recieve a fax because that would
allow me to experiment a bit more, without having to recompile alot.   I think
that if I could /completely/  reset the modem after detecting a fax calling tone,
and then start something to recieve the fax without having to go through voice
mode first,  I could recieve a fax properly.

thanks to all,
 -bc

Here is copy of one call,  loglevel 9.

10/05 23:45:15 dem  waiting...
10/05 23:49:22 dem    select returned -1
10/05 23:49:22 dem   checking lockfiles, locking the line
10/05 23:49:22 dem   makelock(modem) called
10/05 23:49:22 dem   do_makelock: lock='/var/lock/LCK..modem'
10/05 23:49:22 dem   lock made
10/05 23:49:22 dem    vgetty: number of rings (3) was set directly
10/05 23:49:22 dem    vgetty: decremented number of rings (3) by 0
10/05 23:49:22 dem  wfr: waiting for ``RING''
10/05 23:49:22 dem   got: ``found''
10/05 23:49:22 dem   wfr: rc=0, drn=0
....
....     Alot of boring-looking file-parsing and AT chatter removed,
Let me know if anyone needs to
....        to see this stuff
....
10/05 23:49:29 dem    Rockwell: <DLE> <c>
10/05 23:49:29 dem    vgetty: queued event FAX_CALLING_TONE at position
0006
10/05 23:49:29 dem    vgetty: unqueued event FAX_CALLING_TONE at
position 0006
10/05 23:49:29 dem    vgetty: voice_handle_event got event
FAX_CALLING_TONE with  data <d>
10/05 23:49:29 dem    vgetty: <VOICE DATA 15660 bytes>
10/05 23:49:29 dem    vgetty: queued event RESET_WATCHDOG at position
0007
10/05 23:49:29 dem    vgetty: unqueued event RESET_WATCHDOG at position
0007
10/05 23:49:29 dem    vgetty: voice_handle_event got event
RESET_WATCHDOG with data <d>
10/05 23:49:29 dem    vgetty: <INTERRUPT PLAY>
10/05 23:49:29 dem   voice command: '' -> 'OK|VCON'
10/05 23:49:29 dem    Rockwell: VCON
10/05 23:49:29 dem    vgetty: trying data and fax connection
10/05 23:49:29 dem   voice command: 'AT#CLS=0' -> 'OK'
10/05 23:49:29 dem    vgetty: AT#CLS=0
10/05 23:49:29 dem    Rockwell: AT#CLS=0
10/05 23:49:30 dem    Rockwell: OK
10/05 23:49:30 dem   voice command: 'AT' -> 'OK'
10/05 23:49:30 dem    vgetty: AT
10/05 23:49:30 dem    Rockwell: AT
10/05 23:49:30 dem    Rockwell: OK
10/05 23:49:30 dem   voice command: 'AT+FAA=1' -> 'OK'
10/05 23:49:30 dem    vgetty: AT+FAA=1
10/05 23:49:30 dem    Rockwell: AT+FAA=1
10/05 23:49:30 dem    Rockwell: OK
10/05 23:49:30 dem   vgetty: Restoring signal handlers
10/05 23:49:30 dem  mdm_send: 'AT+FBOR=0'
10/05 23:49:30 dem    got:[0a]AT+FBOR=0[0d]
10/05 23:49:30 dem   mdm_command: string 'AT+FBOR=0'
10/05 23:49:30 dem    got:[0d][0a]OK[0d]
10/05 23:49:30 dem   mdm_command: string 'OK' -> OK
10/05 23:49:30 dem  send: ATA[0d][0a]
10/05 23:49:30 dem  waiting for ``CONNECT''
10/05 23:49:30 dem   got: ATA[0d]
10/05 23:49:30 dem    CND: OKATA[0a][0d][0a]FAX
10/05 23:49:57 dem  found action string: ``FAX''
10/05 23:49:57 dem  start fax receiver...
10/05 23:49:57 dem   fax receiver: entry
10/05 23:49:57 dem   tss: set speed to 19200 (016)
10/05 23:49:57 dem  fax_wait_for(OK)
10/05 23:49:57 dem    got:[0a][0d][0a]

------> Everythind stops here, calling fax hangs up,  and then we get:

b'b[e1][b4][c4][ff]bcb
   ^^^^this stuff shows up _after_  the calling fax hangs up. Modem
stays off-hook for +-60 seconds then hangs up.

10/05 23:51:57 dem  Warning: got alarm signal!
10/05 23:51:57 dem  mdm_read_byte: read returned -1: Interrupted system
call
10/05 23:51:57 dem  mdm_get_line: cannot read byte, return: Interrupted
system call