Quick Fix: BRLTTY Causing USB COM Port Disconnection

If you’re experiencing issues where your USB COM port gets immediately disconnected after plugging in a device on a Linux system, the culprit is often BRLTTY. This service is designed for Braille display support but can interfere with USB-to-serial adapters, causing them to be disconnected almost instantly. Fortunately, this issue is easy to fix. In this guide, we will explain what BRLTTY is, why it affects USB COM ports, and how to disable it to restore normal functionality.

When we connected our USB to Serial converter to Ubuntu 22.04, it got detected as ttyUSB0 but got disconnected immediately. Despite we tried many times, even after replacing cable, rebooted few times, the problem persisted and we were not able to access the USB to Serial Converter to access device terminal.

In kernel dmesg, you may see it as,

[ 2009.094892] usb 1-3: new full-speed USB device number 8 using xhci_hcd

[ 2009.258550] usb 1-3: FTDI USB Serial Device converter now attached to ttyUSB0

[ 2013.175191] usb 1-3: usbfs: interface 0 claimed by ftdi_sio while 'brltty' sets config #1
[ 2013.176678] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[ 2013.176745] ftdi_sio 1-3:1.0: device disconnected

When looked further, the actual error caused seems to be because of below line,

[ 2013.175191] usb 1-3: usbfs: interface 0 claimed by ftdi_sio while 'brltty' sets config #1

What is BRLTTY?

BRLTTY is a background service used in Linux distributions to provide screen reading support for visually impaired users by enabling Braille displays. It automatically attempts to take control of certain USB-to-serial devices, which leads to the USB COM port disconnection issue experienced by many users. This is a common problem when working with USB-to-RS232 adapters, embedded development boards, and serial communication devices.

How BRLTTY Causes USB COM Port Disconnections

When a USB-to-serial adapter is plugged in, BRLTTY mistakenly identifies the device as a Braille terminal and claims access to the port, preventing other applications from using it. This results in immediate disconnection or failure to recognize the serial device. You may notice that even though the device appears in /dev/ttyUSB0 or /dev/ttyS0, it is unresponsive or disappears within seconds.

How to Fix the BRLTTY USB COM Port Disconnection Issue

1. Check if BRLTTY is Running

To determine whether BRLTTY is causing the problem, run:

lsusb

Check if your USB-to-serial adapter is detected. Then, run:

systemctl status brltty

If the service is active, it means BRLTTY is interfering with your serial connection.

2. Temporarily Stop BRLTTY

If you want to quickly test whether BRLTTY is the issue, stop the service temporarily:

sudo systemctl stop brltty

Then, unplug and replug your USB-to-serial adapter, and check if it remains connected.

3. Permanently Disable BRLTTY

If you do not require Braille support, it is best to disable BRLTTY permanently.

  1. Stop the service and disable it from starting at boot:
sudo systemctl disable --now brltty
  1. Remove BRLTTY from your system:

For Debian/Ubuntu:

sudo apt remove brltty

For Fedora/RHEL:

sudo dnf remove brltty

For Arch Linux:

sudo pacman -R brltty

After removing BRLTTY, restart your system and plug in your USB-to-serial adapter. Your device should now work correctly without disconnection issues.

4. Prevent BRLTTY from Taking Over USB COM Ports

If you cannot remove BRLTTY but need to use your USB-to-serial adapter, you can blacklist its access to USB serial devices.

  1. Open the udev rules file:
sudo nano /etc/udev/rules.d/99-brltty.rules
  1. Add the following line:
ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", ENV{BRLTTY}="0"

(Replace 067b and 2303 with your adapter’s vendor and product ID from lsusb output.)

  1. Save the file and reload udev rules:
sudo udevadm control --reload-rules
sudo udevadm trigger

Now, BRLTTY will no longer interfere with your serial device while keeping Braille support enabled for other users.

Additional Troubleshooting Steps

1. Check dmesg Logs

If disabling BRLTTY does not fix the problem, check system logs for more details:

dmesg | grep tty

This will display any errors related to the USB-to-serial adapter.

2. Manually Set Permissions for the Serial Port

If access is still restricted, grant necessary permissions:

sudo chmod 666 /dev/ttyUSB0

or add your user to the dialout group:

sudo usermod -aG dialout $USER

Then, log out and log back in for changes to take effect.

If your USB COM port gets immediately disconnected after plugging in a USB-to-serial adapter, BRLTTY is likely the cause on Linux systems. By disabling or removing BRLTTY, you can prevent it from taking over the serial port and ensure stable communication with your USB-to-RS232 adapter or other serial devices. This guide provides multiple solutions, so whether you prefer a quick fix or a permanent solution, you can resolve this frustrating issue efficiently.

6 thoughts on “Quick Fix: BRLTTY Causing USB COM Port Disconnection”

  1. thank you for this brilliant guide.i have the same problem with arduino ide and arduino which is connected to usb port. now it is working again

    Reply

Leave a Comment