modem AT commands tested
This commit is contained in:
parent
da7e90bc82
commit
351876cbb6
|
|
@ -42,7 +42,7 @@ static bool isPPPinitializing = false;
|
|||
#endif
|
||||
|
||||
static bool isPPPConn = false;
|
||||
static int attimeout = 300;
|
||||
static int attimeout = 1000;
|
||||
TaskHandle_t initTaskhandle;
|
||||
|
||||
#define PPP_MODEM_TIMEOUT 40
|
||||
|
|
@ -313,9 +313,22 @@ void ModemSetATTimeout(int timeout)
|
|||
|
||||
void ModemSendAT(char *cmd, char *resp, int timeout)
|
||||
{
|
||||
esp_modem_at(dce, cmd, resp, attimeout);
|
||||
ESP_LOGI(TAG, "Command:%s", cmd);
|
||||
ESP_LOGW(TAG, "%s", resp);
|
||||
int res = esp_modem_at(dce, cmd, resp, attimeout);
|
||||
switch(res)
|
||||
{
|
||||
case 0:
|
||||
ESP_LOGI(TAG, "OK");
|
||||
break;
|
||||
case 1:
|
||||
ESP_LOGE(TAG, "FAIL");
|
||||
break;
|
||||
case 2:
|
||||
ESP_LOGE(TAG, "TIMEOUT");
|
||||
break;
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "Response:%s", resp);
|
||||
}
|
||||
|
||||
void ModemSendSMS(void)
|
||||
|
|
|
|||
|
|
@ -235,7 +235,11 @@ void funct_gsm_imsi(char *argres, int rw)
|
|||
#ifdef CONFIG_WEBGUIAPP_MODEM_AT_ACCESS
|
||||
void funct_gsm_at(char *argres, int rw)
|
||||
{
|
||||
ModemSendAT(argres, argres, 0);
|
||||
char resp[1024];
|
||||
resp[0] = 0x00;
|
||||
ModemSendAT(argres, resp, 1000);
|
||||
snprintf(argres, VAR_MAX_VALUE_LENGTH, "%s", resp);
|
||||
|
||||
}
|
||||
void funct_gsm_at_timeout(char *argres, int rw)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user