Skip to content

Instantly share code, notes, and snippets.

@aliemo
Created December 16, 2023 20:46
Show Gist options
  • Save aliemo/de07f94c6185558b31aabe8a65f2c22e to your computer and use it in GitHub Desktop.
Save aliemo/de07f94c6185558b31aabe8a65f2c22e to your computer and use it in GitHub Desktop.
FPGA or Micro Peripherals HOST Problems and Solutions

FPGA or Micro Serial Port Problems and Solutions

Serial Port Problems in Linux

Problem: ch34x converter like usb-to-uart or jtag or serial

command sudo dmesg showed this and tryied to load Screen Driver Keyboard ch34x 1-1.4:1.0: ch34x converter detected;

usb 1-1.4: ch34x converter now attached to ttyUSB0;    
input: BRLTTY 6.4 Linux Screen Driver Keyboard as /devices/virtual/input/input71;    
usb 1-1.4: usbfs: interface 0 claimed by ch34x while 'brltty' sets config #1

Solution 1: This happens because of conflict between product IDs (a Braille screen reader and my CH340 based chip). Here is the solution:

  1. Edit /usr/lib/udev/rules.d/85-brltty.rules
  2. Search for this line and comment it out:
ENV{PRODUCT}=="1a86/7523/*", ENV{BRLTTY_BRAILLE_DRIVER}="bm", GOTO="brltty_usb_run"
  1. reboot

Solution 2

Remove udev rules BRLTTY uses udev rules to get permissions to mess with the TTYs without being root. You can disable these rules by overriding the rules shipped by your distro with /dev/null:

for f in /usr/lib/udev/rules.d/*brltty*.rules; do
    sudo ln -s /dev/null "/etc/udev/rules.d/$(basename "$f")"
done
sudo udevadm control --reload-rules

Solution 3

Unless you are using a braille display this should do the trick:

sudo apt remove brltty

Don't forget to plug your dongle off and on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment