mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-17 20:42:21 +02:00
Add: Support for SIM7000 modules
This commit is contained in:
@ -59,6 +59,11 @@ std::unique_ptr<DCE> create_SIM7070_dce(const dce_config *config, std::shared_pt
|
||||
return create_modem_dce(dce_factory::ModemType::SIM7070, config, std::move(dte), netif);
|
||||
}
|
||||
|
||||
std::unique_ptr<DCE> create_SIM7000_dce(const dce_config *config, std::shared_ptr<DTE> dte, esp_netif_t *netif)
|
||||
{
|
||||
return create_modem_dce(dce_factory::ModemType::SIM7000, config, std::move(dte), netif);
|
||||
}
|
||||
|
||||
std::unique_ptr<DCE> create_SIM800_dce(const dce_config *config, std::shared_ptr<DTE> dte, esp_netif_t *netif)
|
||||
{
|
||||
return create_modem_dce(dce_factory::ModemType::SIM800, config, std::move(dte), netif);
|
||||
|
@ -61,6 +61,8 @@ static inline dce_factory::ModemType convert_modem_enum(esp_modem_dce_device_t m
|
||||
return esp_modem::dce_factory::ModemType::SIM7600;
|
||||
case ESP_MODEM_DCE_SIM7070:
|
||||
return esp_modem::dce_factory::ModemType::SIM7070;
|
||||
case ESP_MODEM_DCE_SIM7000:
|
||||
return esp_modem::dce_factory::ModemType::SIM7000;
|
||||
case ESP_MODEM_DCE_BG96:
|
||||
return esp_modem::dce_factory::ModemType::BG96;
|
||||
case ESP_MODEM_DCE_SIM800:
|
||||
|
@ -121,13 +121,13 @@ command_result power_down(CommandableIf *t)
|
||||
return generic_command(t, "AT+QPOWD=1\r", "POWERED DOWN", "ERROR", 1000);
|
||||
}
|
||||
|
||||
command_result power_down_sim7600(CommandableIf *t)
|
||||
command_result power_down_sim76xx(CommandableIf *t)
|
||||
{
|
||||
ESP_LOGV(TAG, "%s", __func__ );
|
||||
return generic_command_common(t, "AT+CPOF\r", 1000);
|
||||
}
|
||||
|
||||
command_result power_down_sim7070(CommandableIf *t)
|
||||
command_result power_down_sim70xx(CommandableIf *t)
|
||||
{
|
||||
ESP_LOGV(TAG, "%s", __func__ );
|
||||
return generic_command(t, "AT+CPOWD=1\r", "POWER DOWN", "ERROR", 1000);
|
||||
|
@ -57,12 +57,17 @@ command_result SIM7600::get_battery_status(int &voltage, int &bcs, int &bcl)
|
||||
|
||||
command_result SIM7600::power_down()
|
||||
{
|
||||
return dce_commands::power_down_sim7600(dte.get());
|
||||
return dce_commands::power_down_sim76xx(dte.get());
|
||||
}
|
||||
|
||||
command_result SIM7070::power_down()
|
||||
{
|
||||
return dce_commands::power_down_sim7070(dte.get());
|
||||
return dce_commands::power_down_sim70xx(dte.get());
|
||||
}
|
||||
|
||||
command_result SIM7000::power_down()
|
||||
{
|
||||
return dce_commands::power_down_sim70xx(dte.get());
|
||||
}
|
||||
|
||||
command_result SIM800::power_down()
|
||||
|
Reference in New Issue
Block a user