<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">I’ve seen cases where the modem will not come up correctly, even following a power cycle. But, a reset of the OVMS module (ESP32) solves the problem. This really makes no sense, unless something is getting corrupted inside the UART / EGPIO driver itself. The modem module status is not changed during an ESP32 reset - only the software side of it running in the ESP32.</div><div class=""><br class=""></div><div class="">Thomas Heder has reported some success with using uart_flush to flush the UART ring buffer when power cycling the modem. Flushing the buffer would not seem to affect this, as we use ‘AT’ to look for an OK response during power up check anyway; but perhaps something is corrupt in the ring buffer itself, so using uart_flush clears that problem.</div><div class=""><br class=""></div>Note that <span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">uart_flush is an alias for </span><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">uart_flush_input, and the source code does seem to show a complete reset of the ring buffer pointers with interrupts disabled (not just a simple emptying).</span></font><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class=""><br class=""></span></font>Anyway, the approach does not seem to do any harm, so I have added it to the latest code and let’s see if it improves the situation.<div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><a href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/354" class="">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/354</a></div></blockquote><div class=""><div class=""><br class=""></div><div class="">Regards, Mark.</div><div class=""><br class=""></div></div></div></body></html>