Page 1 of 1

bluetoothctl on Ubuntu 20.04 and RPi 4b IDE has garbled lines

Posted: Sat May 23, 2020 5:03 pm
by bit_pusher
Running bluetoothctl on Ubuntu 20.04 and Pi4b has garbled lines. At the beginning of each line are unprintable characters that are not readable and obscure the first few characters of each line. After these characters, the rest of the line is readable. The app does appear to be working as expected; it's just very difficult to use when you can't read the beginnings of the lines. I have checked locale

Code: Select all

> locale
LANG=en_US.UTF-8
Could it have something to do with the bluetooth coming through the UART interface? Does anyone have info on compiling bluetoothctl from source? Any ideas on where to look to resolve?

Code: Select all

> bluetoothctl
Agent registered
[CHG] Controller B8:27:EB:9A:70:08 Pairable: yes
[bluetooth]# scan on
Discovery started
[CHG] Controller B8:27:EB:9A:70:08 Discovering: yes
[NEW] Device 30:8C:FB:4F:A3:BB Dropcam
[NEW] Device 30:8C:FB:57:D4:52 Dropcam
[bluetooth]# 
The unprintable characters are not being shown in the code block above but I can now see "NEW" and "CHG" which I don't see when using the IDE over ssh with a gome terminal. It looks to me like characters are being sent that should be filtered out somewhere. Suggestions are appreciated. Thanks.

Re: bluetoothctl garbled lines

Posted: Mon Jun 01, 2020 6:15 pm
by bit_pusher
Haven't figured it out yet, but I think it has something to do with the readline() library used in bluetoothctl, and changing colors around the prompt. I'm running over ssh on a Gnome Terminal 3.28.2. A simple workaround is to start a new terminal in the background
>xterm &
and then run bluetoothctl in the new xterm; this works fine.