From 7634bcfed0ea186175e9f59672a38d2a86fbf025 Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Tue, 16 Jun 2020 11:50:20 +0300 Subject: GP-654: Add SIM card-based carrier detection This commit adds implementation of the SIM-based carrier detection. The goal for this implementation is to replace various places in the firmware that previously relied on the ICCID-based carrier detection, provide some layer of abstraction and forward compatibility for such places. It is particularly useful for fwSwitch radios with AUTO firmware selection capability. --- src/MTS_IO_ICellularRadio.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/MTS_IO_ICellularRadio.cpp') diff --git a/src/MTS_IO_ICellularRadio.cpp b/src/MTS_IO_ICellularRadio.cpp index 53c8faa..e83ce80 100644 --- a/src/MTS_IO_ICellularRadio.cpp +++ b/src/MTS_IO_ICellularRadio.cpp @@ -50,6 +50,7 @@ const char *MTS::IO::ICellularRadio::KEY_MDN = "mdn"; //!< Mobile Dir const char *MTS::IO::ICellularRadio::KEY_ICCID = "iccid"; //!< Integrated Circuit Card Identifier const char *MTS::IO::ICellularRadio::KEY_MSL = "msl"; //!< Master Subsidy Lock const char *MTS::IO::ICellularRadio::KEY_SUPPORTED_CELL_MODES = "supportedCellularModes"; //!< Comma-separated list of all supported cellular modes (2g,3g,4g) +const char *MTS::IO::ICellularRadio::KEY_MTS_SIM_CARRIER_CODE = "mtsSimCarrierCode"; //!< MTS-specific carrier code fetched from the SIM card //Dynamic Data const char *MTS::IO::ICellularRadio::KEY_ROAMING = "roaming"; //!< Indicates whether or not using Home Network @@ -112,6 +113,9 @@ const char *MTS::IO::ICellularRadio::VALUE_ABND_GSM_900 = "GSM 900"; const char *MTS::IO::ICellularRadio::VALUE_ABND_DCS_1800 = "DCS 1800"; const char *MTS::IO::ICellularRadio::VALUE_ABND_PCS_1900 = "PCS 1900"; +const char *MTS::IO::ICellularRadio::VALUE_MTS_CARRIER_CODE_VERIZON = "vz"; +const char *MTS::IO::ICellularRadio::VALUE_MTS_CARRIER_CODE_ATT = "att"; + const std::vector MTS::IO::ICellularRadio::DEFAULT_BAIL_STRINGS = { MTS::IO::ICellularRadio::RSP_OK, MTS::IO::ICellularRadio::RSP_ERROR }; MTS::IO::ICellularRadio::~ICellularRadio() -- cgit v1.2.3 From 747b898f36c4764475e61f20847ba4bbb3a81404 Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Tue, 16 Jun 2020 15:37:02 +0300 Subject: [GP-654] Add SIM card-based carrier detection Changes after a code review: - renamed "MTS Carrier Code" to the "Carrier Code"; - fixed descriptions for the new field and methods. --- src/MTS_IO_ICellularRadio.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/MTS_IO_ICellularRadio.cpp') diff --git a/src/MTS_IO_ICellularRadio.cpp b/src/MTS_IO_ICellularRadio.cpp index e83ce80..12d7916 100644 --- a/src/MTS_IO_ICellularRadio.cpp +++ b/src/MTS_IO_ICellularRadio.cpp @@ -50,8 +50,7 @@ const char *MTS::IO::ICellularRadio::KEY_MDN = "mdn"; //!< Mobile Dir const char *MTS::IO::ICellularRadio::KEY_ICCID = "iccid"; //!< Integrated Circuit Card Identifier const char *MTS::IO::ICellularRadio::KEY_MSL = "msl"; //!< Master Subsidy Lock const char *MTS::IO::ICellularRadio::KEY_SUPPORTED_CELL_MODES = "supportedCellularModes"; //!< Comma-separated list of all supported cellular modes (2g,3g,4g) -const char *MTS::IO::ICellularRadio::KEY_MTS_SIM_CARRIER_CODE = "mtsSimCarrierCode"; //!< MTS-specific carrier code fetched from the SIM card - +const char *MTS::IO::ICellularRadio::KEY_SIM_CARRIER_CODE = "simCarrierCode"; //!< Unique carrier identifier based on the SIM card information. //Dynamic Data const char *MTS::IO::ICellularRadio::KEY_ROAMING = "roaming"; //!< Indicates whether or not using Home Network const char *MTS::IO::ICellularRadio::KEY_DATETIME = "datetime"; //!< Date and Time from tower @@ -113,8 +112,8 @@ const char *MTS::IO::ICellularRadio::VALUE_ABND_GSM_900 = "GSM 900"; const char *MTS::IO::ICellularRadio::VALUE_ABND_DCS_1800 = "DCS 1800"; const char *MTS::IO::ICellularRadio::VALUE_ABND_PCS_1900 = "PCS 1900"; -const char *MTS::IO::ICellularRadio::VALUE_MTS_CARRIER_CODE_VERIZON = "vz"; -const char *MTS::IO::ICellularRadio::VALUE_MTS_CARRIER_CODE_ATT = "att"; +const char *MTS::IO::ICellularRadio::VALUE_CARRIER_CODE_VERIZON = "vz"; +const char *MTS::IO::ICellularRadio::VALUE_CARRIER_CODE_ATT = "att"; const std::vector MTS::IO::ICellularRadio::DEFAULT_BAIL_STRINGS = { MTS::IO::ICellularRadio::RSP_OK, MTS::IO::ICellularRadio::RSP_ERROR }; -- cgit v1.2.3