diff options
Diffstat (limited to 'fw/esp32/components/eos/cell_sms.c')
-rw-r--r-- | fw/esp32/components/eos/cell_sms.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fw/esp32/components/eos/cell_sms.c b/fw/esp32/components/eos/cell_sms.c index 5145cd7..1cd4cda 100644 --- a/fw/esp32/components/eos/cell_sms.c +++ b/fw/esp32/components/eos/cell_sms.c @@ -13,7 +13,7 @@ #define CTRL_Z 0x1a -static const char *TAG = "EOS SMS"; +static const char *TAG = "EOS CELL SMS"; static char _pdu_in[2048]; static char _pdu_out[2048]; @@ -266,7 +266,8 @@ void eos_cell_sms_handler(unsigned char mtype, unsigned char *buffer, uint16_t b } buf_len = _rv; - eos_net_send(EOS_NET_MTYPE_CELL, buf, buf_len + 1); + rv = eos_net_send(EOS_NET_MTYPE_CELL, buf, buf_len + 1); + if (rv) ESP_LOGE(TAG, "NET SEND ERR:%d", rv); } while (1); eos_modem_give(); @@ -345,9 +346,13 @@ static void sms_received_handler(char *urc, regmatch_t m[]) { } buf_len = _rv; - eos_net_send(EOS_NET_MTYPE_CELL, buf, buf_len + 1); + rv = eos_net_send(EOS_NET_MTYPE_CELL, buf, buf_len + 1); + if (rv) ESP_LOGE(TAG, "NET SEND ERR:%d", rv); } void eos_cell_sms_init(void) { - at_urc_insert("^\\+CMTI: .*,([0-9]+)$", sms_received_handler, REG_EXTENDED); + int rv; + + rv = at_urc_insert("^\\+CMTI: .*,([0-9]+)$", sms_received_handler, REG_EXTENDED); + assert(rv == EOS_OK); } |