Add: Support for SIM7000 modules

This commit is contained in:
Sjur G. Wroldsen
2022-04-13 15:36:15 +02:00
parent 15cbc9bd50
commit 0733ea8ff4
9 changed files with 42 additions and 7 deletions

View File

@ -87,6 +87,12 @@ std::unique_ptr<DCE> create_SIM7600_dce(const dce_config *config, std::shared_pt
*/
std::unique_ptr<DCE> create_SIM7070_dce(const dce_config *config, std::shared_ptr<DTE> dte, esp_netif_t *netif);
/**
* @brief Create DCE based on SIM7000 module
*/
std::unique_ptr<DCE> create_SIM7000_dce(const dce_config *config, std::shared_ptr<DTE> dte, esp_netif_t *netif);
/**
* @brief Create DCE based on SIM800 module
*/

View File

@ -44,8 +44,8 @@ DECLARE_ALL_COMMAND_APIS(declare name(Commandable *p, ...);)
* @brief Following commands that are different for some specific modules
*/
command_result get_battery_status_sim7xxx(CommandableIf *t, int &voltage, int &bcs, int &bcl);
command_result power_down_sim7600(CommandableIf *t);
command_result power_down_sim7070(CommandableIf *t);
command_result power_down_sim76xx(CommandableIf *t);
command_result power_down_sim70xx(CommandableIf *t);
command_result power_down_sim8xx(CommandableIf *t);
command_result set_data_mode_sim8xx(CommandableIf *t);

View File

@ -118,6 +118,7 @@ enum class ModemType {
GenericModule, /*!< Default generic module with the most common commands */
SIM7600, /*!< Derived from the GenericModule, specifics applied to SIM7600 model */
SIM7070, /*!< Derived from the GenericModule, specifics applied to SIM7070 model */
SIM7000, /*!< Derived from the GenericModule, specifics applied to SIM7000 model */
BG96, /*!< Derived from the GenericModule, specifics applied to BG69 model */
SIM800, /*!< Derived from the GenericModule with specifics applied to SIM800 model */
};
@ -176,6 +177,8 @@ public:
return build_shared_module<SIM7600>(cfg, std::forward<Args>(args)...);
case ModemType::SIM7070:
return build_shared_module<SIM7070>(cfg, std::forward<Args>(args)...);
case ModemType::SIM7000:
return build_shared_module<SIM7000>(cfg, std::forward<Args>(args)...);
case ModemType::BG96:
return build_shared_module<BG96>(cfg, std::forward<Args>(args)...);
case ModemType::GenericModule:
@ -203,6 +206,8 @@ public:
return build_unique<SIM7600>(cfg, std::forward<Args>(args)...);
case ModemType::SIM7070:
return build_unique<SIM7070>(cfg, std::forward<Args>(args)...);
case ModemType::SIM7000:
return build_unique<SIM7000>(cfg, std::forward<Args>(args)...);
case ModemType::BG96:
return build_unique<BG96>(cfg, std::forward<Args>(args)...);
case ModemType::GenericModule:
@ -223,6 +228,8 @@ public:
return build<SIM7600>(cfg, std::forward<Args>(args)...);
case ModemType::SIM7070:
return build<SIM7070>(cfg, std::forward<Args>(args)...);
case ModemType::SIM7000:
return build<SIM7000>(cfg, std::forward<Args>(args)...);
case ModemType::BG96:
return build<BG96>(cfg, std::forward<Args>(args)...);
case ModemType::GenericModule:

View File

@ -132,6 +132,15 @@ public:
command_result power_down() override;
};
/**
* @brief Specific definition of the SIM7000 module
*/
class SIM7000: public GenericModule {
using GenericModule::GenericModule;
public:
command_result power_down() override;
};
/**
* @brief Specific definition of the SIM800 module
*/