I’m stuck at section 1.6 of the “Learn LVGL: Build GUIs for ESP32 Projects_V1_1.”
I’m running the Arduino IDE at version 2.3.2, and the Boards manager at 3.0.4 on Ubuntu Linux (22.04). I have openJDK installed as the Java app.
My CYD is the recommended ESP322432S028 resistive touchscreen (no “R” shown after the model number on the PCB, though).
From “Select other board and port,” I selected the ESP32 Dev Module, but no ports show up to select from.
I checked that the CH34x driver is loaded. `lsusb` shows a “QinHeng Electronics CH340 serial converter”. and `lsmod` shows that “usbserial” is used by “ch341”. The “ch341.ko” and “ti_usb_3410_5052.ko” modules are present in the /…/kernel/drivers/usb/serial/ directory.
With the CYD attached by USB cable, the available ttys are the normal tty0:63, ttyS0:63, console, ptmx, ttyprintk, and some vcs* ports. Normally, a ttyUSB or ttyACM0 show up when an ESP32 is attached. The display is powered via the USB cable and the touchscreen works with the CYD’s default examples.
In the Arduino IDE Tools menu, “Port: /dev/ttyACM0” is greyed out.
Attempting to upload the WiFiScan code, of course, throws an error:
“A fatal error occurred: Could not open /dev/ttyACM0, the port doesn’t exist
Failed uploading: uploading error: exit status 2″
Help will be greatly appreciated.
If you have the drivers installed and you don’t see the COM port, I think you might have an issue with your USB cable (some USB cables are charge only and don’t have data wires).
- Can you try another USB cable?
- Can you also try to use another USB port?
- Does that cable work with other ESP32 boards?
I tried rebooting the Arduino IDE, with a known good cable installed. No go. Tried other ports, too. Still no joy.
Searching, I found a couple other Linux users have had a problem with a braille TTY driver (brltty) conflicting with the cr341 driver. Sure enough, plugging and unplugging the USB cable to the CYD, gave me this, using dmesg
at the command line.
[258825.268580] usb 1-4: new full-speed USB device number 40 using xhci_hcd
[258825.430519] usb 1-4: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
[258825.430531] usb 1-4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[258825.430535] usb 1-4: Product: USB Serial
[258825.445623] ch341 1-4:1.0: ch341-uart converter detected
[258825.459993] usb 1-4: ch341-uart converter now attached to ttyUSB0
[258826.599665] input: BRLTTY 6.4 Linux Screen Driver Keyboard as /devices/virtual/input/input40
[258826.740629] usb 1-4: usbfs: interface 0 claimed by ch341 while ‘brltty’ sets config #1
[258826.743967] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[258826.744007] ch341 1-4:1.0: device disconnected
This seems to be a Linux driver issue (brltty vs. ch341-uart).
I’ll have to look to find a way to somehow remove or unbind the braille driver.
FWIW: For Linux users seeing this problem, the solution is–at the terminal command line, type the command:
sudo apt-get remove brltty