summaryrefslogtreecommitdiff
path: root/fw/esp32/components/eos/include/cell.h
diff options
context:
space:
mode:
Diffstat (limited to 'fw/esp32/components/eos/include/cell.h')
-rw-r--r--fw/esp32/components/eos/include/cell.h41
1 files changed, 31 insertions, 10 deletions
diff --git a/fw/esp32/components/eos/include/cell.h b/fw/esp32/components/eos/include/cell.h
index 2cbba7e..269615d 100644
--- a/fw/esp32/components/eos/include/cell.h
+++ b/fw/esp32/components/eos/include/cell.h
@@ -12,7 +12,7 @@
#define EOS_CELL_MAX_MTYPE 8
/* EOS_CELL_MTYPE_DEV subtypes */
-#define EOS_CELL_MTYPE_READY 1
+#define EOS_CELL_MTYPE_STATUS 1
#define EOS_CELL_MTYPE_UART_DATA 2
#define EOS_CELL_MTYPE_UART_TAKE 3
#define EOS_CELL_MTYPE_UART_GIVE 4
@@ -38,43 +38,64 @@
#define EOS_CELL_MTYPE_USSD_REPLY 2
#define EOS_CELL_MTYPE_USSD_CANCEL 3
-#define EOS_CELL_MTYPE_PDP_CONFIG 1
-#define EOS_CELL_MTYPE_PDP_CONNECT 2
-#define EOS_CELL_MTYPE_PDP_DISCONNECT 3
+#define EOS_CELL_MTYPE_PDP_GET_APN 1
+#define EOS_CELL_MTYPE_PDP_GET_USR 2
+#define EOS_CELL_MTYPE_PDP_GET_PWD 3
+#define EOS_CELL_MTYPE_PDP_SET_APN 4
+#define EOS_CELL_MTYPE_PDP_SET_USR 5
+#define EOS_CELL_MTYPE_PDP_SET_PWD 6
+#define EOS_CELL_MTYPE_PDP_CONNECT 7
+#define EOS_CELL_MTYPE_PDP_DISCONNECT 8
+
+#define EOS_CELL_STATUS_RESET 0
+#define EOS_CELL_STATUS_IDLE 1
+#define EOS_CELL_STATUS_RELAY 2
+#define EOS_CELL_STATUS_PPP 3
#define EOS_CELL_SMS_ADDRTYPE_INTL 1
#define EOS_CELL_SMS_ADDRTYPE_ALPHA 2
#define EOS_CELL_SMS_ADDRTYPE_OTHER 3
+#define EOS_CELL_PDP_SIZE_APN 64
+#define EOS_CELL_PDP_SIZE_USR 64
+#define EOS_CELL_PDP_SIZE_PWD 64
+#define EOS_CELL_PDP_SIZE_ARG 64
+
#define EOS_CELL_UART_MODE_NONE 0
#define EOS_CELL_UART_MODE_ATCMD 1
#define EOS_CELL_UART_MODE_PPP 2
#define EOS_CELL_UART_MODE_RELAY 3
-#define EOS_CELL_UART_MODE_UNDEF 0xff
-#define EOS_CELL_UART_SIZE_BUF 1024
+#define EOS_CELL_MAX_USSD_STR 128
+#define EOS_CELL_MAX_DIAL_STR 128
-#define EOS_CELL_MAX_USSD_STR 256
-#define EOS_CELL_MAX_DIAL_STR 256
+#define EOS_CELL_UART_SIZE_BUF 1024
void eos_cell_init(void);
void eos_modem_init(void);
+int eos_modem_atinit(void);
void eos_modem_flush(void);
size_t eos_modem_write(void *data, size_t size);
size_t eos_modem_read(void *data, size_t size, uint32_t timeout);
int eos_modem_readln(char *buf, size_t buf_size, uint32_t timeout);
int eos_modem_resp(char *ok_str, char *err_str, uint32_t timeout);
uint8_t eos_modem_get_mode(void);
+size_t eos_modem_get_status(unsigned char *buffer);
int eos_modem_set_mode(uint8_t mode);
int eos_modem_take(uint32_t timeout);
void eos_modem_give(void);
-void eos_modem_sleep(uint8_t mode);
+void eos_modem_sleep(void);
+void eos_modem_deep_sleep(void);
void eos_modem_wake(uint8_t source, uint8_t mode);
int eos_modem_reset(void);
+void eos_ppp_get_apn(char *apn);
void eos_ppp_set_apn(char *apn);
-void eos_ppp_set_auth(char *user, char *pass);
+void eos_ppp_get_usr(char *usr);
+void eos_ppp_set_usr(char *usr);
+void eos_ppp_get_pwd(char *pwd);
+void eos_ppp_set_pwd(char *pwd);
int eos_ppp_connect(void);
void eos_ppp_disconnect(void);