Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions libraries/PPP/src/PPP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@ bool PPPClass::begin(ppp_modem_model_t model, uint8_t uart_num, int baud_rate) {
}

esp_modem_set_error_cb(_dce, _ppp_error_cb);

// Send burst of AT to lock auto baurate on modem
for (int i = 0; i < 50; i++) {
esp_modem_at(_dce, "AT", NULL, 10);
}
Comment on lines +303 to +306
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this should be only enabled if an argument of the constructor is set. @me-no-dev What do you think ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucasssvaz Just to add a data point: sending a short burst of "AT" commands is safe and has no side effects on modems that do not rely on autobaud.
In practice, this acts as a no-op for fixed-baud devices while greatly improving initialization reliability for autobaud-based modems, so I don’t think it needs to be gated behind an additional constructor option.


/* Wait for Modem to respond */
if (_pin_rst >= 0) {
Expand Down
Loading