How to use ESP32 WROVER B with Ubuntu?

I want to use ESP32 WROVER B, and as I read here I need CP210x USB driver to use with Arduino IDE. But when I want to use it, I got this error:

usb_driver/cp210x.c:290:18: error: initialization of ‘void (*)(struct usb_serial_port *)’ from incompatible pointer type ‘int (*)(struct usb_serial_port *)’ [-Werror=incompatible-pointer-types] 290 | .port_remove = cp210x_port_remove, | ^~~~~~~~~~~~~~~~~~

Than I noticed that it is already installed on ubuntu 17+ versions, and I can see it:

user@user:ls -al /lib/modules/"$(uname -r)"/kernel/drivers/usb/serial/cp210x.ko
-rw-r--r-- 1 root root 63361 ian 14 00:11 /lib/modules/5.13.0-27-generic/kernel/drivers/usb/serial/cp210x.ko

Then I used sudo modprobe cp210x, restarted, but nothing has changed, in Arduino IDE the Tools > Port submenu is unavailable.

What can I do? How can I connect my Ubuntu to ESP32?

EDIT: With lsusb -t I got:

/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/9p, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M

And I am on

Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
2

3 Answers

You have to check cable, this driver is built-in to the kernel package.

Then you can install esptool from the repository as follows:

sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install esptool

To use it as normal user you have to execute below command to add your user to dialout group:

sudo usermod -a -G dialout $USER

then logout and login back.

1

I had a similar issue, I could no longer connect to my ESP8266 boards after upgrading to Ubuntu 22.04 - I tried many fixes and this worked.

systemctl stop brltty-udev.service
sudo systemctl mask brltty-udev.service
systemctl stop brltty.service
systemctl disable brltty.service

Thank you for that!!

I solved by disable brltty service

Using the follow command

systemctl stop brltty-udev.service
sudo systemctl mask brltty-udev.service
systemctl stop brltty.service
systemctl disable brltty.service

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like