brlttty claiming CH341 usbtty device blocking access

Bug #1990189 reported by beattie
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
brltty (Ubuntu)
Fix Released
High
Unassigned
Jammy
Triaged
High
Unassigned

Bug Description

While this problem seems to have been fixed for FTDI and CP210 based devices CH340/CH341 based (and possibly other USB serial adapters) are unusable except by brltty.

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

[139099.253351] usb 1-2.1.2: new full-speed USB device number 17 using xhci_hcd
[139099.370766] usb 1-2.1.2: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.63
[139099.370777] usb 1-2.1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[139099.370782] usb 1-2.1.2: Product: USB2.0-Serial
[139099.414885] ch341 1-2.1.2:1.0: ch341-uart converter detected
[139099.429265] usb 1-2.1.2: ch341-uart converter now attached to ttyUSB0
[139100.045076] input: BRLTTY 6.4 Linux Screen Driver Keyboard as /devices/virtual/input/input24
[139100.782817] usb 1-2.1.2: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1
[139100.786100] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[139100.786136] ch341 1-2.1.2:1.0: device disconnected
[143917.740171] usb 1-2.1.2: USB disconnect, device number 17

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"

ProblemType: BugDistroRelease: Ubuntu 22.04
Package: brltty 6.4-4ubuntu3
ProcVersionSignature: Ubuntu 5.15.0-47.51-generic 5.15.46
Uname: Linux 5.15.0-47-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: MATE
Date: Mon Sep 19 12:01:21 2022
InstallationDate: Installed on 2022-08-23 (27 days ago)
InstallationMedia: Ubuntu-MATE 22.04.1 LTS "Jammy Jellyfish" - Release amd64 (20220809.1)
ProcEnviron:
 LANGUAGE=en_US
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bashSourcePackage: brltty
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
beattie (beattie) wrote :
Revision history for this message
Samuel thibault (samuel-thibault) wrote : Re: [Bug 1990189] [NEW] brlttty claiming CH341 usbtty device blocking access

Hello,

beattie, le lun. 19 sept. 2022 19:07:54 -0000, a ecrit:
> [139099.370766] usb 1-2.1.2: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.63

Could you run

lsusb -v

so we get more information on how the generic bridge announces itself?

Samuel

Revision history for this message
beattie (beattie) wrote :
Revision history for this message
Samuel thibault (samuel-thibault) wrote :

Ok. That'd be tricky to filter. Fortunately with brltty 6.5 such generic entries are kept apart so that they can be packaged separately.

Revision history for this message
beattie (beattie) wrote :

is there a work around?

Revision history for this message
Samuel thibault (samuel-thibault) wrote :

The simple workaround is to remove the package, or remove the entry from the udev file.

Revision history for this message
beattie (beattie) wrote :

can't find anything in the udev, removing brltty breaks some dependencies. Braille is good an all but I think somebody did not do their testing.

Revision history for this message
Samuel thibault (samuel-thibault) wrote : Re: [Bug 1990189] Re: brlttty claiming CH341 usbtty device blocking access

Hello,

beattie, le mar. 20 sept. 2022 15:21:36 -0000, a ecrit:
> can't find anything in the udev,

That's be in ./lib/udev/rules.d/85-brltty.rules, this line:

ENV{PRODUCT}=="1a86/7523/*", ENV{BRLTTY_BRAILLE_DRIVER}="bm", GOTO="brltty_usb_run"

> I think somebody did not do their testing.

Not many people have a CH340/CH341-based adapter to notice the issue.

Samuel

Revision history for this message
beattie (beattie) wrote :

no such file as *brltty.rules" in my udev. What I did that seems to work is:

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

Not sure if this is best or even a good idea but at least it stops brltty from stealing my serial port. Since I don't use brltty it does not hurt me that brltty can't coexist with my CH340 serial port.

Simon Chopin (schopin)
Changed in brltty (Ubuntu):
importance: Undecided → Low
description: updated
Revision history for this message
storepeter (kzqdnsw4i20a5pz947ygrr-peter) wrote :

Glad I found this bug report.

The USB-id 1a86/7523 is used by CH340 based USB-serial ports,
which is what is used on Chinese Arduino and many rs485 USB adapters,
and a lot of other stuff, certainly much more general use than just brltty

I would argue that there are plenty more people using one of the above devices,
but I guess their reaction - like mine has been just to stay on ubuntu-20.04
until the issue is resolved

I recomend removing the entry from /lib/udev/rules.d/85-brltty.rules

Now I found this bug report this is what I did, and should be good until
the system decides to update that file and put it back again.

StorePeter

Revision history for this message
Paul Gevers (paul-climbing) wrote :

Hi,

On 28-10-2022 16:43, storepeter wrote:
> I recomend removing the entry from /lib/udev/rules.d/85-brltty.rules
>
> Now I found this bug report this is what I did, and should be good until
> the system decides to update that file and put it back again.

I *think* that if you copy your modified file to /etc/udev/rules.d
instead, it's saved over system updates.

Paul

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
JP Meijers (jpm) wrote :

This bug affects me while trying to program an ESP32 device from Arduino. Uninstalling brltty solves it.

Revision history for this message
Julian Andres Klode (juliank) wrote :

This has been fixed in mantic, and the following needs to be cherry-picked to 22.04:

 # Device: 1A86:7523
+# Generic Identifier
+# Vendor: Jiangsu QinHeng, Ltd.
+# Product: CH341 USB Bridge Controller
 # Baum [NLS eReader Zoomax (20 cells)]
-ENV{PRODUCT}=="1a86/7523/*", ENV{BRLTTY_BRAILLE_DRIVER}="bm", GOTO="brltty_usb_run"
+ENV{PRODUCT}=="1a86/7523/*", ATTRS{idVendor}=="1a40", ATTRS{idProduct}=="0101", ENV{BRLTTY_BRAILLE_DRIVER}="bm", GOTO="brltty_usb_run"

This bug is similar to bug 1958224.

Changed in brltty (Ubuntu):
status: Confirmed → Fix Released
tags: added: rls-jj-incoming
Changed in brltty (Ubuntu):
importance: Low → High
Changed in brltty (Ubuntu Jammy):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Julian Andres Klode (juliank) wrote :

Triaging this as high matching bug 1958224.

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.