- /* try to ping the adapter */
- while (bConnected && iNow < iTarget && (bPinged = m_communication->PingAdapter()) == false)
- {
- CLibCEC::AddLog(CEC_LOG_ERROR, "the adapter did not respond correctly to a ping (try %d)", ++iPingTry);
- Sleep(500);
- iNow = GetTimeMs();
- }
-
- /* try to read the firmware version */
- uint16_t iFirmwareVersion(CEC_FW_VERSION_UNKNOWN);
- while (bPinged && iNow < iTarget && (iFirmwareVersion = m_communication->GetFirmwareVersion()) == CEC_FW_VERSION_UNKNOWN)
- {
- CLibCEC::AddLog(CEC_LOG_ERROR, "the adapter did not respond with a correct firmware version (try %d)", ++iFwVersionTry);
- Sleep(500);
- iNow = GetTimeMs();
- }
-
- if (iFirmwareVersion >= 2)
- {
- /* try to set controlled mode */
- while (bConnected && iNow < iTarget && (bControlled = m_communication->SetControlledMode(true)) == false)
- {
- CLibCEC::AddLog(CEC_LOG_ERROR, "the adapter did not respond correctly to setting controlled mode (try %d)", ++iControlledTry);
- Sleep(500);
- iNow = GetTimeMs();
- }
- }
-
- if ((bReturn = iFirmwareVersion != CEC_FW_VERSION_UNKNOWN) == true)
- CLibCEC::AddLog(CEC_LOG_NOTICE, "connected to the CEC adapter. firmware version = %d", iFirmwareVersion);
+ if (bReturn)
+ CLibCEC::AddLog(CEC_LOG_NOTICE, "connected to the CEC adapter. firmware version = %d, client version = %s", m_communication->GetFirmwareVersion(), ToString(m_clientVersion));