Merge pull request #67 from g0wfv/develop
Attempt to solve one cause of "No reply from modem" loop
This commit is contained in:
commit
80842738f9
2 changed files with 15 additions and 0 deletions
11
DMRIPSC.cpp
11
DMRIPSC.cpp
|
@ -317,10 +317,21 @@ void CDMRIPSC::clock(unsigned int ms)
|
|||
m_timeoutTimer.start();
|
||||
m_retryTimer.start();
|
||||
} else {
|
||||
/*
|
||||
LogError("Login to the master has failed, stopping IPSC");
|
||||
m_status = DISCONNECTED;
|
||||
m_timeoutTimer.stop();
|
||||
m_retryTimer.stop();
|
||||
*/
|
||||
|
||||
/* Once the modem death spiral has been prevented in Modem.cpp
|
||||
the IPSC sometimes times out and reaches here.
|
||||
We want it to reconnect so... */
|
||||
|
||||
LogError("Login to the master has failed, retrying ...");
|
||||
close();
|
||||
open();
|
||||
return;
|
||||
}
|
||||
} else if (::memcmp(m_buffer, "RPTACK", 6U) == 0) {
|
||||
switch (m_status) {
|
||||
|
|
|
@ -156,6 +156,10 @@ bool CModem::open()
|
|||
if (!ret) {
|
||||
m_serial.close();
|
||||
return false;
|
||||
} else {
|
||||
/* Stopping the inactivity timer here when a firmware version has been
|
||||
successfuly read prevents the death spiral of "no reply from modem..." */
|
||||
m_inactivityTimer.stop();
|
||||
}
|
||||
|
||||
ret = setFrequency();
|
||||
|
|
Loading…
Reference in a new issue