diff options
Diffstat (limited to 'fw/esp32/components/eos/cell_modem.c')
-rw-r--r-- | fw/esp32/components/eos/cell_modem.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fw/esp32/components/eos/cell_modem.c b/fw/esp32/components/eos/cell_modem.c index 26be56e..b279db1 100644 --- a/fw/esp32/components/eos/cell_modem.c +++ b/fw/esp32/components/eos/cell_modem.c @@ -64,9 +64,9 @@ static uint8_t RTC_NOINIT_ATTR uart_mode; static uint8_t uart_mode_next = EOS_CELL_UART_MODE_NONE; static SemaphoreHandle_t uart_mutex; -static char ppp_apn[EOS_CELL_PDP_SIZE_APN]; -static char ppp_usr[EOS_CELL_PDP_SIZE_USR]; -static char ppp_pwd[EOS_CELL_PDP_SIZE_PWD]; +static char ppp_apn[EOS_CELL_PDP_SIZE_APN + 1]; +static char ppp_usr[EOS_CELL_PDP_SIZE_USR + 1]; +static char ppp_pwd[EOS_CELL_PDP_SIZE_PWD + 1]; static SemaphoreHandle_t ppp_mutex; static ppp_pcb *ppp_handle; @@ -150,7 +150,7 @@ static void uart_data_read(uint8_t mode) { buf = eos_net_alloc(); buf[0] = EOS_CELL_MTYPE_DEV | EOS_CELL_MTYPE_UART_DATA; - _rd = eos_modem_read(buf + 1, MIN(bsize - rd, EOS_NET_MTU - 1), 100); + _rd = eos_modem_read(buf + 1, MIN(bsize - rd, EOS_NET_SIZE_BUF - 1), 100); eos_net_send(EOS_NET_MTYPE_CELL, buf, _rd + 1); rd += _rd; } while (rd != bsize); @@ -594,7 +594,7 @@ static int ppp_resume(void) { static int ppp_setup(void) { int r; - char cmd[64]; + char cmd[EOS_CELL_PDP_SIZE_APN + 32]; int cmd_len; cmd_len = snprintf(cmd, sizeof(cmd), "AT+CGDCONT=1,\"IP\",\"%s\"\r", ppp_apn); |