Georg,

A modem is a character device, basically, you can access it with open(),
read(), write(), and close().  However, these are not enough to do
anything useful.  You will need tcgetattr and tcsetattr and perhaps
others of the termios group (man termios) and to read the modem status,
ioctl(fd, TIOCMGET, &msr).  I don't know where that is described in the
doco, I just look in <asm/ioctls.h> when I need to know how to use it.
Msr bits are described in <asm/termios.h>, and they are _not_
necessarily the same bit positions as in the hardware register.

If you have info, try info [-f] libc, and read the section on low level
terminal IO.  If not, you should be able to get by with what is in man
termios and what you can find in the header files.  Grep is wonderful.

Lawson
          >< Microsoft free environment

This mail client runs on Wine.  Your mileage may vary.


On Fri, 5 Mar 1999, Georg Zetzsche wrote:

> Hi !
> How can I acces my modem with a C program?
> I read the Linux-Programmer's guide, but i didn't
> find anything i could understand.
> Thanks
>    georg
> 
> 




___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]

Reply via email to