[Ovmsdev] Modem unable to power cycle successfully
Mark Webb-Johnson
mark at webb-johnson.net
Thu Apr 16 10:40:20 HKT 2020
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.
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.
Note that uart_flush is an alias for 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).
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.
https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/354 <https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/354>
Regards, Mark.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20200416/fe6c612e/attachment.html>
More information about the OvmsDev
mailing list