*/
fxStr rmCmd(curcap[HasShortTraining(curcap)].value, rmCmdFmt);
u_short attempts = 0;
- while ((rmResponse == AT_NOTHING || rmResponse == AT_FCERROR) && attempts++ < conf.class1RMPersistence) {
+ do {
(void) atCmd(rmCmd, AT_NOTHING);
- rmResponse = atResponse(rbuf, conf.t2Timer);
- }
+ rmResponse = atResponse(rbuf, conf.class1RMPersistence ? conf.t2Timer : conf.t2Timer - conf.t4Timer);
+ } while ((rmResponse == AT_NOTHING || rmResponse == AT_FCERROR) && attempts++ < conf.class1RMPersistence);
if (rmResponse == AT_CONNECT) {
/*
* The message carrier was recognized;
else rmCmd = fxStr(curcap[HasShortTraining(curcap)].value, rmCmdFmt);
u_short attempts = 0;
lastResponse = AT_NOTHING;
- while ((lastResponse == AT_NOTHING || lastResponse == AT_FCERROR) && attempts++ < conf.class1RMPersistence) {
+ do {
(void) atCmd(rmCmd, AT_NOTHING);
- lastResponse = atResponse(rbuf, conf.t2Timer);
- }
+ lastResponse = atResponse(rbuf, conf.class1RMPersistence ? conf.t2Timer : conf.t2Timer - conf.t4Timer);
+ } while ((lastResponse == AT_NOTHING || lastResponse == AT_FCERROR) && attempts++ < conf.class1RMPersistence);
if (lastResponse == AT_FRH3 && waitFor(AT_CONNECT,0)) {
gotRTNC = true;
gotEOT = false;
if (!useV34) {
gotRTNC = false;
if (!raiseRecvCarrier(dolongtrain, emsg) && !gotRTNC) {
- if (lastResponse == AT_FCERROR && atCmd(rhCmd, AT_CONNECT)) {
+ if (wasTimeout()) abortReceive(); // return to command mode
+ if (lastResponse != AT_NOCARRIER && atCmd(rhCmd, AT_CONNECT, conf.t2Timer)) {
// sender is transmitting V.21 instead, we may have
// missed the first signal attempt, but should catch
// the next attempt. This "simulates" adaptive receive.
prevPage++;
}
free(block);
- if (wasTimeout()) abortReceive(); // return to command mode
return (false);
}
}
else {
gotRTNC = false;
if (!raiseRecvCarrier(dolongtrain, emsg) && !gotRTNC) {
- if (lastResponse == AT_FCERROR && atCmd(rhCmd, AT_CONNECT)) {
+ if (wasTimeout()) abortReceive(); // return to command mode
+ if (lastResponse != AT_NOCARRIER && atCmd(rhCmd, AT_CONNECT, conf.t2Timer)) {
// simulate adaptive receive
emsg = ""; // clear the failure
gotRTNC = true;
prevPage++;
}
free(block);
- if (wasTimeout()) abortReceive(); // return to command mode
return (false);
}
} else gotprimary = true;
.B Class1RMPersistence
should probably not be set at 1, although +FCERROR should almost never occur
with such modems.
+.IP
+If the modem does not support the reporting of +FCERROR or adaptive reception
+control, then
+.B Class1RMPersistence
+should probably be set at 0, which causes the timeout looking for the high-speed
+data carrier to be shortened, thus increasing the likelihood of recovery from
+any dissynchronization.
.TP
.B Class1SendMsgDelay
The time, in milliseconds, to delay just before sending the image data.