I realise that this may be in the wrong area of the forum, if it is then I’d appreciate either someone moving it on my behalf, or telling me how to move it to the right place (hopefully telling me what that place might be).
Now, the problem I’m having; which has pretty much been copied across from the (so-far unanswered) question I posted over on AskUbuntu [1]: “How to connect to ESP32-wroom-32” [2].
I’m starting – or trying to start – working with an ESP32-WROOM-32 [3] board (that link goes to the manufacturer’s site), using Ubuntu 23.10, ultimately in order to install WLED [4].
So far, I’ve connected the ESP32 boards via USB to the computer, the cable is a data cable; or it seems to be, as the same cable allows my phones (a Pixel 8 and a Pixel 6A) to function as webcams for the computer.
Using lsusb
gives:
Bus 004 Device 003: ID 2109:0812 VIA Labs, Inc. VL812 Hub
Bus 004 Device 002: ID 2109:0812 VIA Labs, Inc. VL812 Hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 006: ID 8087:0025 Intel Corp. Wireless-AC 9260 Bluetooth Adapter
Bus 003 Device 004: ID 1462:7b85 Micro Star International PRO CARBON
Bus 003 Device 007: ID 328f:006d EMEET HD Webcam eMeet C960
Bus 003 Device 005: ID 2109:2812 VIA Labs, Inc. VL812 Hub
Bus 003 Device 003: ID 2109:2812 VIA Labs, Inc. VL812 Hub
Bus 003 Device 002: ID 041e:3273 Creative Technology, Ltd Stage V2
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 1b1c:1b3c Corsair Corsair Gaming HARPOON RGB Mouse
Bus 001 Device 002: ID 046d:c336 Logitech, Inc. G213 Prodigy Gaming Keyboard
Bus 001 Device 010: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
And ls /dev/tty*
gives:
/dev/tty /dev/tty23 /dev/tty39 /dev/tty54 /dev/ttyS10 /dev/ttyS26
/dev/tty0 /dev/tty24 /dev/tty4 /dev/tty55 /dev/ttyS11 /dev/ttyS27
/dev/tty1 /dev/tty25 /dev/tty40 /dev/tty56 /dev/ttyS12 /dev/ttyS28
/dev/tty10 /dev/tty26 /dev/tty41 /dev/tty57 /dev/ttyS13 /dev/ttyS29
/dev/tty11 /dev/tty27 /dev/tty42 /dev/tty58 /dev/ttyS14 /dev/ttyS3
/dev/tty12 /dev/tty28 /dev/tty43 /dev/tty59 /dev/ttyS15 /dev/ttyS30
/dev/tty13 /dev/tty29 /dev/tty44 /dev/tty6 /dev/ttyS16 /dev/ttyS31
/dev/tty14 /dev/tty3 /dev/tty45 /dev/tty60 /dev/ttyS17 /dev/ttyS4
/dev/tty15 /dev/tty30 /dev/tty46 /dev/tty61 /dev/ttyS18 /dev/ttyS5
/dev/tty16 /dev/tty31 /dev/tty47 /dev/tty62 /dev/ttyS19 /dev/ttyS6
/dev/tty17 /dev/tty32 /dev/tty48 /dev/tty63 /dev/ttyS2 /dev/ttyS7
/dev/tty18 /dev/tty33 /dev/tty49 /dev/tty7 /dev/ttyS20 /dev/ttyS8
/dev/tty19 /dev/tty34 /dev/tty5 /dev/tty8 /dev/ttyS21 /dev/ttyS9
/dev/tty2 /dev/tty35 /dev/tty50 /dev/tty9 /dev/ttyS22
/dev/tty20 /dev/tty36 /dev/tty51 /dev/ttyprintk /dev/ttyS23
/dev/tty21 /dev/tty37 /dev/tty52 /dev/ttyS0 /dev/ttyS24
/dev/tty22 /dev/tty38 /dev/tty53 /dev/ttyS1 /dev/ttyS25
Now, the /dev/tty*
output doesn’t change regardless of the ESP32 board being plugged in, or not, whereas unplugging the board results in the Bus 001 Device 010: ID 1a86:7523 QinHeng Electronics CH340 serial converter
entry being removed from lsusb
, so I assume that that’s the entry relating to the board?
Searching online brings up a couple of articles:
- “USB-to-UART Bridge on Development Board” [5], which suggests I may need a USB-to-UART cable, and
- “Standard Toolchain Setup for Linux and macOS” [6].
I’ve followed the guide outlined in the second article listed above, and…nothing seems to have changed/improved. To be sure I’ve logged-out and logged-in to the system without a power-cycle, and then I’ve power-cycled the system off and back on (it’s a cliche for a reason, right?.
After seeing a comment from user steeldriver [7] left on the original question:
this may be the result of a ID conflict with the brltty device driver - see for example “Unable to use USB dongle based on USB-serial converter chip” [8]
I followed the link given, and followed the advice offered by Fehlrersturm in their answer [9], and commented out the ENV{PRODUCT}...
line (as below).
# Device: 1A86:7523
# Baum [NLS eReader Zoomax (20 cells)]
# ENV{PRODUCT}=="1a86/7523/*", ENV{BRLTTY_BRAILLE_DRIVER}="bm", GOTO="brltty_usb_run"
This led to an additional entry – /dev/ttyUSB0 – when I ran ls /dev/tty*
.
This is where I’m stuck again, the guide “Establish Serial Connection to ESP32 - Windows and Linux” [10] says to use PuTTY, which I tried using the settings shown on Espressif’s site:
Serial line to connect to: /dev/ttyUSB0
Speed (baud): 115200
Data bits: 8
Stop bits: 1
Parity: none
Flow controls: XON/XOFF
When I hit the “Open” button, nothing happens. The button returns to its normal state, there are no new windows opened, so far as I can tell there is no result at all.
Following another comment from steeldriver [11] :
make sure to add your user to the dialout group …
This was done, via the sudo usermod -a -G dialout $USER
command and to be sure the group was updated/refreshed, I logged out and then back in, and later (again) power-cycled the system.
To be sure that I was added to the dialout
group, I used getent group | grep dialout
, which gave the result:
dialout:x:20:david
I then followed a few other paths, which included the advice to run sudo dmesg | grep ttyUSB0
(the advice didn’t specifically suggest using sudo
, but without sudo
I get an error message stating that “Operation not permitted”), which gave the response:
[ 308.540203] usb 1-3: ch341-uart converter now attached to ttyUSB0
I don’t know if this is useful, though it feels like it should be?
So, my question is pretty much: what am I missing? How do I connect to this board?
Obviously – despite using Ubuntu for more than ten years at this point – I’m not particularly familiar with inner-workings, so an ELI5 [12] (or lower) explanation would be very much appreciated, if that’s at all possible.
If there’s any clarification I could add to this wall of question, please let me know and I’ll do everything I can to assist. My thanks in advance for even reading all this, and even moreso if anyone’s able to help.
NB. I have a list of references to match the numbered entries, but I’m (currently?) unable to add links to this post. If there’s any way of working around that (since without the links the references mean nothing) let me know? Many thanks (again!)