From bfcef5e9d1e384cf34ebef0f7cc98858a8445827 Mon Sep 17 00:00:00 2001 From: Mykyta Dorokhin Date: Tue, 8 May 2018 14:05:38 +0300 Subject: Add FTP FOTA upgrade functionality for ME910C1-NV radios Signed-off-by: Jeff Hatch --- include/mts/MTS_IO_ME910C1NVRadio.h | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/mts/MTS_IO_ME910C1NVRadio.h b/include/mts/MTS_IO_ME910C1NVRadio.h index 44dca6b..3d0b3b0 100644 --- a/include/mts/MTS_IO_ME910C1NVRadio.h +++ b/include/mts/MTS_IO_ME910C1NVRadio.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 by Multi-Tech Systems + * Copyright (C) 2018 by Multi-Tech Systems * * This file is part of libmts-io. * @@ -21,8 +21,8 @@ /*! \file MTS_IO_ME910C1NVRadio.h \brief A brief description - \date Jan 19, 2015 - \author sgodinez + \date May 1, 2018 + \author mykyta.dorokhin A more elaborate description */ @@ -42,12 +42,34 @@ namespace MTS { ME910C1NVRadio(const std::string& sPort); virtual ~ME910C1NVRadio(){}; + virtual CODE updateFumo(const Json::Value& jArgs, UpdateCb& stepCb); virtual CODE getCarrier(std::string& sCarrier); 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