LinHES Forums
http://forum.linhes.org/

Audio Bluetooth Setup Issues
http://forum.linhes.org/viewtopic.php?f=23&t=24790
Page 1 of 2

Author:  nicom [ Fri Sep 28, 2018 6:29 pm ]
Post subject:  Audio Bluetooth Setup Issues

I am trying to setup audio bluetooth connection with my mythbox using a USB adapter but am having problems. I tried following the wiki but it was written in 2011 and I suspect is now out of date. I was able to install bluez which allowed me to run hciconfig to do the first 2 steps and get my dongle running. I could not do the hcitool scan until I had installed bluez-utils. But it is the next step where I am stuck.

bluez-simple-agent is not installed nor is it in the repo. Searching around the web I gather it has been replaced with bluetoothctl which is in the bluez-utils package and works well on my Linux Mint desktop. When I try it on LinHES I get
Code:
[mythtv@silverstone ~]$ bluetoothctl
bluetoothctl: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory
Again I cannot find libreadline.so.6 in the repo.

Has anyone worked through this recently?

Author:  brfransen [ Sat Sep 29, 2018 8:37 am ]
Post subject:  Re: Audio Bluetooth Setup Issues

You found a package I missed when readline was updated. I have updated and rebuilt bluez.
Code:
sudo pacman -Syu

Author:  nicom [ Sat Sep 29, 2018 11:37 pm ]
Post subject:  Re: Audio Bluetooth Setup Issues

Thanks brfransen. I was able to update correctly but unfortunately now hciconfig, hcitool and bluetoothctl all don't work.
Code:
$ hciconfig -a
-bash: hciconfig: command not found
$ hcitool scan
-bash: hcitool: command not found
$ bluetoothctl --help
bluetoothctl ver 5.50
Usage:
   bluetoothctl [options]
Options:
   --agent    Register agent handler: <capability>
   --timeout    Timeout in seconds for non-interactive mode
   --version    Display version
   --help       Display help
$ bluetoothctl

Just a blinking cursor after bluetoothctl and not the bluetoothctl prompt and nothing showing on 'top'.

From my experimenting on my desktop machine I have found that hciconfig and hcitool are not necessary as bluetoothctl can do all the required functions although they are still on my desktop. The following is what it looks like on my desktop machine
Code:
~ $ bluetoothctl
[bluetooth]# version
Version 5.37
[bluetooth]# help
Available commands:
  list                       List available controllers
  show [ctrl]                Controller information
  select <ctrl>              Select default controller
  devices                    List available devices
  paired-devices             List paired devices
  power <on/off>             Set controller power
  pairable <on/off>          Set controller pairable mode
  discoverable <on/off>      Set controller discoverable mode
  agent <on/off/capability>  Enable/disable agent with given capability
  default-agent              Set agent as the default one
  set-scan-filter-uuids [uuid1 uuid2 ...] Set scan filter uuids
  set-scan-filter-rssi [rssi] Set scan filter rssi, and clears pathloss
  set-scan-filter-pathloss [pathloss] Set scan filter pathloss, and clears rssi
  set-scan-filter-transport [transport] Set scan filter transport
  set-scan-filter-clear      Clears discovery filter.
  scan <on/off>              Scan for devices
  info [dev]                 Device information
  pair [dev]                 Pair with device
  trust [dev]                Trust device
  untrust [dev]              Untrust device
  block [dev]                Block device
  unblock [dev]              Unblock device
  remove <dev>               Remove device
  connect <dev>              Connect device
  disconnect [dev]           Disconnect device
  list-attributes [dev]      List attributes
  select-attribute <attributerichard@coolermaster richard@coolermaster > Select attribute
  attribute-info [attribute] Select attribute
  read                       Read attribute value
  write <data=[xx xx ...]>   Write attribute valuerichard@coolermaster
  notify <on/off>            Notify attribute value
  register-profile <UUID ...> Register profile to connect
  unregister-profile         Unregister profile
  version                    Display version
  quit                       Quit program
[bluetooth]# quit
~ $
Any ideas on why I can't get bluetoothctl to work. I've trawled through the logs but can't see anything obvious.

Author:  brfransen [ Sun Sep 30, 2018 11:47 am ]
Post subject:  Re: Audio Bluetooth Setup Issues

Looks like the hci* tools have all been depreciated and are not packaged by default: https://www.spinics.net/lists/linux-blu ... 69239.html

Did the kernel recognize the BT hardware? Maybe need to load a kernel module? Beyond that I am not sure as I haven't used BT on LH.

Author:  nicom [ Sun Sep 30, 2018 4:01 pm ]
Post subject:  Re: Audio Bluetooth Setup Issues

