Files
clearn/wecker.c

39 lines
617 B
C
Raw Normal View History

2017-02-07 20:03:49 +00:00
/*
* wecker.c
* Kommuniziert mit dem Modem
*
* Version 1.00
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <fcntl.h>
#include <signal.h>
#include <ctype.h>
#include <syslog.h>
int main(int argc, char *argv[])
{
int fd = 0;
if ((fd = open("/dev/modem", O_RDWR | O_NDELAY)) == -1)
{
perror("open failed!");
return 1;
}
if ( write (fd, "AT&F1X3DT23\r", 13)==-1)
{perror ("write failed!");}
close(fd);
return 1;
}