Ubuntu 20.04 - can't upload Arduino's sketch
this happens to the latest ubuntu with the latest kernel and several versions of arduino-ide ( from snap, from apt install, even with the latest version installed from arduino's website ) tried several board version's tried modded esptool tried not-modded esptool tried several (not charge only) cables tries several esp32 boards and esp32 vendors ( wemos, nodemcu, etc. )
I believe that there might be a problem with the serial driver? All boards are working great on windows with all versions of arduino-ide tested on Ubuntu 20.04, and same cables. I ruled out any possible problem in regards to : software (ide), cables, boards.
will dig more into this.
LE: Found the issue! Looks like there is a bug in the kernel driver for ch340/ch341 I had one old kernel installed ( 5.9.x ) and with this one works. That took me to some search over the internet :) so here it is
Bug ID: 214131 Summary: ch341 communication problem Product: Drivers Version: 2.5
Kernel Version: 5.14-rc5 Hardware: All OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: USB
It looks to me that starting kernel 5.10.x till 5.14-rc5 the bug is present.
Happy coding guys
Workaround for ESP boards:
Settings prior to uploading the sketch:
- Boardtype: Generic ESP8266
- Flash size: 4MB
- Reset method: "dtr (aka nodemcu)" (default)
Then:
- Change reset method to: "no dtr (aka ck)" (Tools -> Reset Method)
- Then press Flash button
- Press Reset shortly
- Then release Flash
- Upload sketch in the Arduino IDE
Source: https://forum.manjaro.org/t/manjaro-21-1-0-und-esp8266-sketch-upload-doesnt-work-anymore/79712/2
Note: Tested on ESP8266 (NodeMCU)
Update:
This issue has been fixed in the latest kernel version. Please update the kernel and test again.