Issue with CH340 Driver in Linux
I just got an “ESP8266 D1 mini Dev Broad” by a friend of mine, and tried to play around. If you are not familiar, it is an MCU by Espressif company, enhanced by extra features to make it a good dev board.
This dev board is really easy to use (as other Espressif products), specially because of Micro USB (or USB-C) port on it. So you can just connect it to your computer and flash the MCU. Attaching a USB port was possible as dev board has a CH340 USB-to-UART chip. The chip is responsible for converting USB to Serial communication.
Most Linux distributions (such as Ubuntu) already have the CH340 driver installed. You can check it like:
I connected the board to computer, selected correct board in Arduino IDE, but then noticed “Port” option is grayed out in the IDE (
Tools menu). This means device is not connected or not accessible. Quick check showed that there’s no USB device:
but at least
dmesg says USB was there but disconnected!
More investigations in
dmesg shows kind of conflict by brltty daemon. Easily you can remove it if you don’t use it:
and if we connect the board again, and check
dmesg, no disconnect has logged:
and USB device is there:
Now you can select
/dev/ttyUSB0 in Arduino IDE Port option and flash the MCU.