You are reading a single comment by @dashxdr and its replies. Click here to read the full conversation.
  • Maybe you need to do your Serial2.setup() inside the onInit() function?

    The reset() function seems to not fully initialize the ESP32. But if you use ESP32.reboot() it seems to be very clean, just like a hardware poweron.

    If I do just
    reset(true);
    Serial3.setup(115200);
    save();
    ESP32.reboot();
    THEN try to use Serial3, it isn't really setup. But if I do:

    reset(true);
    function onInit() {Serial3.setup(115200);}
    save();
    ESP32.reboot();

    Then I can use Serial3, as in Serial3.write('foo!\r\n');

    BUT
    reset(); or reset(true); end up with those same
    E (13760) uart: uart_read_bytes(906): uart driver error
    messages in all cases. reset() on ESP32 isn't reliable, it seems.
    ESP32.reboot(); is reliable.

    SO:
    #1) Put your Serial2.setup() inside onInit()
    #2) Avoid reset() on ESP32 unless you want to do reset(true) to clear out the saved program.

    -Dave

About

Avatar for dashxdr @dashxdr started