summaryrefslogtreecommitdiff
path: root/code/esp32/components/eos/cell_ussd.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2020-08-05 03:39:22 +0200
committerUros Majstorovic <majstor@majstor.org>2020-08-05 03:39:22 +0200
commitcf7c06297d04bade9cd04c056f9ed510e64dd7bd (patch)
treea3b8cc23574b98e10874b51d33c9fe1bfc012663 /code/esp32/components/eos/cell_ussd.c
parent5cd610a07468137066ea4daa5176c3e7045113b0 (diff)
code -> fw
Diffstat (limited to 'code/esp32/components/eos/cell_ussd.c')
-rw-r--r--code/esp32/components/eos/cell_ussd.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/code/esp32/components/eos/cell_ussd.c b/code/esp32/components/eos/cell_ussd.c
deleted file mode 100644
index 2daa00f..0000000
--- a/code/esp32/components/eos/cell_ussd.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <esp_log.h>
-
-#include "at_cmd.h"
-#include "cell.h"
-#include "gsm.h"
-
-static char cmd[256];
-
-void eos_cell_ussd_handler(unsigned char mtype, unsigned char *buffer, uint16_t size) {
- int cmd_len, rv;
-
- rv = eos_modem_take(1000);
- if (rv) return;
-
- buffer += 1;
- size -= 1;
- switch (mtype) {
- case EOS_CELL_MTYPE_USSD_REQUEST:
- if (size == 0) return;
-
- buffer[size] = '\0';
- cmd_len = snprintf(cmd, sizeof(cmd), "AT+CUSD=1,\"%s\",15\r", buffer);
- if ((cmd_len < 0) || (cmd_len >= sizeof(cmd))) return;
- at_cmd(cmd);
-
- break;
- }
-
- eos_modem_give();
-}
-