ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::modem::ModemComponent Class Reference

#include <modem_component.h>

Inheritance diagram for esphome::modem::ModemComponent:
esphome::Component

Data Structures

struct  PinRecord
 

Public Member Functions

 ModemComponent (InternalGPIOPin *tx_pin, InternalGPIOPin *rx_pin, const char *model, DceFactory factory, const char *apn)
 
void setup () override
 
void loop () override
 
void dump_config () override
 
float get_setup_priority () const override
 
void set_reboot_timeout (uint32_t timeout)
 
void set_use_address (const char *use_address)
 
void set_rts_pin (InternalGPIOPin *rts_pin)
 
void set_cts_pin (InternalGPIOPin *cts_pin)
 
void set_baud_rate (int baud_rate)
 
void set_pin_code (const char *pin_code)
 
void set_tx_buffer_size (uint16_t tx_buffer_size)
 
void set_rx_buffer_size (uint16_t rx_buffer_size)
 
void set_dte_buffer_size (uint16_t dte_buffer_size)
 
void set_init_at_commands (const char *const *cmds, uint8_t count)
 
void set_urc_text_sensor (text_sensor::TextSensor *urc_text_sensor)
 
template<typename F >
void add_on_state_callback (F &&callback)
 
bool is_connected () const
 
bool is_disabled () const
 
bool is_enabled () const
 
void enable ()
 
void disable ()
 
bool send_at (const char *cmd, uint32_t timeout=COMMAND_TIMEOUT_MS)
 Queue an AT command for the modem task, which sends it at its next pass and logs the result and response.
 
bool send_at (const std::string &cmd, uint32_t timeout=COMMAND_TIMEOUT_MS)
 
network::IPAddresses get_ip_addresses ()
 
const char * get_use_address () const
 
- Public Member Functions inherited from esphome::Component
float get_actual_setup_priority () const
 
void set_setup_priority (float priority)
 
void call ()
 
virtual void on_shutdown ()
 
virtual void on_safe_shutdown ()
 
virtual bool teardown ()
 Called during teardown to allow component to gracefully finish operations.
 
virtual void on_powerdown ()
 Called after teardown is complete to power down hardware.
 
uint8_t get_component_state () const
 
void reset_to_construction_state ()
 Reset this component back to the construction state to allow setup to run again.
 
bool is_in_loop_state () const
 Check if this component has completed setup and is in the loop state.
 
bool is_idle () const
 Check if this component is idle.
 
void mark_failed ()
 Mark this component as failed.
 
void mark_failed (const LogString *message)
 
void disable_loop ()
 Disable this component's loop.
 
void enable_loop ()
 Enable this component's loop.
 
void enable_loop_soon_any_context ()
 Thread and ISR-safe version of enable_loop() that can be called from any context.
 
bool is_failed () const
 
bool is_ready () const
 
virtual bool can_proceed ()
 
bool status_has_warning () const
 
bool status_has_error () const
 
void status_set_warning ()
 
void status_set_warning (const char *message)
 
void status_set_warning (const LogString *message)
 
bool status_comm_result (bool ok)
 Clears the warning when ok, else sets it with message (default "Communication failed"); returns ok.
 
bool status_comm_result (bool ok, const LogString *message)
 
void status_set_error ()
 
void status_set_error (const LogString *message)
 
void status_clear_warning ()
 
