From 28b673dd4db086f1957c5cdae281f54980715e36 Mon Sep 17 00:00:00 2001 From: Mykola Salomatin Date: Wed, 29 Sep 2021 16:20:21 +0300 Subject: [MTX-4206] mPower R.6.0: Making Telit and Quectel radios data-only on AT&T network. GP-1364 Add 2 functions for Telit and Quectel modems: - disableVoiceSupport: disable voice support (IMS and CSFB) and enable SMS only registration flag. - getVoiceSupport: get voice support configuration for the current radio. --- include/mts/MTS_IO_CellularRadio.h | 5 +++++ include/mts/MTS_IO_ICellularRadio.h | 28 ++++++++++++++++++++++++++++ include/mts/MTS_IO_LE910C4NFRadio.h | 4 ++++ include/mts/MTS_IO_QuectelRadio.h | 4 ++++ 4 files changed, 41 insertions(+) (limited to 'include') diff --git a/include/mts/MTS_IO_CellularRadio.h b/include/mts/MTS_IO_CellularRadio.h index daefcd1..4d1cd12 100644 --- a/include/mts/MTS_IO_CellularRadio.h +++ b/include/mts/MTS_IO_CellularRadio.h @@ -140,6 +140,10 @@ namespace MTS { CODE getSimMccMnc(std::string& sMccMnc) override; CODE getSimMccMnc(std::string& sMcc, std::string& sMnc) override; + CODE disableVoiceSupport() override; + CODE getVoiceSupport(Json::Value& jData) override; + CODE getVoiceSupport(bool& bVoiceEnabled, bool& bSmsOnly) override; + protected: CellularRadio(const std::string& sName, const std::string& sRadioPort); @@ -231,6 +235,7 @@ namespace MTS { CODE getRegistration(REGISTRATION& eRegistration, const std::string& sType); virtual CODE sendData(const char* pData, size_t nBytes); + virtual CODE sendBasicQuery(const std::string& sCmd, const std::string& sLabel, std::string& sResult, int32_t timeoutMillis = 100, const char& ESC = ICellularRadio::CR); class RadioBandMap : public MTS::NonCopyable { public: diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h index 58329c4..e061636 100644 --- a/include/mts/MTS_IO_ICellularRadio.h +++ b/include/mts/MTS_IO_ICellularRadio.h @@ -153,6 +153,8 @@ namespace MTS { static const char *KEY_SIM_CARRIER_CODE; //!< Unique carrier identifier based on the SIM card information. static const char *KEY_SIM_MCC; //!< MCC of the home network from the SIM. static const char *KEY_SIM_MNC; //!< MNC of the home network from the SIM. + static const char *KEY_VOICE_ENABLED; //!< Enable/Disable support of voice calls + static const char *KEY_SMS_ONLY; //!< Enable/Disable "SMS only" registration flag //Network Status Data @@ -592,6 +594,32 @@ namespace MTS { */ virtual CODE getSimMccMnc(std::string& sMccMnc) = 0; virtual CODE getSimMccMnc(std::string& sMcc, std::string& sMnc) = 0; + + /** + * @brief disableVoiceSupport - disable voice support (IMS and CSFB) and enable "SMS only" registration flag. + * + * @return CODE::SUCCESS when disabled successfully, + * CODE::NOT_APPLICABLE when the modem doesn't support this feature, + * CODE::NO_RESPONSE when the modem doesn't respond, + * CODE::ERROR when the radio returns "ERROR", + * CODE::FAILURE otherwise (unexpected response). + */ + virtual CODE disableVoiceSupport() = 0; + + /** + * @brief getVoiceSupport - get voice support configuration for the current radio. + * + * @param bVoiceEnabled - a boolean value indicating that "voice support" is enabled. + * @param bSmsOnly - a boolean value indicating that "SMS only" registration flag is enabled. + * + * @return CODE::SUCCESS when fetched successfully, + * CODE::NOT_APPLICABLE when the modem doesn't support this feature, + * CODE::NO_RESPONSE when the modem doesn't respond, + * CODE::ERROR when the radio returns "ERROR", + * CODE::FAILURE otherwise (unexpected response). + */ + virtual CODE getVoiceSupport(Json::Value& jData) = 0; + virtual CODE getVoiceSupport(bool& bVoiceEnabled, bool& bSmsOnly) = 0; }; } } diff --git a/include/mts/MTS_IO_LE910C4NFRadio.h b/include/mts/MTS_IO_LE910C4NFRadio.h index afd1c24..1ae61a7 100644 --- a/include/mts/MTS_IO_LE910C4NFRadio.h +++ b/include/mts/MTS_IO_LE910C4NFRadio.h @@ -38,10 +38,14 @@ namespace MTS { virtual CODE getActiveFirmware(std::string& sFwId); + CODE disableVoiceSupport() override; + CODE getVoiceSupport(bool& bVoiceEnabled, bool& bSmsOnly) override; + protected: FOTA_GROUP getFotaGroup() override; private: + CODE getIsVoiceSupportConfigurable(); }; } diff --git a/include/mts/MTS_IO_QuectelRadio.h b/include/mts/MTS_IO_QuectelRadio.h index c46b39b..4e82261 100644 --- a/include/mts/MTS_IO_QuectelRadio.h +++ b/include/mts/MTS_IO_QuectelRadio.h @@ -54,6 +54,9 @@ namespace MTS { CODE setUeModeOfOperation(ICellularRadio::UE_MODES_OF_OPERATION mode) override; CODE getUeModeOfOperation(ICellularRadio::UE_MODES_OF_OPERATION& mode) override; + CODE disableVoiceSupport() override; + CODE getVoiceSupport(bool& bVoiceEnabled, bool& bSmsOnly) override; + protected: enum class UE_USAGE_SETTING : uint8_t { UNKNOWN_MODE = 0, // Unknown mode @@ -84,6 +87,7 @@ namespace MTS { static const std::string CMD_ABORT_UPLOAD; static const std::string VALUE_MTS_DELTA_NAME; static const std::string VALUE_MTS_DELTA_PATH; + static const std::string VALUE_QNVR_DISABLE_VOICE; CODE startFileUpload(const std::string& sTargetFilename, size_t nBytes, uint16_t uRxTimeout = 5, bool bAckEnabled = false); CODE abortFileUpload(); -- cgit v1.2.3 From 1f7987d546384b6b9ef0079dac5c903148a59210 Mon Sep 17 00:00:00 2001 From: "andrii.davydenko" Date: Tue, 16 Nov 2021 11:51:32 +0200 Subject: Update MODBUS slave feature, Rogers Certification issue --- include/mts/MTS_IO_CellularRadio.h | 27 +++++++++++++++++++++++++++ include/mts/MTS_IO_ICellularRadio.h | 36 ++++++++++++++++++++++++++++++++++++ include/mts/MTS_IO_QuectelRadio.h | 4 ++++ include/mts/MTS_IO_TelitRadio.h | 4 ++++ 4 files changed, 71 insertions(+) (limited to 'include') diff --git a/include/mts/MTS_IO_CellularRadio.h b/include/mts/MTS_IO_CellularRadio.h index 4d1cd12..f32251c 100644 --- a/include/mts/MTS_IO_CellularRadio.h +++ b/include/mts/MTS_IO_CellularRadio.h @@ -72,6 +72,7 @@ namespace MTS { CODE getTime(std::string& sDate, std::string& sTime, std::string& sTimeZone) override; CODE getRoaming(bool& bRoaming) override; CODE getCellularMode(CELLULAR_MODES &networks) override; + CODE getSelectedBandsRaw(std::string& sRawBands) override; CODE getSignalStrength(int32_t& iRssi) override; CODE getModemLocation(std::string& sLocation) override; @@ -223,6 +224,32 @@ namespace MTS { */ virtual CODE getSimMncLength(uint8_t& iLength); + /** + * @brief getCarrierFromSimMccMnc - get a carrier name based on the MCC/MNC values. + * + * @param sCarrier - a string to be filled with carrier based on the MCC/MNC values. + * + * @return CODE::SUCCESS when the read is completed successfully, + * CODE::NOT_APPLICABLE when the modem doesn't support this feature, + * CODE::NO_RESPONSE when the modem doesn't respond, + * CODE::ERROR when the radio returns "ERROR" (SIM card removed, SIM card locked etc), + * CODE::FAILURE otherwise (unexpected response, no data in SIM etc). + */ + virtual CODE getCarrierFromSimMccMnc(std::string& sCarrier); + + /** + * @brief getCarrierFromSimSpn - get a carrier name from SIM EFspn. + * + * @param sCarrier - a string to be filled with carrier obtained from SIM EFspn. + * + * @return CODE::SUCCESS when the read is completed successfully, + * CODE::NOT_APPLICABLE when the modem doesn't support this feature, + * CODE::NO_RESPONSE when the modem doesn't respond, + * CODE::ERROR when the radio returns "ERROR" (SIM card removed, SIM card locked etc), + * CODE::FAILURE otherwise (unexpected response, no data in SIM etc). + */ + virtual CODE getCarrierFromSimSpn(std::string& sCarrier); + void initMipProfile(Json::Value& jData); bool splitAndAssign(const std::string& sLine, const std::string& sKey, Json::Value& jParent, const std::string& sJsonKey, Json::ValueType eType = Json::ValueType::stringValue); diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h index e061636..f3e15e2 100644 --- a/include/mts/MTS_IO_ICellularRadio.h +++ b/include/mts/MTS_IO_ICellularRadio.h @@ -620,6 +620,42 @@ namespace MTS { */ virtual CODE getVoiceSupport(Json::Value& jData) = 0; virtual CODE getVoiceSupport(bool& bVoiceEnabled, bool& bSmsOnly) = 0; + + /** + * @brief getSelectedBandsRaw - get the raw Selected Bands value for the current radio. + * + * This commands sends the query to the radio, selects first 3 values from the response, + * parses the numbers as dec (Telit GSM and WCDMA fiels) or hex (Quectel GW_band and LTE, + * Telit LTE), formats them as comma-separated hex values and saves the result to sRawBands. + * + * WARNING: The response format is radio-dependent. Please consult the AT command manual + * to interpet the resulting values. + * + * For Telit radios: + * + * - command: `AT#BND?`; + * - example radio response: `#BND: 5,15,800C5`; + * - `sRawBands` format: `[,[,]]`; + * - example `sRawBands` content: `5,F,800C5`. + * + * For Quectel radios: + * + * - command: `AT+QCFG="band"`; + * - example radio response: `+QCFG: "band",0x93,0x80800c5,0x0`; + * - `sRawBands` format: `,,`, + * NOTE: the `` value is duplicated for the first two fields; + * - example `sRawBands` content: `93,93,80800c5`. + * + * @param sRawBands - radio-depended string value, shows the currently selected bands. + * + * @return CODE::SUCCESS when fetched successfully, + * CODE::NOT_APPLICABLE when the modem doesn't support this feature, + * CODE::NO_RESPONSE when the modem doesn't respond, + * CODE::ERROR when the radio returns "ERROR", + * CODE::FAILURE otherwise (unexpected response). + */ + virtual CODE getSelectedBandsRaw(std::string& sRawBands) = 0; + }; } } diff --git a/include/mts/MTS_IO_QuectelRadio.h b/include/mts/MTS_IO_QuectelRadio.h index 4e82261..c54e560 100644 --- a/include/mts/MTS_IO_QuectelRadio.h +++ b/include/mts/MTS_IO_QuectelRadio.h @@ -57,6 +57,8 @@ namespace MTS { CODE disableVoiceSupport() override; CODE getVoiceSupport(bool& bVoiceEnabled, bool& bSmsOnly) override; + CODE getSelectedBandsRaw(std::string& sRawBands) override; + protected: enum class UE_USAGE_SETTING : uint8_t { UNKNOWN_MODE = 0, // Unknown mode @@ -79,6 +81,8 @@ namespace MTS { virtual CODE getUeUsageSetting(QuectelRadio::UE_USAGE_SETTING& us); virtual CODE convertToUeUsageSetting(const std::string& sSetting, QuectelRadio::UE_USAGE_SETTING& us); + static bool isContainsSignChar(const std::string& str); + private: // private variable to save old firmware versions during FOTA std::string m_sQuectelFirmware; diff --git a/include/mts/MTS_IO_TelitRadio.h b/include/mts/MTS_IO_TelitRadio.h index ffdddd9..a06da54 100644 --- a/include/mts/MTS_IO_TelitRadio.h +++ b/include/mts/MTS_IO_TelitRadio.h @@ -50,6 +50,8 @@ namespace MTS { CODE fumoLocalInject(int fd, UpdateCb& stepCb) override; CODE fumoLocalApply(UpdateCb& stepCb) override; + CODE getSelectedBandsRaw(std::string& sRawBands) override; + protected: TelitRadio(const std::string& sName, const std::string& sRadioPort); @@ -71,6 +73,8 @@ namespace MTS { virtual CODE fumoWriteGroupsABD(int fd, UpdateCb& stepCb); //virtual CODE fumoWriteGroupC(int fd, UpdateCb& stepCb); + static bool isContainsSignChar(const std::string& str); + private: virtual CODE getSimLockAttempts(int& iAttemptsPin, int& iAttemptsPuk, const std::string& sLockStatus); ICellularRadio::CODE wdsList(std::set &wds); -- cgit v1.2.3 From 47997c0e5aa7d32ddbba22ceead2ff553881c47c Mon Sep 17 00:00:00 2001 From: Mykola Salomatin Date: Wed, 4 May 2022 12:40:15 +0300 Subject: [MTX-4445] mPower R.6.0.X: MTCAP3: LNA7D - cellular radio support GP-1548 setRxDiversity command moved to common class for Quectel radios - QuectelRadio.cpp. Add LNA7D radio support. LNA7D radio supports only 3g and 4g network modes. Add new command for enabling/disabling diversity. Retained backward compatibility with the old diversity command. --- include/mts/MTS_IO_EG25Radio.h | 1 - include/mts/MTS_IO_EG95Radio.h | 1 - include/mts/MTS_IO_QuectelRadio.h | 4 ++++ 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/mts/MTS_IO_EG25Radio.h b/include/mts/MTS_IO_EG25Radio.h index 46bff20..e05fa7d 100644 --- a/include/mts/MTS_IO_EG25Radio.h +++ b/include/mts/MTS_IO_EG25Radio.h @@ -34,7 +34,6 @@ namespace MTS { EG25Radio(const std::string& sPort); virtual ~EG25Radio(); - CODE setRxDiversity(const Json::Value& jArgs) override; protected: diff --git a/include/mts/MTS_IO_EG95Radio.h b/include/mts/MTS_IO_EG95Radio.h index 17c413e..6fb47c8 100644 --- a/include/mts/MTS_IO_EG95Radio.h +++ b/include/mts/MTS_IO_EG95Radio.h @@ -34,7 +34,6 @@ namespace MTS { EG95Radio(const std::string& sPort); virtual ~EG95Radio(); - CODE setRxDiversity(const Json::Value& jArgs) override; protected: diff --git a/include/mts/MTS_IO_QuectelRadio.h b/include/mts/MTS_IO_QuectelRadio.h index c54e560..bd312b8 100644 --- a/include/mts/MTS_IO_QuectelRadio.h +++ b/include/mts/MTS_IO_QuectelRadio.h @@ -83,6 +83,8 @@ namespace MTS { static bool isContainsSignChar(const std::string& str); + CODE setRxDiversity(const Json::Value& jArgs) override; + private: // private variable to save old firmware versions during FOTA std::string m_sQuectelFirmware; @@ -117,6 +119,8 @@ namespace MTS { return vector[index]; } } + + CODE isDivctlSupported(bool& bSupported); }; } } -- cgit v1.2.3 From ada73244d5efe687d92b4b97cf555f2ca166f2c2 Mon Sep 17 00:00:00 2001 From: Yevhen Mykhno Date: Tue, 7 Jun 2022 15:40:48 +0300 Subject: [MTX-4503] mPower R.6.0.X: Remove Verizon FOTA feature from the code GP-1610 --- include/mts/MTS_IO_ME910C1WWRadio.h | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'include') diff --git a/include/mts/MTS_IO_ME910C1WWRadio.h b/include/mts/MTS_IO_ME910C1WWRadio.h index 9605862..d4b4098 100644 --- a/include/mts/MTS_IO_ME910C1WWRadio.h +++ b/include/mts/MTS_IO_ME910C1WWRadio.h @@ -36,33 +36,11 @@ namespace MTS { ICellularRadio::CODE setActiveFirmware(const Json::Value& jArgs); ICellularRadio::CODE getActiveFirmware(std::string& sFwId); - virtual CODE updateFumo(const Json::Value& jArgs, UpdateCb& stepCb); - protected: - CODE doGetFirmwareNumbers(std::string &sFirmware, std::string &sFirmwareBuild); - private: - static const std::string KEY_FUMO_PDPID; //!< PDP context id (default 3) - static const std::string KEY_FUMO_PDPTYPE; //!< PDP context type (default IPV4V6) - static const std::string KEY_FUMO_APN; //!< APN (default empty) - static const std::string KEY_FUMO_ADDRESS; //!< FTP server address - static const std::string KEY_FUMO_DIR; //!< Directory - static const std::string KEY_FUMO_FILE; //!< Name of the upgrade file - static const std::string KEY_FUMO_USER; //!< Username - static const std::string KEY_FUMO_PASSWORD; //!< Password - static const std::string KEY_FUMO_DRYRUN; //!< If set, do not apply the downloaded firmware - CODE doFumoPerform(const Json::Value &jConfig, UpdateCb& stepCb); - CODE doFumoReadConfig(const Json::Value& jArgs, Json::Value &jConfig); - CODE doFumoSetup(const Json::Value &jConfig, UpdateCb& stepCb); - CODE doFumoFtp(const Json::Value &jConfig, UpdateCb& stepCb); - CODE doFumoCleanup(const Json::Value &jConfig, UpdateCb& stepCb); - CODE doFumoApplyFirmware(const Json::Value &jConfig, UpdateCb& stepCb); - CODE doFumoWaitNewFirmware(const Json::Value &jConfig, UpdateCb& stepCb); - std::string m_sFw; - std::string m_sFwBuild; }; } } -- cgit v1.2.3 From b8991e7f15f30ad21725b113df773db7beaa69d8 Mon Sep 17 00:00:00 2001 From: Andrii Davydenko Date: Wed, 2 Nov 2022 15:35:51 +0200 Subject: [MTX-4694][GP-1791] MTCAP3 mPower R.6.1.X: LNA7D support - APN setup behavior when provider is Verizon Implement getting the CGDCONT from the modem Implement setting the CGDCONT to the modem --- include/mts/MTS_IO_CellularRadio.h | 3 +++ include/mts/MTS_IO_ICellularRadio.h | 41 +++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) (limited to 'include') diff --git a/include/mts/MTS_IO_CellularRadio.h b/include/mts/MTS_IO_CellularRadio.h index f32251c..60659dc 100644 --- a/include/mts/MTS_IO_CellularRadio.h +++ b/include/mts/MTS_IO_CellularRadio.h @@ -145,6 +145,9 @@ namespace MTS { CODE getVoiceSupport(Json::Value& jData) override; CODE getVoiceSupport(bool& bVoiceEnabled, bool& bSmsOnly) override; + CODE getPdpContexts(Json::Value& jData) override; + CODE setPdpContext(const std::string& sId, const Json::Value& jConfig) override; + protected: CellularRadio(const std::string& sName, const std::string& sRadioPort); diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h index f3e15e2..91ab782 100644 --- a/include/mts/MTS_IO_ICellularRadio.h +++ b/include/mts/MTS_IO_ICellularRadio.h @@ -205,6 +205,10 @@ namespace MTS { static const char *KEY_ATTEMPTS_PIN; //!< The number of attempts left to unlock the SIM card using PIN code static const char *KEY_ATTEMPTS_PUK; //!< The number of attempts left to unlock the SIM card using PUK code + //PDP Context + static const char *KEY_PDP_CONTEXT_APN; + static const char *KEY_PDP_CONTEXT_IPMODE; + //Values - Type static const char *VALUE_TYPE_LTE; static const char *VALUE_TYPE_GSM; @@ -656,6 +660,43 @@ namespace MTS { */ virtual CODE getSelectedBandsRaw(std::string& sRawBands) = 0; + /** + * @brief Get the list of PDP contexts from the radio + * + * @param jData - an object to be filled with data. + * { + * "": { + * "apn": "", + * "ipMode": "" + * } + * } + * + * @return CODE::SUCCESS when fetched successfully, + * CODE::NO_RESPONSE when the modem doesn't respond, + * CODE::ERROR when the radio returns "ERROR", + * CODE::FAILURE otherwise (unexpected response). + */ + virtual CODE getPdpContexts(Json::Value& jData) = 0; + + /** + * @brief Set the PDP context to the radio + * + * @param sId - a string value that contains an ID of the PDP context to change. + * @param jConfig - a JSON-object that contains: + * an IP mode for the specified PDP context, + * an APN for the specified PDP context. + * { + * "apn": "", + * "ipMode": "" + * } + * + * @return CODE::SUCCESS when fetched successfully, + * CODE::NO_RESPONSE when the modem doesn't respond, + * CODE::ERROR when the radio returns "ERROR", + * CODE::FAILURE otherwise (unexpected response). + */ + virtual CODE setPdpContext(const std::string& sId, const Json::Value& jConfig) = 0; + }; } } -- cgit v1.2.3 From 4b448e3c5daf34062861d0261c5a2253638b8100 Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Fri, 16 Dec 2022 17:04:08 +0200 Subject: [GP-1195] Cellular debugging - add a query Define the set of debugging AT commands and a function to execute such commands. The function executes the commands one-by-one end returns raw command outputs. To be used by radio-query --diagnostics. --- include/mts/MTS_IO_CellularRadio.h | 11 +++++++++++ include/mts/MTS_IO_ICellularRadio.h | 21 +++++++++++++++++++++ include/mts/MTS_IO_LE910Radio.h | 2 ++ include/mts/MTS_IO_QuectelRadio.h | 2 ++ include/mts/MTS_IO_TelitRadio.h | 2 ++ 5 files changed, 38 insertions(+) (limited to 'include') diff --git a/include/mts/MTS_IO_CellularRadio.h b/include/mts/MTS_IO_CellularRadio.h index 60659dc..e985c21 100644 --- a/include/mts/MTS_IO_CellularRadio.h +++ b/include/mts/MTS_IO_CellularRadio.h @@ -148,6 +148,8 @@ namespace MTS { CODE getPdpContexts(Json::Value& jData) override; CODE setPdpContext(const std::string& sId, const Json::Value& jConfig) override; + CODE getDiagnostics(std::string& sReport) override; + protected: CellularRadio(const std::string& sName, const std::string& sRadioPort); @@ -267,6 +269,15 @@ namespace MTS { virtual CODE sendData(const char* pData, size_t nBytes); virtual CODE sendBasicQuery(const std::string& sCmd, const std::string& sLabel, std::string& sResult, int32_t timeoutMillis = 100, const char& ESC = ICellularRadio::CR); + /** + * @brief getDiagCommands - returns the list of Cellular Diagnostics commands for this radio. + * + * @param bIsSimReady - set to "true" if the SIM card is inserted and NOT locked by PIN or PUK. + * + * @return the list of AT commands (strings). + */ + virtual const std::vector& getDiagCommands(bool bIsSimReady = true) = 0; + class RadioBandMap : public MTS::NonCopyable { public: RadioBandMap() diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h index 91ab782..0523236 100644 --- a/include/mts/MTS_IO_ICellularRadio.h +++ b/include/mts/MTS_IO_ICellularRadio.h @@ -697,6 +697,27 @@ namespace MTS { */ virtual CODE setPdpContext(const std::string& sId, const Json::Value& jConfig) = 0; + /** + * @brief Execute the diagnostics AT commands and capture their output + * + * NOTE: The list of diagnostic AT commands is radio-specific and changes + * depending on the radio model (code). + * + * NOTE: The method stops its execution if the radio repeatedly ignores + * the commands (returns no execution result for several of them). This + * is required to limit the maximum execution time of the function and + * prevent the process from occupying the radio for too long. In case + * of timeout, the report will contain the output of all commands that + * it managed to execute before the failure. + * + * @param sDiagReport - the AT commands execution report. + * + * @return CODE::SUCCESS when fetched successfully, + * CODE::NO_RESPONSE when the radio ignored several of the AT commands, + * CODE::FAILURE otherwise. + */ + virtual CODE getDiagnostics(std::string& sDiagReport) = 0; + }; } } diff --git a/include/mts/MTS_IO_LE910Radio.h b/include/mts/MTS_IO_LE910Radio.h index 2ba423d..6700ee3 100644 --- a/include/mts/MTS_IO_LE910Radio.h +++ b/include/mts/MTS_IO_LE910Radio.h @@ -50,6 +50,8 @@ namespace MTS { protected: + const std::vector& getDiagCommands(bool bIsSimReady = true) override; + private: diff --git a/include/mts/MTS_IO_QuectelRadio.h b/include/mts/MTS_IO_QuectelRadio.h index bd312b8..4315cb3 100644 --- a/include/mts/MTS_IO_QuectelRadio.h +++ b/include/mts/MTS_IO_QuectelRadio.h @@ -85,6 +85,8 @@ namespace MTS { CODE setRxDiversity(const Json::Value& jArgs) override; + const std::vector& getDiagCommands(bool bIsSimReady = true) override; + private: // private variable to save old firmware versions during FOTA std::string m_sQuectelFirmware; diff --git a/include/mts/MTS_IO_TelitRadio.h b/include/mts/MTS_IO_TelitRadio.h index a06da54..d198969 100644 --- a/include/mts/MTS_IO_TelitRadio.h +++ b/include/mts/MTS_IO_TelitRadio.h @@ -73,6 +73,8 @@ namespace MTS { virtual CODE fumoWriteGroupsABD(int fd, UpdateCb& stepCb); //virtual CODE fumoWriteGroupC(int fd, UpdateCb& stepCb); + const std::vector& getDiagCommands(bool bIsSimReady = true) override; + static bool isContainsSignChar(const std::string& str); private: -- cgit v1.2.3