Closes https://github.com/espressif/esp-idf/issues/3890 Closes https://github.com/espressif/esp-idf/issues/4138