Sometimes, you might encounter difficulties when trying to establish a connection between your development board and your PC. Typically, these issues can be attributed to one of two common reasons:
Incompatible Cable: It's important to note that not all Micro USB cables are designed for data transfer. Many are intended solely for charging purposes. You can identify these cables by their construction, which includes only two wires for power transfer. A proper Micro USB cable that supports data transfer contains four wires - two for power and two for data. To check if your cable is suitable for data transfer, simply connect it between your development board and PC. Then, access the device manager. If you don't see any new devices or encounter unknown device errors, chances are your cable is designed for charging only.
USB to Serial Driver Issues: The CH340 chip is responsible for converting USB data to a serial UART format and vice versa. It's commonly used in Arduino-compatible boards to enable USB connectivity. In most cases, the necessary driver for the CH340 chip should install automatically when you connect it to your computer's USB port or when your operating system receives updates.
However, depending on your operating system, you may need to manually install the appropriate driver. We've encountered situations where both CP2102 and CH340G devices failed to function as expected. Some of our ESP32 boards utilize the latest CH340K IC, which the old driver cannot recognize. In such cases, updating to the latest driver is necessary. The solution is straightforward - uninstall the outdated driver and install the most recent version.
Driver Download
You can obtain the latest drivers for the CH340 chip from the manufacturer, WCH. You'll find the most up-to-date versions of these drivers on their website.
Download Link
Driver Verification:
Windows: To verify that your driver is functioning correctly, open the "Device Manager." You can do this by clicking the Start button and typing "Device Manager" for a quick search. Once the Device Manager is open, expand the "Ports (COM & LPT)" section. The CH340 should be listed as "USB-SERIAL CH340 (COM##)," where ## represents the COM port number you will use in the Arduino IDE.
Mac: On a Mac, you can open the Terminal by navigating to Applications > Utilities > Terminal. Once the Terminal is open, enter the command "ls /dev/cu*". The CH340 should appear as "/dev/cu.wchusbserial*****." Please note that depending on your computer, the COM port may be represented by a different number.