diff options
author | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2020-07-17 02:51:22 -0500 |
---|---|---|
committer | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2020-07-17 02:51:22 -0500 |
commit | d520358b3e88ae80af968254b42645c4d9eae604 (patch) | |
tree | d6c9c3f1f23de7e215fca1dbbe4f38b3c4a09815 /src/MTS_IO_ME910Radio.cpp | |
parent | f0be0e4a343f9a600fe8c9fc34fa580c548a4e9e (diff) | |
parent | 298efe4e17d3665f9ddbb9298a37b563c60de735 (diff) | |
download | libmts-io-d520358b3e88ae80af968254b42645c4d9eae604.tar.gz libmts-io-d520358b3e88ae80af968254b42645c4d9eae604.tar.bz2 libmts-io-d520358b3e88ae80af968254b42645c4d9eae604.zip |
Merge branch 'ap/vendor_firmware' into 'delta-radio-fwu'
Add vendor firmware version
See merge request !29
Diffstat (limited to 'src/MTS_IO_ME910Radio.cpp')
-rw-r--r-- | src/MTS_IO_ME910Radio.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/MTS_IO_ME910Radio.cpp b/src/MTS_IO_ME910Radio.cpp index 2b181d2..ad3e7ec 100644 --- a/src/MTS_IO_ME910Radio.cpp +++ b/src/MTS_IO_ME910Radio.cpp @@ -33,35 +33,3 @@ ME910Radio::ME910Radio(const std::string& sME910Model, const std::string& sPort) ICellularRadio::CODE ME910Radio::setRxDiversity(const Json::Value& jArgs) { return FAILURE; } - - -ICellularRadio::CODE ME910Radio::getFirmwareBuild(std::string& sFirmwareBuild) { - std::string sCmd("AT#CFVR"); - - std::string sResult = sendCommand(sCmd); - - size_t end = sResult.find(ICellularRadio::RSP_OK); - if (end == std::string::npos) { - printWarning("%s| Unable to get firmware build number [%s]", - getName().c_str(), - sCmd.c_str()); - return FAILURE; - } - - size_t start = sResult.find("#CFVR:"); - if (start == std::string::npos) { - printWarning("%s| Command returned unexpected response [%s]", - getName().c_str(), - sCmd.c_str()); - return FAILURE; - } - - start += sizeof("#CFVR:"); - - sFirmwareBuild = MTS::Text::trim(sResult.substr(start, end-start)); - if(sFirmwareBuild.size() == 0) { - printWarning("%s| Firmware Build Version is empty", getName().c_str()); - return FAILURE; - } - return SUCCESS; -} |