In some cases the brltty
service may be running. There seem to be cases when an update results in the service being installed and automatically started.
If brltty
is your problem then when you plug in the USB TTY, it will take over the port. You can check if this is happening with the command dmesg | grep tty
. If you see logs something like the following then brltty
is your problem. See reddit - BRLTTY Fighting with My /dev/ttyUSB0 for MCU Programming.
orangepi@orangepi5plus:~$ dmesg | grep tty
[ 1104.336365] usb 4-1: ch341-uart converter now attached to ttyUSB0
[ 1104.985780] usb 4-1: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1
[ 1104.988450] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 1298.811838] usb 4-1: ch341-uart converter now attached to ttyUSB0
[ 1299.440590] usb 4-1: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1
[ 1299.442800] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
You can also check to see if the brltty
service is running with the following:
orangepi@orangepi5plus:~$ ps -ef | grep "brltty"
root 14934 1 1 09:45 ? 00:00:00 /sbin/brltty -n -p /var/run/brltty.pid
orangepi 14972 3167 0 09:45 pts/0 00:00:00 grep --color=auto brltty
To disable the brltty
service, you must enter two commands, one after the other:
orangepi@orangepi5plus:~$ sudo systemctl disable --now brltty brltty-udev
orangepi@orangepi5plus:~$ sudo systemctl mask brltty brltty-udev
Created symlink /etc/systemd/system/brltty.service → /dev/null.
Created symlink /etc/systemd/system/brltty-udev.service → /dev/null.
orangepi@orangepi5plus:~$ ps -ef | grep "brltty"
orangepi 15026 3167 0 09:46 pts/0 00:00:00 grep --color=auto brltty
After stopping the brltty
service, unplug and then plug back in the device. Check using dmesg | grep tty
that brltty
is no longer running.
orangepi@orangepi5plus:~$ dmesg | grep tty
[ 1298.811838] usb 4-1: ch341-uart converter now attached to ttyUSB0
[ 1299.440590] usb 4-1: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1
[ 1299.442800] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 1790.219667] usb 4-1: ch341-uart converter now attached to ttyUSB0
[ 1790.826036] usb 4-1: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1
[ 1790.828359] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 1859.583622] usb 4-1: ch341-uart converter now attached to ttyUSB0
You will then be able to select /dev/ttyUSB0
or other ttyUSB
device with a terminal emulator such as minicom
or gtkterm
.
Note that you may need to still do the following as indicated above:
- add your user to the dialout group
- change the permissions on the /dev/ttyUSB0 device
To check if the user is in the dialout
group:
orangepi@orangepi5plus:~$ groups
orangepi tty disk dialout sudo audio video plugdev games users systemd-journal input netdev bluetooth docker
To check device permissions:
orangepi@orangepi5plus:~$ ls -l /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Feb 20 10:00 /dev/ttyUSB0
If you want to just eliminate brltty
this will do the job
sudo apt remove brltty