-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Hi!, i have a problem with sms example. In my code i´m use esp-idf v4.3.2 and ppp work OK, but when add the code for sms never take the semaphore here:
static esp_err_t esp_modem_dte_send_cmd(modem_dte_t *dte, const char *command, uint32_t timeout)
{
esp_err_t ret = ESP_FAIL;
modem_dce_t *dce = dte->dce;
MODEM_CHECK(dce, "DTE has not yet bind with DCE", err);
MODEM_CHECK(command, "command is NULL", err);
esp_modem_dte_t esp_dte = __containerof(dte, esp_modem_dte_t, parent);
/ Calculate timeout clock tick /
/ Reset runtime information /
dce->state = MODEM_STATE_PROCESSING;
/ Send command via UART /
uart_write_bytes(esp_dte->uart_port, command, strlen(command));
/ Check timeout */
MODEM_CHECK(xSemaphoreTake(esp_dte->process_sem, pdMS_TO_TICKS(timeout)) == pdTRUE, "process command timeout", err);
ret = ESP_OK;
err:
dce->handle_line = NULL;
return ret;
}
do you know whats the problem?.