Skip to content
Snippets Groups Projects
Commit 54a05b65 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Implement write-retry in modem_send()

In attempt to address the "Error 11" (EAGAIN) error theat Nelgin sees when
configuring some longer modem init strings on Linux.

This is just a single retry (after a yield) after any modem command char
send failure (for any reason), including the terminating carriage-return.

See issue #662 to details.
parent 9510160b
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4807 passed
......@@ -613,12 +613,19 @@ BOOL modem_send(COM_HANDLE com_handle, const char* str)
if(ch!='^' && ch>='@') /* ^^ to send an '^' char to the modem */
ch-='@';
}
if(!comWriteByte(com_handle,ch))
return FALSE;
if(!comWriteByte(com_handle,ch)) {
YIELD();
if(!comWriteByte(com_handle,ch))
return FALSE;
}
}
SLEEP(100);
comPurgeInput(com_handle);
return comWriteByte(com_handle, '\r');
if(!comWriteByte(com_handle, '\r')) {
YIELD();
return comWriteByte(com_handle, '\r');
}
return TRUE;
}
/****************************************************************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment