Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Article suggestion: missing port on Linux caused by interference from BRLTTY #155

Open
per1234 opened this issue Dec 27, 2022 · 0 comments

Comments

@per1234
Copy link
Collaborator

per1234 commented Dec 27, 2022

Article summary

Some Linux distros have a pre-installed application named BRLTTY that interfaces the terminal with braille displays. These displays use a serial port for communication with the computer. Unfortunately, BRLTTY assumes that the port from any general purpose USB to serial adapter is a braille display and takes over the ports. If the port is actually of an Arduino board, this causes the port to not appear in the Arduino IDE ports list.

More information

Steps to reproduce the problem

Equipment

Any Arduino board or other hardware (e.g., an "FTDI" module or cable) that uses a general purpose USB to serial adapter chip:

  • FTDI FT232R
  • Silicon Labs CP210x
  • WCH CH340
    Even though I could reproduce the fault with the other two, I did not with the CH340, but other users have reported the fault occurring for this specific chip, so it may be limited to certain distros.

The most common official Arduino board that is affected is the Arduino Nano (which uses the FT232R chip)

Steps

  1. Connect the board to a computer running Linux
  2. Type the following command in a terminal:
    ps -C brltty
    
  3. You will now see output with a format similar to one of the following:
        PID TTY          TIME CMD
      12037 ?        00:00:02 brltty
    
    OR
        PID TTY          TIME CMD
    
    If the output has the latter output, either your Linux distro is not subject to this problem or else you have already applied the fix. In this case, simulate the environment of an affected distro by running this command from the terminal:
    brltty
    
  4. Start Arduino IDE.
  5. Check the list of available ports in Arduno IDE
    🐛 The port of the connected device is not shown.
  6. Run the following command from the terminal:
    dmesg
    
    🐛 The output shows the port was created, but then disconnected due to interference from BRLTTY:
    [ 5337.350288] usb 3-4: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
    [ 5337.350292] usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 5337.350295] usb 3-4: Product: FT232R USB UART
    [ 5337.350297] usb 3-4: Manufacturer: FTDI
    [ 5337.350299] usb 3-4: SerialNumber: AB0P8H9K
    [ 5337.353430] ftdi_sio 3-4:1.0: FTDI USB Serial Device converter detected
    [ 5337.353504] usb 3-4: Detected FT232RL
    [ 5337.354003] usb 3-4: FTDI USB Serial Device converter now attached to ttyUSB0
    [ 5339.669621] usb 3-4: usbfs: interface 0 claimed by ftdi_sio while 'brltty' sets config #1
    [ 5339.670517] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
    [ 5339.670546] ftdi_sio 3-4:1.0: device disconnected
    

Known answers or solutions

The most simple solution is to uninstall BRLTTY:

sudo apt-get remove brltty

Obviously this solution will be unacceptable for users of braille displays who find BRLTTY to be useful. Some more "surgical" approaches are discussed here:

https://unix.stackexchange.com/questions/670636/unable-to-use-usb-dongle-based-on-usb-serial-converter-chip/670637#670637

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant