diff options
author | Uros Majstorovic <majstor@majstor.org> | 2025-07-28 23:37:45 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2025-07-28 23:37:45 +0200 |
commit | fc70c6f78f43dbeda91d47b2d2071d4da4082121 (patch) | |
tree | c104744b62d3ea2c1a4a05eaab8283f368215300 /fw/esp32/components/eos/cell_ussd.c | |
parent | 58f41971b1e801ad2fbcea08e5152afa2b18ca73 (diff) |
upgrade to ESP-IDF v5; fixed SPI net and app protocoles; reimplemented power management;
Diffstat (limited to 'fw/esp32/components/eos/cell_ussd.c')
-rw-r--r-- | fw/esp32/components/eos/cell_ussd.c | 13 |
1 files changed, 9 insertions, 4 deletions
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); } |