void status_clear_error ()
 
 ESPDEPRECATED ("Use status_momentary_warning() without a name. Removed in 2027.5.0", "2026.11.0") void status_momentary_warning(const char *name
 
void status_momentary_warning (uint32_t length=5000)
 Set warning status flag and clear it after length ms.
 
void status_momentary_warning (const LogString *message, uint32_t length=5000)
 
 ESPDEPRECATED ("Use status_momentary_error() without a name. Removed in 2027.5.0", "2026.11.0") void status_momentary_error(const char *name
 
void status_momentary_error (uint32_t length=5000)
 Set error status flag and clear it after length ms.
 
void status_momentary_error (const LogString *message, uint32_t length=5000)
 
bool has_overridden_loop () const
 
const LogString * get_component_log_str () const ESPHOME_ALWAYS_INLINE
 Get the integration where this component was declared as a LogString for logging.
 
bool should_warn_of_blocking (uint32_t blocking_time, uint32_t &threshold_ms_out)
 

Protected Types

enum  Pending : uint32_t {
  PENDING_STATUS = 1 << 0 , PENDING_SAVE_BAUD = 1 << 1 , PENDING_SAVE_PIN = 1 << 2 , PENDING_CONNECT_TIMEOUT = 1 << 3 ,
  PENDING_ON_SYNC = 1 << 4 , PENDING_ON_CONNECT = 1 << 5 , PENDING_ON_DISCONNECT = 1 << 6
}
 

Protected Member Functions

void run_task_ ()
 
void wake_task_ ()
 
ModemState compute_next_state_ ()
 
ModemState handle_state_enabling_ ()
 
ModemState handle_state_synced_ ()
 
ModemState handle_state_connecting_ ()
 
ModemState handle_state_wait_ip_ ()
 
ModemState handle_state_disconnecting_ ()
 
uint32_t next_probe_delay_ ()
 Pause the task before the next pass, then go to state.
 
ModemState retry_ (ModemState state, uint32_t delay_ms=RETRY_DELAY_MS)
 
void transition_to_ (ModemState next_state)
 
void arm_connect_timeout_ ()
 
void cancel_connect_timeout_ ()
 
void fail_setup_ (const LogString *reason)
 
void set_fault_ (ModemFault fault)
 
void set_teardown_fault_ ()
 
void clear_config_fault_ (ModemFault fault)
 
void hand_over_ (uint32_t pending)
 
esp_modem::command_result at_ (const char *cmd, uint32_t timeout=COMMAND_TIMEOUT_MS)
 Send an AT command from the task and log the result; blocks for up to the timeout.
 
void publish_status_ ()
 
void not_responding_ (int baud)
 
void dump_connect_params_ ()
 
SimResult prepare_sim_ ()
 
SimResult send_pin_ ()
 
void save_pin_record_ ()
 
- Protected Member Functions inherited from esphome::Component
friend void::setup ()
 
friend void::original_setup ()
 
void set_component_source_ (uint8_t index)
 Set where this component was loaded from for some debug messages.
 
virtual void call_setup ()
 
void call_dump_config_ ()
 
void enable_loop_slow_path_ ()
 
void set_component_state_ (uint8_t state)
 Helper to set component state (clears state bits and sets new state)
 
bool set_status_flag_ (uint8_t flag)
 Helper to set a status LED flag on both this component and the app.
 
bool set_error_flag_ (const LogString *message)
 Set the error flag and log it; true when it was not set before.
 
void set_interval (const char *name, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a const char* name.
 
void set_interval (uint32_t id, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a numeric ID (zero heap allocation).
 
void set_interval (InternalSchedulerID id, uint32_t interval, std::function< void()> &&f)
 
void set_interval (uint32_t interval, std::function< void()> &&f)
 
bool cancel_interval (const char *name)
 Cancel an interval function.
 
bool cancel_interval (uint32_t id)
 
bool cancel_interval (InternalSchedulerID id)
 
void set_timeout (const char *name, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a const char* name.
 
void set_timeout (uint32_t id, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a numeric ID (zero heap allocation).
 
void set_timeout (InternalSchedulerID id, uint32_t timeout, std::function< void()> &&f)
 
void set_timeout (uint32_t timeout, std::function< void()> &&f)
 
bool cancel_timeout (const char *name)
 Cancel a timeout function.
 
bool cancel_timeout (uint32_t id)
 
bool cancel_timeout (InternalSchedulerID id)
 
void defer (const char *name, std::function< void()> &&f)
 Defer a callback to the next loop() call with a const char* name.
 
void defer (std::function< void()> &&f)
 Defer a callback to the next loop() call.
 
void defer (uint32_t id, std::function< void()> &&f)
 Defer a callback with a numeric ID (zero heap allocation)
 
bool cancel_defer (const char *name)
 Cancel a defer callback using the specified name, name must not be empty.
 
bool cancel_defer (uint32_t id)
 
void status_clear_warning_slow_path_ ()
 
void status_clear_error_slow_path_ ()
 

Static Protected Member Functions

static void task_entry (void *arg)
 

Protected Attributes

InternalGPIOPin * tx_pin_
 
InternalGPIOPin * rx_pin_
 
InternalGPIOPin * rts_pin_ {nullptr}
 
InternalGPIOPin * cts_pin_ {nullptr}
 
const char * model_
 
DceFactory dce_factory_
 
const char * apn_
 
const char *const * init_at_commands_ {nullptr}
 
text_sensor::TextSensor * urc_text_sensor_ {nullptr}
 
const char * urc_line_ {nullptr}
 
std::unique_ptr< esp_modem::DCE > dce_
 
std::shared_ptr< esp_modem::DTE > dte_
 
esp_netif_t * ppp_netif_ {nullptr}
 
ESPPreferenceObject pref_
 
LazyCallbackManager< void(ModemState)> on_state_callback_
 
int baud_rate_ {0}
 
int current_baud_rate_ {0}
 
int restored_baud_ {0}
 
StaticTask task_
 
uint32_t timeout_ {0}
 
uint32_t step_delay_ms_ {0}
 
uint32_t state_started_ms_ {0}
 
std::atomic< uint32_t > pending_ {0}
 
const char * pin_code_ {nullptr}
 
ESPPreferenceObject pin_pref_
 
PinRecord pin_record_ {}
 
uint32_t at_timeout_ {COMMAND_TIMEOUT_MS}
 
uint16_t tx_buffer_size_ {1024}
 
uint16_t rx_buffer_size_ {1024}
 
uint16_t dte_buffer_size_ {1024}
 
std::atomic< ModemState > component_state_ {ModemState::MODEM_STATE_DISABLED}
 
std::atomic< ModemState > target_state_ {ModemState::MODEM_STATE_DISABLED}
 
std::atomic< ModemFault > fault_ {ModemFault::MODEM_FAULT_NONE}
 
std::atomic< ModemFault > config_fault_ {ModemFault::MODEM_FAULT_NONE}
 
std::atomic< uint8_t > got_ip_ {0}
 
std::atomic< uint8_t > ppp_error_ {0}
 
std::atomic< uint8_t > probe_backoff_ {0}
 
std::atomic< uint8_t > sync_acked_ {0}
 
std::atomic< uint8_t > at_pending_ {0}
 
std::atomic< uint8_t > urc_pending_ {0}
 
std::atomic< PinSave > pin_save_state_ {PinSave::PIN_SAVE_DONE}
 
PinStep pin_step_ {PinStep::PIN_STEP_IDLE}
 
bool pin_record_unsaved_ {false}
 
ConnectStep connect_step_ {ConnectStep::CONNECT_STEP_START}
 
uint8_t init_at_count_ {0}
 
uint8_t uart_port_ {UART_NUM_MAX}
 
uint8_t attach_polls_ {0}
 
bool connect_timeout_armed_ {false}
 
bool modem_synced_ {false}
 
bool resync_ {false}
 
char at_command_ [AT_COMMAND_SIZE]
 
LineReader< URC_LINE_SIZE > urc_reader_
 
- Protected Attributes inherited from esphome::Component
uint8_t component_source_index_ {0}
 Index into component source PROGMEM lookup table (0 = not set)
 
uint8_t warn_if_blocking_over_ {WARN_IF_BLOCKING_OVER_CS}
 Warn threshold in centiseconds (max 2550ms)
 
uint8_t component_state_ {0x00}
 State of this component - each bit has a purpose: Bits 0-2: Component state (0x00=CONSTRUCTION, 0x01=SETUP, 0x02=LOOP, 0x03=FAILED, 0x04=LOOP_DONE) Bit 3: STATUS_LED_WARNING Bit 4: STATUS_LED_ERROR Bit 5: Has overridden loop() (set at registration time) Bits 6-7: Unused - reserved for future expansion.
 
volatile bool pending_enable_loop_ {false}
 ISR-safe flag for enable_loop_soon_any_context.
 
ComponentRuntimeStats runtime_stats_
 

Static Protected Attributes

static constexpr uint32_t COMMAND_TIMEOUT_MS = 1000
 
static constexpr uint32_t RETRY_DELAY_MS = 1000
 
static constexpr size_t URC_LINE_SIZE = 128
 
static constexpr size_t AT_COMMAND_SIZE = 128
 

Additional Inherited Members

- Data Fields inherited from esphome::Component
uint32_t length = 5000)
 

Detailed Description

Definition at line 85 of file modem_component.h.

Member Enumeration Documentation

◆ Pending

Enumerator
PENDING_STATUS 
PENDING_SAVE_BAUD 
PENDING_SAVE_PIN 
PENDING_CONNECT_TIMEOUT 
PENDING_ON_SYNC 
PENDING_ON_CONNECT 
PENDING_ON_DISCONNECT 

Definition at line 156 of file modem_component.h.

Constructor & Destructor Documentation

◆ ModemComponent()

esphome::modem::ModemComponent::ModemComponent ( InternalGPIOPin * tx_pin,
InternalGPIOPin * rx_pin,
const char * model,
DceFactory factory,
const char * apn )

Definition at line 83 of file modem_component.cpp.

Member Function Documentation

◆ add_on_state_callback()

template<typename F >
void esphome::modem::ModemComponent::add_on_state_callback ( F && callback)
inline

Definition at line 112 of file modem_component.h.

◆ arm_connect_timeout_()

void esphome::modem::ModemComponent::arm_connect_timeout_ ( )
protected

Definition at line 114 of file modem_component.cpp.

◆ at_()

command_result esphome::modem::ModemComponent::at_ ( const char * cmd,
uint32_t timeout = COMMAND_TIMEOUT_MS )
protected

Send an AT command from the task and log the result; blocks for up to the timeout.

Definition at line 908 of file modem_component.cpp.

◆ cancel_connect_timeout_()

void esphome::modem::ModemComponent::cancel_connect_timeout_ ( )
protected

Definition at line 131 of file modem_component.cpp.

◆ clear_config_fault_()

void esphome::modem::ModemComponent::clear_config_fault_ ( ModemFault fault)
protected

Definition at line 181 of file modem_component.cpp.

◆ compute_next_state_()

ModemState esphome::modem::ModemComponent::compute_next_state_ ( )
protected

Definition at line 508 of file modem_component.cpp.

◆ disable()

void esphome::modem::ModemComponent::disable ( )

Definition at line 100 of file modem_component.cpp.

◆ dump_config()

void esphome::modem::ModemComponent::dump_config ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 449 of file modem_component.cpp.

◆ dump_connect_params_()

void esphome::modem::ModemComponent::dump_connect_params_ ( )
protected

Definition at line 1050 of file modem_component.cpp.

◆ enable()

void esphome::modem::ModemComponent::enable ( )

Definition at line 89 of file modem_component.cpp.

◆ fail_setup_()

void esphome::modem::ModemComponent::fail_setup_ ( const LogString * reason)
protected

Definition at line 148 of file modem_component.cpp.

◆ get_ip_addresses()

network::IPAddresses esphome::modem::ModemComponent::get_ip_addresses ( )

Definition at line 136 of file modem_component.cpp.

◆ get_setup_priority()

float esphome::modem::ModemComponent::get_setup_priority ( ) const
inlineoverridevirtual

Reimplemented from esphome::Component.

Definition at line 92 of file modem_component.h.

◆ get_use_address()

const char * esphome::modem::ModemComponent::get_use_address ( ) const
inline

Definition at line 132 of file modem_component.h.

◆ hand_over_()

void esphome::modem::ModemComponent::hand_over_ ( uint32_t pending)
protected

Definition at line 157 of file modem_component.cpp.

◆ handle_state_connecting_()

ModemState esphome::modem::ModemComponent::handle_state_connecting_ ( )
protected

Definition at line 708 of file modem_component.cpp.

◆ handle_state_disconnecting_()

ModemState esphome::modem::ModemComponent::handle_state_disconnecting_ ( )
protected

Definition at line 816 of file modem_component.cpp.

◆ handle_state_enabling_()

ModemState esphome::modem::ModemComponent::handle_state_enabling_ ( )
protected

Definition at line 550 of file modem_component.cpp.

◆ handle_state_synced_()

ModemState esphome::modem::ModemComponent::handle_state_synced_ ( )
protected

Definition at line 693 of file modem_component.cpp.

◆ handle_state_wait_ip_()

ModemState esphome::modem::ModemComponent::handle_state_wait_ip_ ( )
protected

Definition at line 795 of file modem_component.cpp.

◆ is_connected()

bool esphome::modem::ModemComponent::is_connected ( ) const
inline

Definition at line 116 of file modem_component.h.

◆ is_disabled()

bool esphome::modem::ModemComponent::is_disabled ( ) const
inline

Definition at line 117 of file modem_component.h.

◆ is_enabled()

bool esphome::modem::ModemComponent::is_enabled ( ) const
inline

Definition at line 121 of file modem_component.h.

◆ loop()

void esphome::modem::ModemComponent::loop ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 215 of file modem_component.cpp.

◆ next_probe_delay_()

uint32_t esphome::modem::ModemComponent::next_probe_delay_ ( )
protected

Pause the task before the next pass, then go to state.

Definition at line 494 of file modem_component.cpp.

◆ not_responding_()

void esphome::modem::ModemComponent::not_responding_ ( int baud)
protected

Definition at line 877 of file modem_component.cpp.

◆ prepare_sim_()

SimResult esphome::modem::ModemComponent::prepare_sim_ ( )
protected

Definition at line 920 of file modem_component.cpp.

◆ publish_status_()

void esphome::modem::ModemComponent::publish_status_ ( )
protected

Definition at line 188 of file modem_component.cpp.

◆ retry_()

ModemState esphome::modem::ModemComponent::retry_ ( ModemState state,
uint32_t delay_ms = RETRY_DELAY_MS )
protected

Definition at line 503 of file modem_component.cpp.

◆ run_task_()

void esphome::modem::ModemComponent::run_task_ ( )
protected

Definition at line 477 of file modem_component.cpp.

◆ save_pin_record_()

void esphome::modem::ModemComponent::save_pin_record_ ( )
protected

Definition at line 987 of file modem_component.cpp.

◆ send_at() [1/2]

bool esphome::modem::ModemComponent::send_at ( const char * cmd,
uint32_t timeout = COMMAND_TIMEOUT_MS )

Queue an AT command for the modem task, which sends it at its next pass and logs the result and response.

Returns false when a command is still queued or the command is too long.

Definition at line 885 of file modem_component.cpp.

◆ send_at() [2/2]

bool esphome::modem::ModemComponent::send_at ( const std::string & cmd,
uint32_t timeout = COMMAND_TIMEOUT_MS )

Definition at line 883 of file modem_component.cpp.

◆ send_pin_()

SimResult esphome::modem::ModemComponent::send_pin_ ( )
protected

Definition at line 994 of file modem_component.cpp.

◆ set_baud_rate()

void esphome::modem::ModemComponent::set_baud_rate ( int baud_rate)
inline

Definition at line 98 of file modem_component.h.

◆ set_cts_pin()

void esphome::modem::ModemComponent::set_cts_pin ( InternalGPIOPin * cts_pin)
inline

Definition at line 97 of file modem_component.h.

◆ set_dte_buffer_size()

void esphome::modem::ModemComponent::set_dte_buffer_size ( uint16_t dte_buffer_size)
inline

Definition at line 104 of file modem_component.h.

◆ set_fault_()

void esphome::modem::ModemComponent::set_fault_ ( ModemFault fault)
protected

Definition at line 163 of file modem_component.cpp.

◆ set_init_at_commands()

void esphome::modem::ModemComponent::set_init_at_commands ( const char *const * cmds,
uint8_t count )
inline

Definition at line 105 of file modem_component.h.

◆ set_pin_code()

void esphome::modem::ModemComponent::set_pin_code ( const char * pin_code)
inline

Definition at line 100 of file modem_component.h.

◆ set_reboot_timeout()

void esphome::modem::ModemComponent::set_reboot_timeout ( uint32_t timeout)
inline

Definition at line 94 of file modem_component.h.

◆ set_rts_pin()

void esphome::modem::ModemComponent::set_rts_pin ( InternalGPIOPin * rts_pin)
inline

Definition at line 96 of file modem_component.h.

◆ set_rx_buffer_size()

void esphome::modem::ModemComponent::set_rx_buffer_size ( uint16_t rx_buffer_size)
inline

Definition at line 103 of file modem_component.h.

◆ set_teardown_fault_()

void esphome::modem::ModemComponent::set_teardown_fault_ ( )
protected

Definition at line 175 of file modem_component.cpp.

◆ set_tx_buffer_size()

void esphome::modem::ModemComponent::set_tx_buffer_size ( uint16_t tx_buffer_size)
inline

Definition at line 102 of file modem_component.h.

◆ set_urc_text_sensor()

void esphome::modem::ModemComponent::set_urc_text_sensor ( text_sensor::TextSensor * urc_text_sensor)
inline

Definition at line 110 of file modem_component.h.

◆ set_use_address()

void esphome::modem::ModemComponent::set_use_address ( const char * use_address)
inline

Definition at line 95 of file modem_component.h.

◆ setup()

void esphome::modem::ModemComponent::setup ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 280 of file modem_component.cpp.

◆ task_entry()

void esphome::modem::ModemComponent::task_entry ( void * arg)
staticprotected

Definition at line 475 of file modem_component.cpp.

◆ transition_to_()

void esphome::modem::ModemComponent::transition_to_ ( ModemState next_state)
protected

Definition at line 840 of file modem_component.cpp.

◆ wake_task_()

void esphome::modem::ModemComponent::wake_task_ ( )
protected

Definition at line 107 of file modem_component.cpp.

Field Documentation

◆ apn_

const char* esphome::modem::ModemComponent::apn_
protected

Definition at line 193 of file modem_component.h.

◆ at_command_

char esphome::modem::ModemComponent::at_command_[AT_COMMAND_SIZE]
protected

Definition at line 266 of file modem_component.h.

◆ AT_COMMAND_SIZE

size_t esphome::modem::ModemComponent::AT_COMMAND_SIZE = 128
staticconstexprprotected

Definition at line 138 of file modem_component.h.

◆ at_pending_

std::atomic<uint8_t> esphome::modem::ModemComponent::at_pending_ {0}
protected

Definition at line 247 of file modem_component.h.

◆ at_timeout_

uint32_t esphome::modem::ModemComponent::at_timeout_ {COMMAND_TIMEOUT_MS}
protected

Definition at line 225 of file modem_component.h.

◆ attach_polls_

uint8_t esphome::modem::ModemComponent::attach_polls_ {0}
protected

Definition at line 261 of file modem_component.h.

◆ baud_rate_

int esphome::modem::ModemComponent::baud_rate_ {0}
protected

Definition at line 204 of file modem_component.h.

◆ COMMAND_TIMEOUT_MS

uint32_t esphome::modem::ModemComponent::COMMAND_TIMEOUT_MS = 1000
staticconstexprprotected

Definition at line 135 of file modem_component.h.

◆ component_state_

std::atomic<ModemState> esphome::modem::ModemComponent::component_state_ {ModemState::MODEM_STATE_DISABLED}
protected

Definition at line 231 of file modem_component.h.

◆ config_fault_

std::atomic<ModemFault> esphome::modem::ModemComponent::config_fault_ {ModemFault::MODEM_FAULT_NONE}
protected

Definition at line 236 of file modem_component.h.

◆ connect_step_

ConnectStep esphome::modem::ModemComponent::connect_step_ {ConnectStep::CONNECT_STEP_START}
protected

Definition at line 258 of file modem_component.h.

◆ connect_timeout_armed_

bool esphome::modem::ModemComponent::connect_timeout_armed_ {false}
protected

Definition at line 262 of file modem_component.h.

◆ cts_pin_

InternalGPIOPin* esphome::modem::ModemComponent::cts_pin_ {nullptr}
protected

Definition at line 190 of file modem_component.h.

◆ current_baud_rate_

int esphome::modem::ModemComponent::current_baud_rate_ {0}
protected

Definition at line 205 of file modem_component.h.

◆ dce_

std::unique_ptr<esp_modem::DCE> esphome::modem::ModemComponent::dce_
protected

Definition at line 199 of file modem_component.h.

◆ dce_factory_

DceFactory esphome::modem::ModemComponent::dce_factory_
protected

Definition at line 192 of file modem_component.h.

◆ dte_

std::shared_ptr<esp_modem::DTE> esphome::modem::ModemComponent::dte_
protected

Definition at line 200 of file modem_component.h.

◆ dte_buffer_size_

uint16_t esphome::modem::ModemComponent::dte_buffer_size_ {1024}
protected

Definition at line 229 of file modem_component.h.

◆ fault_

std::atomic<ModemFault> esphome::modem::ModemComponent::fault_ {ModemFault::MODEM_FAULT_NONE}
protected

Definition at line 234 of file modem_component.h.

◆ got_ip_

std::atomic<uint8_t> esphome::modem::ModemComponent::got_ip_ {0}
protected

Definition at line 239 of file modem_component.h.

◆ init_at_commands_

const char* const* esphome::modem::ModemComponent::init_at_commands_ {nullptr}
protected

Definition at line 194 of file modem_component.h.

◆ init_at_count_

uint8_t esphome::modem::ModemComponent::init_at_count_ {0}
protected

Definition at line 259 of file modem_component.h.

◆ model_

const char* esphome::modem::ModemComponent::model_
protected

Definition at line 191 of file modem_component.h.

◆ modem_synced_

bool esphome::modem::ModemComponent::modem_synced_ {false}
protected

Definition at line 263 of file modem_component.h.

◆ on_state_callback_

LazyCallbackManager<void(ModemState)> esphome::modem::ModemComponent::on_state_callback_
protected

Definition at line 203 of file modem_component.h.

◆ pending_

std::atomic<uint32_t> esphome::modem::ModemComponent::pending_ {0}
protected

Definition at line 211 of file modem_component.h.

◆ pin_code_

const char* esphome::modem::ModemComponent::pin_code_ {nullptr}
protected

Definition at line 213 of file modem_component.h.

◆ pin_pref_

ESPPreferenceObject esphome::modem::ModemComponent::pin_pref_
protected

Definition at line 214 of file modem_component.h.

◆ pin_record_

PinRecord esphome::modem::ModemComponent::pin_record_ {}
protected

Definition at line 222 of file modem_component.h.

◆ pin_record_unsaved_

bool esphome::modem::ModemComponent::pin_record_unsaved_ {false}
protected

Definition at line 256 of file modem_component.h.

◆ pin_save_state_

std::atomic<PinSave> esphome::modem::ModemComponent::pin_save_state_ {PinSave::PIN_SAVE_DONE}
protected

Definition at line 254 of file modem_component.h.

◆ pin_step_

PinStep esphome::modem::ModemComponent::pin_step_ {PinStep::PIN_STEP_IDLE}
protected

Definition at line 255 of file modem_component.h.

◆ ppp_error_

std::atomic<uint8_t> esphome::modem::ModemComponent::ppp_error_ {0}
protected

Definition at line 240 of file modem_component.h.

◆ ppp_netif_

esp_netif_t* esphome::modem::ModemComponent::ppp_netif_ {nullptr}
protected

Definition at line 201 of file modem_component.h.

◆ pref_

ESPPreferenceObject esphome::modem::ModemComponent::pref_
protected

Definition at line 202 of file modem_component.h.

◆ probe_backoff_

std::atomic<uint8_t> esphome::modem::ModemComponent::probe_backoff_ {0}
protected

Definition at line 242 of file modem_component.h.

◆ restored_baud_

int esphome::modem::ModemComponent::restored_baud_ {0}
protected

Definition at line 206 of file modem_component.h.

◆ resync_

bool esphome::modem::ModemComponent::resync_ {false}
protected

Definition at line 264 of file modem_component.h.

◆ RETRY_DELAY_MS

uint32_t esphome::modem::ModemComponent::RETRY_DELAY_MS = 1000
staticconstexprprotected

Definition at line 136 of file modem_component.h.

◆ rts_pin_

InternalGPIOPin* esphome::modem::ModemComponent::rts_pin_ {nullptr}
protected

Definition at line 189 of file modem_component.h.

◆ rx_buffer_size_

uint16_t esphome::modem::ModemComponent::rx_buffer_size_ {1024}
protected

Definition at line 228 of file modem_component.h.

◆ rx_pin_

InternalGPIOPin* esphome::modem::ModemComponent::rx_pin_
protected

Definition at line 188 of file modem_component.h.

◆ state_started_ms_

uint32_t esphome::modem::ModemComponent::state_started_ms_ {0}
protected

Definition at line 210 of file modem_component.h.

◆ step_delay_ms_

uint32_t esphome::modem::ModemComponent::step_delay_ms_ {0}
protected

Definition at line 209 of file modem_component.h.

◆ sync_acked_

std::atomic<uint8_t> esphome::modem::ModemComponent::sync_acked_ {0}
protected

Definition at line 244 of file modem_component.h.

◆ target_state_

std::atomic<ModemState> esphome::modem::ModemComponent::target_state_ {ModemState::MODEM_STATE_DISABLED}
protected

Definition at line 232 of file modem_component.h.

◆ task_

StaticTask esphome::modem::ModemComponent::task_
protected

Definition at line 207 of file modem_component.h.

◆ timeout_

uint32_t esphome::modem::ModemComponent::timeout_ {0}
protected

Definition at line 208 of file modem_component.h.

◆ tx_buffer_size_

uint16_t esphome::modem::ModemComponent::tx_buffer_size_ {1024}
protected

Definition at line 227 of file modem_component.h.

◆ tx_pin_

InternalGPIOPin* esphome::modem::ModemComponent::tx_pin_
protected

Definition at line 187 of file modem_component.h.

◆ uart_port_

uint8_t esphome::modem::ModemComponent::uart_port_ {UART_NUM_MAX}
protected

Definition at line 260 of file modem_component.h.

◆ urc_line_

const char* esphome::modem::ModemComponent::urc_line_ {nullptr}
protected

Definition at line 197 of file modem_component.h.

◆ URC_LINE_SIZE

size_t esphome::modem::ModemComponent::URC_LINE_SIZE = 128
staticconstexprprotected

Definition at line 137 of file modem_component.h.

◆ urc_pending_

std::atomic<uint8_t> esphome::modem::ModemComponent::urc_pending_ {0}
protected

Definition at line 251 of file modem_component.h.

◆ urc_reader_

LineReader<URC_LINE_SIZE> esphome::modem::ModemComponent::urc_reader_
protected

Definition at line 270 of file modem_component.h.

◆ urc_text_sensor_

text_sensor::TextSensor* esphome::modem::ModemComponent::urc_text_sensor_ {nullptr}
protected

Definition at line 196 of file modem_component.h.


The documentation for this class was generated from the following files: