aboutsummaryrefslogtreecommitdiff
path: root/src/modem.h
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2019-06-27 23:08:01 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2019-06-27 23:08:01 +0200
commitb4582f3209a4916ffaa54baa716ab27a87bb961a (patch)
tree86e8deebd6eef2c555975b4e799687644415777a /src/modem.h
parentaafbd24502d6d9883ae96a57f64fa3b5ed7c2bcb (diff)
downloadbbs-b4582f3209a4916ffaa54baa716ab27a87bb961a.tar.gz
can accept incoming calls
Diffstat (limited to 'src/modem.h')
-rw-r--r--src/modem.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/modem.h b/src/modem.h
new file mode 100644
index 0000000..bc0cfac
--- /dev/null
+++ b/src/modem.h
@@ -0,0 +1,24 @@
+/*
+ * modem.h
+ * (c) 2019, Jonas Gunz, jonasgunz.de
+ * <Description>
+ * <License>
+*/
+
+#include <unistd.h>
+#include <poll.h>
+#include <string.h>
+#include <signal.h>
+
+#define _AT "AT\r\n"
+#define _AT_ANSWER "ATA\r\n"
+#define _AT_ECHO_OFF "ATE0\r\n"
+#define _AT_ECHO_ON "ATE1\r\n\”"
+#define _AT_HANGUP "ATH\r\n"
+#define _AT_CMD_MODE "+++"
+
+int modem_accept_wait(int fd);
+
+int modem_hang(int fd);
+
+int modem_run(int fd, int argc, char* argv[]);