Score:2

What is the neverending list of mac address type outputs that occurs with command "bluetoothctl"?

ru flag

I'm trying to figure out why my bluetooth headset connection is so finnicky in ubuntu. It's a Momentum 3 with mic, and I primarily control it through the GUI settings. I can connect, but then the sound settings won't recognize the microphone. Or sometimes won't recognize the headphone set at all. It's quite baffling and I can't figure out why it sometimes works and sometimes doesn't.

Somewhere I found out about the bluetoothctl command, but my terminal behavior doesn't match the descriptions I find. Supposedly this should give me a list of connected device mac addresses from which I can select my headset. However, the output when I use the command is a never ending list of numbers of the form:

[CHG] Device AA:BB:CC:DD:EE:FF RSSI: -XY

and

[NEW] Device AA:BB:CC:DD:EE:FF GG-HH-II-JJ-KK-LL

[DEL] Device AA:BB:CC:DD:EE:FF GG-HH-II-JJ-KK-LL

What is this output? And is there a way to make it stop scrolling so that I can read the output from the bluetoothctl menu and other commands?

terdon avatar
cn flag
Doesn't it stop if you just scroll up in the terminal? I get the same behavior on my Arch system, but whenever you have multi-line, continuous output in a terminal, scrolling up (use the scroll bar on the terminal window) should let you see the old lines without having them move.
Pinkie B avatar
ru flag
Seems to! So that's 1/2 answers :D
Raffa avatar
jp flag
These are the advertised mac addresses and Bluetooth signal strengths of nearby Bluetooth enabled devices ... Turn your Bluetooth off so they are not detectable any more then the output will stop.
Score:1
jp flag

These are the advertised MAC addresses and Bluetooth signal strengths of nearby Bluetooth enabled devices ... The output will look something like this:

[NEW] Device 3B:EB:22:A4:12:64 3B-EB-22-A4-12-64
[CHG] Device 3B:EB:22:A4:12:64 RSSI: -55
[CHG] Device 3B:EB:22:A4:12:64 RSSI: -55
[CHG] Device 3B:EB:22:A4:12:64 RSSI: -59
[CHG] Device 3B:EB:22:A4:12:64 RSSI is nil
[DEL] Device 3B:EB:22:A4:12:64 3B-EB-22-A4-12-64
[CHG] Device 3B:EB:22:A4:12:64 RSSI: -55
[CHG] Device 3B:EB:22:A4:12:64 RSSI: -59
[CHG] Device 3B:EB:22:A4:12:64 RSSI: -62

Where [NEW] indicates a newly discovered device (added to the list), [DEL] indicates a device that is no more detectable (deleted from the list) and [CHG] is a change in device signal strength that is printed after RSSI:(Received Signal Strength Indicator) with a negative value e.g. -62 where lower numbers mean stronger signals.

The output will get constantly updated(this is called scanning) as long as your Bluetooth controller is turned on and will stop when you turn the Bluetooth controller off

terdon avatar
cn flag
But this makes it useless: I cannot enter any commands unless I turn bluetooth off at which point I cannot enter any commands. How are we supposed to use the tool if it will never stop spamming?
Raffa avatar
jp flag
@terdon No :-) command prompt is always there at the bottom of the terminal ... output goes above it and commands can be entered anytime ... It seems like an implementation of `libncurses` or similar ... I guess it's meant to reflect the command's effect in real-time I guess ... I agree, you can't call it purposeful per-se.
Raffa avatar
jp flag
@terdon IIRC `scan off`(*if you enter `help`, you'll get a list of supported commands*) used to stop that output but now it seems that the gnome Bluetooth module/app is overriding that anyway so Bluetooth has to be turned off completely ... So, it might not be `bluetoothctl` to blame completely for this inconvenience after all.
terdon avatar
cn flag
Nope, that doesn't seem to help. It seems really silly to just keep scanning and scanning and printing for ever. The idea is that you scan, get a list of devices and then try to pair but the constant printing of info make it really hard to do. This really feels like a bug in the tool.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.