mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 06:55:52 +08:00
Attempt to solve one cause of "No reply from modem" loop
"err 101" (network unreachable - effectively cant get to the master because we've lost the network) This needs trapping and handling properly to smooth the way it currently tries to send from the socket as quickly as it can (effectively every millisecond) until the network is restored, then does the same for "Opening IPSC" every millisecond or less until the login either times out (in which case I've edited the code to tell it to retry!) or logs into the master successfully. This error also causes the "no reply from modem loop, however this is now trapped in all cases if the firmware is read successfully by stopping the inactivity timer, allowing the software to continue reading the modem. It works for this particular error, but others may need to test!
This commit is contained in:
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) {
|
||||
|
||||
Reference in New Issue
Block a user