initial checkin from subversion
This commit is contained in:
38
wecker.c
Normal file
38
wecker.c
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
Reference in New Issue
Block a user