brltty package disconnecting ttyUSB0 used for Arduino

Bug #1970408 reported by Batwam
30
This bug affects 7 people
Affects Status Importance Assigned to Milestone
brltty (Ubuntu)
Confirmed
High
Unassigned

Bug Description

Hello

I connected an ESP8266 microcontroller to my pc to use with Arduino. However, the interface didn't appears to list ttyUSB0. Upon inspection with dmesg, I noticed that the device is recognised but then brltty appears to disconnect it.

[Tue Apr 26 19:09:35 2022] usb 1-8: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[Tue Apr 26 19:09:35 2022] usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Tue Apr 26 19:09:35 2022] usb 1-8: Product: CP2102 USB to UART Bridge Controller
[Tue Apr 26 19:09:35 2022] usb 1-8: Manufacturer: Silicon Labs
[Tue Apr 26 19:09:35 2022] usb 1-8: SerialNumber: 0001
[Tue Apr 26 19:09:35 2022] cp210x 1-8:1.0: cp210x converter detected
[Tue Apr 26 19:09:35 2022] usb 1-8: cp210x converter now attached to ttyUSB0
[Tue Apr 26 19:09:38 2022] usb 1-8: usbfs: interface 0 claimed by cp210x while 'brltty' sets config #1
[Tue Apr 26 19:09:38 2022] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[Tue Apr 26 19:09:38 2022] cp210x 1-8:1.0: device disconnected

This also appears to have happended to other people: https://stackoverflow.com/questions/52143723/usb-serial-loses-connection-immediately-in-new-linux-kernel-4-12-14

Once the brltty package is removed, the USB device mounts fine and Arduino find it (same dmesg as above, without the last 3 lines).

I'm actually not sure why this package is installed as I deleted it without having to remove ubuntu-desktop.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: brltty (not installed)
ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
Uname: Linux 5.15.0-27-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue Apr 26 19:15:04 2022
InstallationDate: Installed on 2022-04-06 (20 days ago)
InstallationMedia: Ubuntu 21.10 "Impish Indri" - Release amd64 (20211012)
SourcePackage: brltty
UpgradeStatus: Upgraded to jammy on 2022-04-18 (8 days ago)

Revision history for this message
Batwam (batwam) wrote :
Revision history for this message
ionoz (ionoze) wrote :

Hi! I have same you problem. but now I can use ttyUSB0 in arduino normaly.

slove:

1. run cmd. lsusb

(cmd)$ sudo lsusb

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 8087:0a2a Intel Corp. Bluetooth wireless interface
Bus 001 Device 003: ID 15ca:00c3 Textech International Ltd. Mini Optical Mouse
Bus 001 Device 002: ID 05c8:0379 Cheng Uei Precision Industry Co., Ltd (Foxlink) HP Truevision HD
Bus 001 Device 009: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
Bus 001 Device 001: ID 1d6b:1234 Linux Foundation 2.0 root hub

2. looking for ID (in my case I focus in "Linux Foundation 2.0 root hub" it ID 1d6b:1234
3. edit file /etc/brltty.conf
4. in line 109 of brltty.conf unremak and put ID in usb:xxxxx:xxxxx ex.
   braille-device usb:1d6b:1234 # Specific USB device by serial number.
5. save file and then restart

Revision history for this message
Batwam (batwam) wrote :

that's a nice workaround. I still think that there is something odd going on with the brltty package though as it shouldn't be disconnecting connections like this.

Revision history for this message
Sebastien Bacher (seb128) wrote :

it's a somewhat similar issue to bug #1958224

Changed in brltty (Ubuntu):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in brltty (Ubuntu):
status: New → Confirmed
Revision history for this message
Agustin (agustin-n) wrote :

Hello, i think i'm being affected from the same error, but with a NodeMCU.
[ 1287.830176] usb 3-2: USB disconnect, device number 9 (Here I disconnected it)
[ 1292.437055] usb 3-2: new full-speed USB device number 10 using xhci_hcd (Here I re-connected it)
[ 1292.616279] usb 3-2: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[ 1292.616292] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1292.616297] usb 3-2: Product: CP2102 USB to UART Bridge Controller
[ 1292.616300] usb 3-2: Manufacturer: Silicon Labs
[ 1292.616304] usb 3-2: SerialNumber: 0001
[ 1292.626366] cp210x 3-2:1.0: cp210x converter detected
[ 1292.628104] usb 3-2: cp210x converter now attached to ttyUSB0
[ 1298.283422] usb 3-2: usbfs: interface 0 claimed by cp210x while 'brltty' sets config #1 (ERROR)
[ 1298.284461] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[ 1298.284524] cp210x 3-2:1.0: device disconnected

Revision history for this message
Batwam (batwam) wrote :

Yes, that’s the one. Does it work when you remove the brltty package? Do you remember installing it?

Revision history for this message
David Spoelstra (davids-mediamachine) wrote :

BTW, this is a big deal. I've already had over a dozen microcontroller students with this problem that upgraded to Ubuntu 22.04 LTS and could no longer program their Arduinos.

It also affects any amateur radio operators using FTDI USB to Serial adapters and I've had several of them call me when their adapters no longer worked after upgrading to Ubuntu 22.04 LTS.

I filed a bug on brltty and the FTDI chips:
Bug #1972030

Revision history for this message
Batwam (batwam) wrote :

Absolutely. If we are unable/unwilling to patch up or remove the offending package, would it be possible to at least mark the Arduino package “incompatible” with brltty (and vice versa)?

Revision history for this message
Chris Keller (xylo04) wrote :

This is currently preventing me from using a Digirig Mobile amatuer radio interface device, which uses the 10c4:ea60 Silicon Labs CP210x UART Bridge. Pop_OS depends on brltty so I can't remove the package. However, I was able to follow comment #2:

Edit /etc/brltty.conf, and add line:

```
braille-device usb:0000:0000
```

This points brltty as a particular nonexistent device and prevents it from trying to take over the USB serial device.

Revision history for this message
Henrik Östman (trycoon) wrote :

I develop using ESP32-devices on Plattform.io, once I upgradeed to Ubuntu 22.04 serialport communication over USB stopped working. The problem was as reported, and I can confirm that the forcing of brltty to a non-existing device does work for me.
```
braille-device usb:0000:0000
```

I hope there will be a official patch available.

Revision history for this message
Batwam (batwam) wrote :

There is one now in the main bug report: https://bugs.launchpad.net/ubuntu/+source/brltty/+bug/1958224

Revision history for this message
Walter (wdoekes) wrote :

Confirmed. Removing brltty fixes things.

I did not install that. It apparently came with the upgrade from Focal to Jammy.

Thanks for filing this bug report.
Walter

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.