From fc70c6f78f43dbeda91d47b2d2071d4da4082121 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Mon, 28 Jul 2025 23:37:45 +0200 Subject: upgrade to ESP-IDF v5; fixed SPI net and app protocoles; reimplemented power management; --- fw/esp32/components/eos/cell_ussd.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'fw/esp32/components/eos/cell_ussd.c') diff --git a/fw/esp32/components/eos/cell_ussd.c b/fw/esp32/components/eos/cell_ussd.c index 375025f..fb77b67 100644 --- a/fw/esp32/components/eos/cell_ussd.c +++ b/fw/esp32/components/eos/cell_ussd.c @@ -9,7 +9,7 @@ #include "at_cmd.h" #include "cell.h" -static const char *TAG = "EOS USSD"; +static const char *TAG = "EOS CELL USSD"; extern char *at_cmd_buf; @@ -64,7 +64,8 @@ static void ussd_reply_handler(char *urc, regmatch_t m[]) { len = 2; if (m[2].rm_so == -1) { - eos_net_send(EOS_NET_MTYPE_CELL, buf, len); + rv = eos_net_send(EOS_NET_MTYPE_CELL, buf, len); + if (rv) ESP_LOGE(TAG, "NET SEND ERR:%d", rv); return; } @@ -101,9 +102,13 @@ static void ussd_reply_handler(char *urc, regmatch_t m[]) { return; } - eos_net_send(EOS_NET_MTYPE_CELL, buf, len); + rv = eos_net_send(EOS_NET_MTYPE_CELL, buf, len); + if (rv) ESP_LOGE(TAG, "NET SEND ERR:%d", rv); } void eos_cell_ussd_init(void) { - at_urc_insert("^\\+CUSD: ([0-9])(,\".*)?", ussd_reply_handler, REG_EXTENDED); + int rv; + + rv = at_urc_insert("^\\+CUSD: ([0-9])(,\".*)?", ussd_reply_handler, REG_EXTENDED); + assert(rv == EOS_OK); } -- cgit v1.2.3