diff options
author | Jeff Hatch <jhatch@multitech.com> | 2021-06-02 14:55:50 -0500 |
---|---|---|
committer | Jeff Hatch <jhatch@multitech.com> | 2021-06-02 14:55:50 -0500 |
commit | 8eb97c149a08f6ec9d938be53868ee426895bf0e (patch) | |
tree | fed63fa776088659855a9ae3b2c7f5d221ec3a25 /include/mts/MTS_IO_CellularRadio.h | |
parent | bcd5443bcfff3e17ee120c305bbfd0ce2c812b21 (diff) | |
parent | bc2875140ba6a91eaeab8e9626a212986dcf5d4d (diff) | |
download | libmts-io-1.0.26.tar.gz libmts-io-1.0.26.tar.bz2 libmts-io-1.0.26.zip |
Merge branch 'sk/GP-1111-carrier-detection' into 'master'
1.0.26
[GP-1111] mPower R. Apr 2021: +CEMODE shall be set to CEMODE=2
See merge request !40
Diffstat (limited to 'include/mts/MTS_IO_CellularRadio.h')
-rw-r--r-- | include/mts/MTS_IO_CellularRadio.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/mts/MTS_IO_CellularRadio.h b/include/mts/MTS_IO_CellularRadio.h index 7e7454b..daefcd1 100644 --- a/include/mts/MTS_IO_CellularRadio.h +++ b/include/mts/MTS_IO_CellularRadio.h @@ -137,6 +137,9 @@ namespace MTS { CODE setUeModeOfOperation(ICellularRadio::UE_MODES_OF_OPERATION mode) override; CODE getUeModeOfOperation(ICellularRadio::UE_MODES_OF_OPERATION& mode) override; + CODE getSimMccMnc(std::string& sMccMnc) override; + CODE getSimMccMnc(std::string& sMcc, std::string& sMnc) override; + protected: CellularRadio(const std::string& sName, const std::string& sRadioPort); @@ -182,6 +185,39 @@ namespace MTS { //! Get carrier code based on the SIM card ID (ICCID) virtual CODE getSimCarrierCode(const std::string& sIccid, std::string& sCarrierCode); + //! Get carrier code based on the SIM MCC/MNC + virtual CODE getSimCarrierCode(const std::string& sMcc, const std::string& sMnc, std::string& sCarrierCode); + + /** + * @brief simAccessReadBinary - Read a string of bytes from the SIM Elementary File. + * Please see ETSI TS 102 221 v16.4.0 and ETSI TS 127 007 v16.6.0 for the details. + * + * @param iFiledId - identifier of the Elementary File to read from. + * @param iP1 - offset (ETSI TS 102 221 v16.4.0, Section 11.1.3.2). + * @param iP2 - offset low (ETSI TS 102 221 v16.4.0, Section 11.1.3.2). + * @param iLe - number of bytes to be read (ETSI TS 102 221 v16.4.0, Section 11.1.3.2). + * @param sResult - container for the hex-encoded result string, + * example for EFpnn: "004F474F21FFFFFFFFFFFFFFFFFFFFFFFF". + * @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 simAccessReadBinary(uint16_t iFiledId, uint8_t iP1, uint8_t iP2, uint8_t iLe, std::string& sResult); + + /** + * @brief getSimMncLength - Read the length of the MNC from SIM EFad. + * Please see ETSI TS 131 102 V16.4.0, Section 4.2.18 for the details. + * + * @param iLength - container for the number of digits in SIM MNC. + * @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 getSimMncLength(uint8_t& iLength); 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); |