Use AT+CHUP instead of ATH (should be more reliable)

This commit is contained in:
Pierre Pronchery 2011-10-31 00:56:01 +00:00
parent 16857c0995
commit c88e5d878f

View File

@ -880,7 +880,7 @@ static char * _request_attention_call_hangup(ModemPlugin * modem)
_hayes_set_mode(modem, HAYES_MODE_INIT);
return NULL;
}
return strdup("ATH");
return strdup("AT+CHUP");
}
static char * _request_attention_connectivity(ModemPlugin * modem, int enabled)
@ -2634,7 +2634,6 @@ static HayesCommandStatus _on_request_generic(HayesCommand * command,
if((answer = _hayes_command_get_answer(command)) == NULL)
return HCS_ERROR;
while(answer != NULL)
/* FIXME also handle BUSY/NO CARRIER/CONNECT/etc */
if(strncmp(answer, "OK\n", 3) == 0
|| strncmp(answer, "OK\r\n", 4) == 0)
return HCS_SUCCESS;