Quote:
Did the kernel recognize the BT hardware?
It looks like it.
Code:
$ lsusb |grep -i Blue
Bus 003 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
I'll keep looking at the bluetoothctl installation.

Author:  brfransen [ Sun Sep 30, 2018 6:35 pm ]
Post subject:  Re: Audio Bluetooth Setup Issues

The kernel recognized it as a USB device. I was wondering if it loaded a kernel module like btusb?

The Arch Wiki might be of some help. Just remember LH doesn't use systemd so none of the service cmds will work. https://wiki.archlinux.org/index.php/Bluetooth

Author:  nicom [ Tue Oct 02, 2018 1:54 am ]
Post subject:  Re: Audio Bluetooth Setup Issues

Does this mean it has loaded a kernel module?
Code:
$ lsmod | grep bluetoo
bluetooth             495616  5 btrtl,btintel,btbcm,btusb
rfkill                 20480  1 bluetooth
crc16                  16384  2 bluetooth,ext4
I have tried a straight Arch install on a virtual machine and I get exacly the same response when I try to start blutoothctl ie. no prompt. Perhaps there is an issue with the package although I cannot find anyone else complaining of the same issue.

Is anyone else in the LinHES community using bluetooth successfully with the latest version?

Author:  brfransen [ Tue Oct 02, 2018 6:13 am ]
Post subject:  Re: Audio Bluetooth Setup Issues

Looks like it did load the kernel module.

Since it is doing the same thing in Arch seems like it could be hardware related. Maybe there is another kernel module for your hardware?

Author:  nicom [ Tue Oct 02, 2018 4:05 pm ]
Post subject:  Re: Audio Bluetooth Setup Issues

My attempts with Arch in virtual machines was done on 2 other computers one of which was a laptop with onboard bluetooth. I'm not sure it is hardware related.

Author:  brfransen [ Wed Oct 03, 2018 10:52 am ]
Post subject:  Re: Audio Bluetooth Setup Issues

The bluetoothd runit service was trying to start bluetoothctl. With newer version of bluez it should be starting bluetoothd. I have fixed that.
Code:
sudo pacman -Syu
sudo add_service.sh bluetoothd
sudo sv restart bluetoothd


Then try running sudo bluetoothctl.

Author:  mattbatt [ Wed Oct 03, 2018 10:51 pm ]
Post subject:  Re: Audio Bluetooth Setup Issues

Maybe you should try running a "Live CD" of an arch based distro instead of a virtual machine. Sometimes the VM can get in the way of USB devices.

Author:  nicom [ Thu Oct 04, 2018 2:14 am ]
Post subject:  Re: Audio Bluetooth Setup Issues

Thanks brfransen that has allowed me to successfully run bluetoothctl. I will continue with the setup process.

@mattbatt Now that I have bluetoothctl running I think I will give up on trying it in Arch.

Author:  nicom [ Tue Oct 09, 2018 5:35 pm ]
Post subject:  Re: Audio Bluetooth Setup Issues

As I said in my previous post I can now successfully run bluetoothctl which allows me to detect my BT device, pair with it but I cannot connect with it
Code:
[bluetooth]# pair B2:2B:07:08:11:11
Attempting to pair with B2:2B:07:08:11:11
[CHG] Device B2:2B:07:08:11:11 Connected: yes
[CHG] Device B2:2B:07:08:11:11 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device B2:2B:07:08:11:11 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device B2:2B:07:08:11:11 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device B2:2B:07:08:11:11 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device B2:2B:07:08:11:11 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device B2:2B:07:08:11:11 ServicesResolved: yes
[CHG] Device B2:2B:07:08:11:11 Paired: yes
Pairing successful
[CHG] Device B2:2B:07:08:11:11 ServicesResolved: no
[CHG] Device B2:2B:07:08:11:11 Connected: no
[bluetooth]#

[bluetooth]# connect B2:2B:07:08:11:11
Attempting to connect to B2:2B:07:08:11:11
Failed to connect: org.bluez.Error.Failed
[bluetooth]# 
On further reading in an Arch forum post I believe that since version 5 of bluez it requires pulse audio. I think alsa has not been updated for the new APIs. So unless someone knows of a way to get it working with alsa I think I will have to give up.

Author:  mattbatt [ Tue Oct 09, 2018 9:04 pm ]
Post subject:  Re: Audio Bluetooth Setup Issues

Just out of curiosity are you trying to transmit Bluetooth audio from your MythTV device to something or the other way around?

Author:  nicom [ Wed Oct 10, 2018 5:56 pm ]
Post subject:  Re: Audio Bluetooth Setup Issues

Trying to get audio from mythbox to headphones

Page 1 of 2 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/