diff --git a/components/esp_modem/include/cxx_include/esp_modem_command_library.hpp b/components/esp_modem/include/cxx_include/esp_modem_command_library.hpp index 0a92afd9d..1952d44f1 100644 --- a/components/esp_modem/include/cxx_include/esp_modem_command_library.hpp +++ b/components/esp_modem/include/cxx_include/esp_modem_command_library.hpp @@ -44,8 +44,10 @@ 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 set_gnss_power_mode_sim76xx(CommandableIf *t, int mode); command_result power_down_sim76xx(CommandableIf *t); command_result power_down_sim70xx(CommandableIf *t); +command_result set_network_bands_sim76xx(CommandableIf *t, const std::string& mode, const int* bands, int size); command_result power_down_sim8xx(CommandableIf *t); command_result set_data_mode_sim8xx(CommandableIf *t); diff --git a/components/esp_modem/include/cxx_include/esp_modem_dce_module.hpp b/components/esp_modem/include/cxx_include/esp_modem_dce_module.hpp index 435893bca..628d2e877 100644 --- a/components/esp_modem/include/cxx_include/esp_modem_dce_module.hpp +++ b/components/esp_modem/include/cxx_include/esp_modem_dce_module.hpp @@ -121,6 +121,8 @@ class SIM7600: public GenericModule { public: command_result get_battery_status(int &voltage, int &bcs, int &bcl) override; command_result power_down() override; + command_result set_gnss_power_mode(int mode) override; + command_result set_network_bands(const std::string& mode, const int* bands, int size) override; }; /** diff --git a/components/esp_modem/src/esp_modem_command_library.cpp b/components/esp_modem/src/esp_modem_command_library.cpp index cfb60d52c..9b6be6691 100644 --- a/components/esp_modem/src/esp_modem_command_library.cpp +++ b/components/esp_modem/src/esp_modem_command_library.cpp @@ -18,6 +18,7 @@ #include "cxx_include/esp_modem_dte.hpp" #include "cxx_include/esp_modem_dce_module.hpp" #include "cxx_include/esp_modem_command_library.hpp" +#include namespace esp_modem::dce_commands { @@ -489,6 +490,21 @@ command_result set_network_bands(CommandableIf *t, const std::string& mode, cons return generic_command_common(t, "AT+CBANDCFG=\"" + mode + "\"," + band_string + "\r"); } +command_result set_network_bands_sim76xx(CommandableIf *t, const std::string& mode, const int* bands, int size) +{ + ESP_LOGV(TAG, "%s", __func__ ); + std::string any_mode = "0xFFFFFFFF7FFFFFFF"; + uint64_t band_bits = 0; + for (int i = 0; i