summaryrefslogtreecommitdiff
path: root/include/mts
diff options
context:
space:
mode:
authorMykola Salomatin <mykola.salomatin@globallogic.com>2021-09-29 16:20:21 +0300
committerMykola Salomatin <mykola.salomatin@globallogic.com>2021-09-29 16:20:21 +0300
commit28b673dd4db086f1957c5cdae281f54980715e36 (patch)
treed9e62a1a039fc9a25d67ec4ef6ad2a260ad97ce0 /include/mts
parent8eb97c149a08f6ec9d938be53868ee426895bf0e (diff)
downloadlibmts-io-28b673dd4db086f1957c5cdae281f54980715e36.tar.gz
libmts-io-28b673dd4db086f1957c5cdae281f54980715e36.tar.bz2
libmts-io-28b673dd4db086f1957c5cdae281f54980715e36.zip
[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.
Diffstat (limited to 'include/mts')
-rw-r--r--include/mts/MTS_IO_CellularRadio.h5
-rw-r--r--include/mts/MTS_IO_ICellularRadio.h28
-rw-r--r--include/mts/MTS_IO_LE910C4NFRadio.h4
-rw-r--r--include/mts/MTS_IO_QuectelRadio.h4
4 files changed, 41 insertions, 0 deletions
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();