Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: egetty and vgetty




You don't actually have to open the modem in your egetty program; HylaFAX
will leave you with stdin and stdout setup to the modem.  This is intentional,
so that egetty doesn't have to know where to find the modem, or deal
with opening it correctly for shared access (e.g. Suns).
                -Cam Clarke
 
In astatos.flex-fax you write:
 
>Julio C Spinelli wrote:
>
>    Thanks for the info. egetty is nothing, it does not exist at all. The
>    only meaning of the string egetty is that if EGettyArgs is defined as
>    a non nul string and AnswerRotary is set to "extern". Hylafax will
>    call a program /bin/egetty. If that program does not exist...
>
>    It is the user/system developer's responsibility to write that
>    program. This program's job is to answer the incoming call, determine
>    its type and then exit with a CALLTYPE_XXX (FAX, DATA, DONE, ERROR,
>    VOICE) code. Hylafax will then proceed as if it itself would have
>    determined the type of call.
>
>    The issue I have is that when I do this I get a modem write error
>    after calling the sys::write(fd,......   call and as I don't fully
>    understand the inheritance rules that Sam applies and neither have I
>    been able to understand the Dispatch class. I am at a loss in trying
>    to guess what is going wrong.
>
>    This is why I am looking for any working example for simple and bare
>    bones it is.
>
>    Thanks for your help,
>
>    Julio
>
>    Note: I hope this clarifies what egetty is.
 
>Try this small example. It works for me (don't blame me about
>this C-code, it's not the way I'm writing real code :-))
>It works for me and faxgetty(1M) receives the fax fine (see the log).
 
>   matthias
 
 
>/* change this define to the real device on your system */
>#define LINE "/dev/ttyFN02"
>main()
>{
>   int fd;
>   fd = open(LINE, 2);
>   if(fd < 0)
>       exit(0);
>   write(fd, "ATA\r", 4);   /* time to pick up the call */
>   close(fd);
>   exit(2);
>}



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services