lkml.org 
[lkml]   [1997]   [Jul]   [11]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 10 Jul 1997 21:51:36 -0400 (EDT)
From"Richard B. Johnson" <>
SubjectRe: Bug#10918: xringd: after the first ring my RD SD led are on (fwd)
On Thu, 10 Jul 1997, Andrea Arcangeli wrote:
[SNIPPED]
> 
> #include <stdio.h>
> #include <fcntl.h>
> 
> void main(void) {
>   int fd;
>   printf("I am attempting to open modem device /dev/modem\n");
>   if((fd = open("/dev/modem",O_RDONLY))<0) {
>     printf("Modem not opened\n");
>     exit(-1);
>   }
>   printf("Modem opened successfully\n");
>   getchar();
> }
You need to set the fd to not echo characters! By default, the driver
presumes that someone is going to log in via a ttySn and they expect to
see what they typed echoed until /bin/login gets control and turns off
echo when you type a password.

When you open the "modem", the modem will detect DSR/CTS and send an
"Ok", this gets echoed back to the modem, which echoes the same thing
etc OKOKOKOKOK <forever>

If you need more help, contact me via private rjohnson@analogic.com. I
will give you working snippets of code that do the necessary stuff. I
have a "homemade" dial-back program that uses all the primatives you need.
I use this every night to get my work-system to call me back so I don't
run up a long-distance phone bill.


Cheers,
    DJ
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard B. Johnson
Analogic Corporation
  Email : rjohnson@analogic.com, johnson@analogic.com
Penguin : Linux version 2.1.44 on an i586 machine (66.15 BogoMips).
Warning : It's hard to stay on the trailing edge of technology.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


\
 
 \ /
  Last update: 2005-03-22 13:39    [from the cache]
©2003-2008