Linux & 32U4 tty serial port

I did get my Nano with CH34 working with linux arduinoIDE 1x. I installed drivers form git that I don't think I actually needed but more importantly I usermod'ed myself to the dialout group and that got evertything working for that.

But now I'm trying to use a leonardo 32u4 (also tried an esp32 C3 with similar results)

It does show up in lsusb
It does NOT show in ls /dev/tty*
getty@tty1.service does show up under systemctl status but I'm not sure if I need that or if it's interfering with my arduinos, see attached image

I have read this thread and followed the two links from this post.
ls tty was with the leonardo plugged into usb the first time and unplugged the second time

I'm not sure what to search for/do next and would very much appreciate some guidance. I'm afraid to try to remove the gitty tty becuase I don't know what it is or understand if it's important to other bits of my pc. Inxi below, too

~$ inxi -Fxxrzc0 System: Kernel: 6.8.0-90-generic x86_64 bits: 64 compiler: N/A Desktop: Cinnamon 5.4.12 tk: GTK 3.24.33 wm: Mutter dm: LightDM Distro: Linux Mint 21 Vanessa base: Ubuntu 22.04 jammy Machine: Type: Mini-pc Mobo: N/A model: N/A serial: <superuser required> UEFI: American Megatrends LLC. v: RMBPM7B0_01.16_01.16 date: 05/13/2025 Battery: Device-1: hid-dc:2c:26:eb:cf:0b-battery model: Velocifire TKL61WS Keyboard serial: N/A charge: N/A status: Discharging CPU: Info: 8-core model: AMD Ryzen 7 6800H with Radeon Graphics bits: 64 type: MT MCP arch: Zen 3 rev: 1 cache: L1: 512 KiB L2: 4 MiB L3: 16 MiB Speed (MHz): avg: 462 high: 1407 min/max: 400/4785 cores: 1: 400 2: 400 3: 400 4: 400 5: 400 6: 400 7: 400 8: 1407 9: 400 10: 400 11: 400 12: 400 13: 400 14: 400 15: 400 16: 400 bogomips: 102205 Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm Graphics: Device-1: AMD Rembrandt driver: amdgpu v: kernel pcie: speed: 16 GT/s lanes: 16 ports: active: HDMI-A-1 empty: DP-1, DP-2, DP-3, DP-4, DP-5, DP-6, Writeback-1 bus-ID: 76:00.0 chip-ID: 1002:1681 Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: amdgpu,ati unloaded: fbdev,modesetting,vesa gpu: amdgpu display-ID: :0 screens: 1 Screen-1: 0 s-res: 1920x1080 s-dpi: 96 Monitor-1: HDMI-A-0 mapped: HDMI-A-1 model: Sony TV 00 res: 1920x1080 dpi: 29 diag: 1905mm (75") OpenGL: renderer: AMD Radeon 680M (rembrandt LLVM 15.0.7 DRM 3.57 6.8.0-90-generic) v: 4.6 Mesa 23.2.1-1ubuntu3.1~22.04.3 direct render: Yes Audio: Device-1: AMD driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16 bus-ID: 76:00.1 chip-ID: 1002:1640 Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor driver: snd_pci_acp6x v: kernel pcie: speed: 16 GT/s lanes: 16 bus-ID: 76:00.5 chip-ID: 1022:15e2 Device-3: AMD Family 17h HD Audio vendor: Realtek driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16 bus-ID: 76:00.6 chip-ID: 1022:15e3 Device-4: Tronsmart Usb Audio device type: USB driver: hid-generic,snd-usb-audio,usbhid bus-ID: 3-1.3:4 chip-ID: 2319:00b2 Sound Server-1: ALSA v: k6.8.0-90-generic running: yes Sound Server-2: PulseAudio v: 15.99.1 running: yes Sound Server-3: PipeWire v: 0.3.48 running: yes Network: Device-1: Realtek RTL8125 2.5GbE driver: r8169 v: kernel pcie: speed: 5 GT/s lanes: 1 port: f000 bus-ID: 02:00.0 chip-ID: 10ec:8125 IF: eno1 state: up speed: 100 Mbps duplex: full mac: <filter> Device-2: Realtek driver: rtw89_8852be v: kernel pcie: speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 03:00.0 chip-ID: 10ec:b852 IF: wlp3s0 state: down mac: <filter> IF-ID-1: virbr0 state: down mac: <filter> Bluetooth: Device-1: Realtek Bluetooth Radio type: USB driver: btusb v: 0.8 bus-ID: 3-2:3 chip-ID: 0bda:b85b Report: hciconfig ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 3.0 lmp-v: 5.2 sub-v: 91cb Drives: Local Storage: total: 1.38 TiB used: 1.24 TiB (90.1%) ID-1: /dev/nvme0n1 vendor: Western Digital model: WD Blue SN570 1TB size: 931.51 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 48.9 C ID-2: /dev/nvme1n1 model: Firebat FEQC34C-512G size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 42.9 C Partition: ID-1: / size: 467.89 GiB used: 385.01 GiB (82.3%) fs: ext4 dev: /dev/nvme1n1p2 ID-2: /boot/efi size: 511 MiB used: 6.1 MiB (1.2%) fs: vfat dev: /dev/nvme1n1p1 Swap: ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) priority: -2 file: /swapfile Sensors: System Temperatures: cpu: 20.0 C mobo: N/A gpu: amdgpu temp: 49.0 C Fan Speeds (RPM): N/A Repos: Packages: 3104 apt: 3088 flatpak: 16 No active apt repos in: /etc/apt/sources.list Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 1: deb http://packages.linuxmint.com vanessa main upstream import backport 2: deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse 3: deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse 4: deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse 5: deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse Active apt repos in: /etc/apt/sources.list.d/spotify.list 1: deb https://repository.spotify.com stable non-free Active apt repos in: /etc/apt/sources.list.d/virtualbox.list 1: deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] http://download.virtualbox.org/virtualbox/debian jammy contrib Active apt repos in: /etc/apt/sources.list.d/zhangsongcui3371-fastfetch-jammy.list 1: deb [signed-by=/etc/apt/keyrings/zhangsongcui3371-fastfetch-jammy.gpg] https://ppa.launchpadcontent.net/zhangsongcui3371/fastfetch/ubuntu jammy main Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.sources 1: deb [arch=amd64 arm64] https://brave-browser-apt-release.s3.brave.com stable main Active apt repos in: /etc/apt/sources.list.d/winehq-focal.sources 1: deb [arch=amd64 i386] https://dl.winehq.org/wine-builds/ubuntu focal main Info: Processes: 385 Uptime: 1h 27m Memory: 54.7 GiB used: 2.99 GiB (5.5%) Init: systemd v: 249 runlevel: 5 Compilers: gcc: 11.4.0 alt: 11/12 Shell: Bash v: 5.1.16 running-in: gnome-terminal inxi: 3.3.13

Hi @interestingfellow. Were you able to use this board at some time in the past, or have you had the problem even with the new board right out of the box?

You might be able to get some insight into what it happening by using the dmesg command:

  1. Disconnect the USB cable of the Arduino board from your computer.
  2. Connect the Arduino board to your computer with a USB cable.
  3. Type the following command in the terminal window:
    sudo dmesg | tail --lines=60
    
  4. Press the Enter key
  5. If prompted for it, enter your Linux account password and press the Enter key.

You can post the output from the command if you would like to get analysis from the forum helpers.

re:the board, yes, my interestingfellow account got deleted for inactivity and I had to sign back up; though it is showing ‘interestingfellow” as my username instead of “interestingfellow2”. I dunno. It’s the same me in either case lol

Heck yeah, here’s the output. THANK YOU
[71413.396180] usb 1-3: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[71413.396195] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[71413.396202] usb 1-3: Product: USB JTAG/serial debug unit
[71413.396207] usb 1-3: Manufacturer: Espressif
[71413.396213] usb 1-3: SerialNumber: 80:F1:B2:50:27:C8
[71415.762716] usb 1-3: USB disconnect, device number 113
[71415.988388] usb 1-3: new full-speed USB device number 114 using xhci_hcd
[71416.141017] usb 1-3: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[71416.141031] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[71416.141038] usb 1-3: Product: USB JTAG/serial debug unit
[71416.141044] usb 1-3: Manufacturer: Espressif
[71416.141049] usb 1-3: SerialNumber: 80:F1:B2:50:27:C8
[71418.508378] usb 1-3: USB disconnect, device number 114
[71418.733427] usb 1-3: new full-speed USB device number 115 using xhci_hcd
[71418.887131] usb 1-3: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[71418.887146] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[71418.887153] usb 1-3: Product: USB JTAG/serial debug unit
[71418.887158] usb 1-3: Manufacturer: Espressif
[71418.887164] usb 1-3: SerialNumber: 80:F1:B2:50:27:C8
[71421.254564] usb 1-3: USB disconnect, device number 115
[71421.478721] usb 1-3: new full-speed USB device number 116 using xhci_hcd
[71421.632236] usb 1-3: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[71421.632250] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[71421.632257] usb 1-3: Product: USB JTAG/serial debug unit
[71421.632263] usb 1-3: Manufacturer: Espressif
[71421.632268] usb 1-3: SerialNumber: 80:F1:B2:50:27:C8
[71424.000021] usb 1-3: USB disconnect, device number 116
[71424.224488] usb 1-3: new full-speed USB device number 117 using xhci_hcd
[71424.377083] usb 1-3: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[71424.377097] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[71424.377104] usb 1-3: Product: USB JTAG/serial debug unit
[71424.377110] usb 1-3: Manufacturer: Espressif
[71424.377115] usb 1-3: SerialNumber: 80:F1:B2:50:27:C8
[71426.745911] usb 1-3: USB disconnect, device number 117
[71426.970546] usb 1-3: new full-speed USB device number 118 using xhci_hcd
[71427.123308] usb 1-3: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[71427.123314] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[71427.123316] usb 1-3: Product: USB JTAG/serial debug unit
[71427.123318] usb 1-3: Manufacturer: Espressif
[71427.123320] usb 1-3: SerialNumber: 80:F1:B2:50:27:C8
[71429.491911] usb 1-3: USB disconnect, device number 118
[71429.716586] usb 1-3: new full-speed USB device number 119 using xhci_hcd
[71429.870082] usb 1-3: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[71429.870097] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[71429.870103] usb 1-3: Product: USB JTAG/serial debug unit
[71429.870109] usb 1-3: Manufacturer: Espressif
[71429.870114] usb 1-3: SerialNumber: 80:F1:B2:50:27:C8
[71432.155857] usb 1-3: USB disconnect, device number 119
[71436.958689] usb 1-3: new full-speed USB device number 120 using xhci_hcd
[71437.111293] usb 1-3: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[71437.111307] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[71437.111314] usb 1-3: Product: USB JTAG/serial debug unit
[71437.111320] usb 1-3: Manufacturer: Espressif
[71437.111325] usb 1-3: SerialNumber: 80:F1:B2:50:27:C8
[71472.822573] usb 1-3: USB disconnect, device number 120
[71506.976473] usb 9-1: new full-speed USB device number 2 using xhci_hcd
[71507.139689] usb 9-1: New USB device found, idVendor=3343, idProduct=8036, bcdDevice= 1.00
[71507.139706] usb 9-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[71507.139713] usb 9-1: Product: DFRobot Leonardo
[71507.139719] usb 9-1: Manufacturer: DFRobot

If you saw the edit I just made, that was for an esp32 C3 that I’ll be trying to get working next. I assume that whatever the holdup is with this leonardo will help me figure out the C3, as well

Hi @interestingfellow.

The Arduino Forum user account is independent from the arduino.cc account (though authentication is provided exclusively via the arduino.cc account).

Even though arduino.cc accounts are completely deleted after two years of inactivity, the Arduino Forum account is preserved for five more years (this was done due to concerns raised by the Arduino community regarding the loss of attribution of posts that occurs when we do fully anonymize the forum account). For this reason, if you create a new arduino.cc account with the same authentication method as before, before the five years have passed, we are able to reconnect your existing forum account rather than having to create a brand new account.

So fortunately you are able to continue to use your original @interestingfellow forum account even though you had to make a new arduino.cc account.

The ESP32-C3 typically enumerates as /dev/ttyACM0 on Linux. If you want to use Serial in your sketch, you also have to change `Tools -> Use CDC on Boot:" to "Enabled".

This is the output I get:

[ 9706.658821] usb 1-13: new full-speed USB device number 13 using xhci_hcd
[ 9706.796926] usb 1-13: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[ 9706.796941] usb 1-13: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 9706.796946] usb 1-13: Product: USB JTAG/serial debug unit
[ 9706.796951] usb 1-13: Manufacturer: Espressif
[ 9706.796955] usb 1-13: SerialNumber: 28:37:2F:54:9D:C0
[ 9706.800512] cdc_acm 1-13:1.0: ttyACM0: USB ACM device

Its almost identical except for obviously the serial number and also the last line, whoch in your output says:

[71432.155857] usb 1-3: USB disconnect, device number 119

Have you tried a different USB-C cable on the C3?
(I expect your Leonardo is using a different USB cable anyway, but just focusing on the C3 for now.)

Also could you post the output of:

sudo systemctl status brltty
sudo systemctl status modemmanager

Both of those services can cause problems and might be installed by default.

Your username should also be added to the plugdev group:

 sudo usermod -a -G plugdev username

I didn’t mean to ignore @ptillisch question: I am swapping over to linux for all my pc’s because I can no longer get away with win7 (I can use windows in vm or wine for anything that I *need). I have used linux previously but not had to use arduino IDE with it. I’m learning many new things now.

For now I will use the leonardo board for troubleshooting, if that’s ok.

Output of brltty and modemmanger (I had previously turned off brltty and also removed modemmanger)

○ brltty.service
Loaded: masked (Reason: Unit brltty.service is masked.)
Active: inactive (dead)
Unit modemmanager.service could not be found.

I am doing exactly the same, that is, running Linux on both my laptop and tower PC with Windows in a virtual machine. I did use Wine for a while but it got a bit messy, so eventually I settled on keeping the two OSes separate by installing Windows in a virtual machine. After an initial bit of tweaking and setup and with the exception of a couple of USB cable problems, the Linux version has so far worked well for me, including with the two boards you are trying to use. Its just a case of figuring out what the problem is.

BTW, I just realised that you had already added your username to the plugdev group. I didn't at first spot that you had mentioned it in your opening post. Did you also add it to the dialoutgroup?

A couple of points of clarification please:

  • did these boards work previously on the same computer when running Windows?
  • do they work on another computer?
  • are you connecting your boards directly to the PC or through a USB hub of some sort?

What drivers did you install?
A modern linux should recognize the typical UART devices such as CP2102, 16u2, FTDI, CH9102 and CH340 without the need to install extra drivers. It should also recognize the native ESP32-C3 USB port.

Could you show the output of:

$ dmesg | grep -i "cdc_adm"

This just to show whether the kernel has CDC support enabled (it should by default).

Could you also show how your two devices (Leonardo and ESP32-C3) appear in `lsusb' please.

I found Wine was very useful for some smaller apps, but there isnt really anything I need or want to do in linux that doesn't have native support for it besides a autocad 2016 and streets and trips (which was last released in 2013). I also prefer tagscanner for processing my audio library tags. I also have a program for tuning my chevy's ecm but don't think there is a linux version since the software is on lockdown to the obds dongle. Anything I need windows for I need windows and not an emulator or compatablity layer. It's just easier to have a vm of what I need. I was using a samba share previously but that was super slow because my network was invovled. I recently added vertiofs and that is MUCH faster; like native hardware faster.

I had not added myself to plugdev previously, I had added myself to dialoutgroup.
But I am now added to both

I installed the drivers from GitHub - juliagoda/CH341SER: CH341SER driver with fixed bug
My ch34 shows up as ttyusb0 after doing all that and everything works fine with *that board
I have kernel 6.8.0-90 installed, and I'm pretty sure it has ch34 support included. I think my issue was brltty and not being added to the dialout gruop

I get no output from entering the command dmesg | grep -i "cdc_adm" even with sudo

output of lsusb
Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 010 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 003: ID 05e3:0626 Genesys Logic, Inc. USB3.1 Hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 0bda:b85b Realtek Semiconductor Corp. Bluetooth Radio
Bus 003 Device 005: ID 25a7:fa61 Areson Technology Corp Elecom Co., Ltd MR-K013 Multicard Reader
Bus 003 Device 004: ID 2319:00b2 Tronsmart Usb Audio device
Bus 003 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub
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 122: ID 3343:8036 DFRobot DFRobot Leonardo
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Thank you so much for your help, btw

Indeed, Linux kernels for the last 2 years at least, possibly more have supported CH34x in the Kernel so there is no need to install additional drivers.

The brltty service gets included by default with many Linux distros to help those dependent on a Braille reader to use their computer without worrying about having to have assistance to install it. This means they are able to work with Linux "out of the box". However, to make that work, the program polls the serial ports looking for a Braille reader device and this activity can, unfortunately, interfere with other serial devices.

The output in your previous post suggested that brltty had been masked and therefore disabled.

The dialout group grants permissions to access physical serial ports including those provided over USB such as /dev/USBx and /dev/ACMx. The plugdev group provides a different mechanism to grant access permissions to "pluggable" devices which also includes USB devices. This group works in conjunction with device rules that are stored in files that can usually be found in:

/etc/udev/rules.d

It is possible to grant permissions using either option. Adding the user to the dialout group is usually sufficient to provide access to most USB Serial devices. However, some devices may also require UDEV rules, so its useful for the user to exist in both groups. Arduino provides post_install.bat or post_install.sh files for some of their boards (e.g. R4 boards and UNO Q) to facilitate installation of such rules.

The reason I asked for the lsusb output is to determine whether the ESP32-C3 might be stuck in DFU mode. Still, I can see from your output that the DFRobot Leonardo is listed correctly.

My bad. That should have been "cdc_acm". My apologies for the typo. If both boards now present with serial ports when you plug them this request can be ignored. It does sound like the problem was not having appropriate permissions to access USB devices which was resolved by adding the username to the dialout and plugdev groups.

If its all now set up and working, then you should not have to go through these steps again, unless you happen to re-install or try a different "flavour" of Linux. You may occasionally just need to install UDEV rules for a new USB device.

The board still doesn’t offer a serial port and IDE certainly doesn’t give me the option. I get no output from terminal with dmesg | grep -i "cdc_adm", btw

I have some other things in life to tend to but will be right back to this later this week.
My renewed interest is for building a gaming mouse with a joystick as well as argb control for a new pc I just put together. After that I’ll be using some 8266's for capcitive fluid measurement and a handful of other projects on my list :rofl: