View previous topic :: View next topic |
Author |
Message |
luciano Tux's lil' helper
Joined: 18 Nov 2004 Posts: 132
|
Posted: Sun Apr 13, 2014 12:16 pm Post subject: bluetooth telephony HFP profile using bluez5/pulseaudio5 |
|
|
Since upgrading to bluez5/pulseaudio5, I no longer have a 'telephony' profile for my bluetooth headset, and am unable to use it as a mic to speak via skype.
This page explains that HFP support was dropped from bluez5, and mentions ofono as a way to get this working:
http://www.freedesktop.org/wiki/Software/PulseAudio/Notes/5.0/
I tried installing ofono and turning it on, but doesn't seem to make any difference. Anybody know how to get this fixed (short of downgrading to bluez4, as the page suggests?) |
|
Back to top |
|
|
luciano Tux's lil' helper
Joined: 18 Nov 2004 Posts: 132
|
Posted: Fri Apr 18, 2014 9:44 am Post subject: |
|
|
Am I really the only one who uses bluetooth for video-conferencing ... ? |
|
Back to top |
|
|
luciano Tux's lil' helper
Joined: 18 Nov 2004 Posts: 132
|
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Sun Aug 03, 2014 1:12 pm Post subject: |
|
|
I compiled pulseaudio-jprvita-git from AUR in ArchLinux. It haven't been able to use the microphone of my bluetooth headset yet with Bluez5. I would like Ofono to do it to replace the new unsupported HFP by Buez5. I have to understand and play with Ofono to see if I can do it or not.
Pavucontrol give an HFP choice for my headset, but it do not work as it is said in the comments of pulseaudio-jprvita-git. _________________ Paul |
|
Back to top |
|
|
luciano Tux's lil' helper
Joined: 18 Nov 2004 Posts: 132
|
|
Back to top |
|
|
robsta23 n00b
Joined: 21 Oct 2006 Posts: 15 Location: Dresden, Germany
|
|
Back to top |
|
|
kvaster n00b
Joined: 21 Mar 2020 Posts: 1
|
Posted: Sat Mar 21, 2020 5:24 pm Post subject: |
|
|
I've enabled both HSP and HFP sucessfully at my place:
1) Compile pulseaudio with native-headset and ofono-headset flags
2) Compile ofono
3) Configure phonesim plugin in ofono - /etc/ofono/phonesim.conf
[phonesim]
Address=127.0.0.1
Port=12345
4) Start (and add to autostart) ofono
5) Get sources of latest phonesim from https://git.kernel.org/pub/scm/network/ofono/phonesim.git
Compile and run:
phonesim -p 12345 src/default.xml
(by default phonesim will listen on all interfaces, so I've created patch for myself to select listen interface)
Now you can connect your HFP enabled device. |
|
Back to top |
|
|
_Lone_Wolf_ n00b
Joined: 25 Mar 2006 Posts: 24
|
Posted: Thu May 07, 2020 2:08 pm Post subject: |
|
|
I'm having trouble compiling phonesim I get the following error:
Code: |
$ make
UIC src/ui_controlbase.h
/bin/sh: src/controlbase.ui: Permission denied
make: *** [Makefile:1066: src/ui_controlbase.h] Error 126
|
Any clue? |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Thu May 07, 2020 11:58 pm Post subject: |
|
|
Does the one in net-misc/ofono, enabled by default, not work for you? |
|
Back to top |
|
|
_Lone_Wolf_ n00b
Joined: 25 Mar 2006 Posts: 24
|
Posted: Fri May 08, 2020 9:08 am Post subject: |
|
|
There is no phonesim binary on the ofono package.
Code: |
$ equery f ofono | grep -i phonesim
/etc/ofono/phonesim.conf
|
Here are my use flags for ofono:
Code: |
$ equery u net-misc/ofono
[ Legend : U - final flag setting for installation]
[ : I - package is installed with flag ]
[ Colors : set, unset ]
* Found these USE flags for net-misc/ofono-1.16:
U I
+ + atmodem : ETSI AT modem support.
+ + bluetooth : Enable Bluetooth modem support using net-wireless/bluez.
+ + cdmamodem : Enable CDMA modem support.
+ + datafiles : Enable install configuration and data files.
- - doc : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
- - dundee : Enable BlueTooth DUN deamon support.
- - examples : Install examples, usually source code
+ + isimodem : Enable PhoNet/ISI modem support.
+ + phonesim : Enable phone Simulator support
+ + provision : Enable GPRS provisioning support
+ + qmimodem : Enable Qualcomm QMI modem support
- - threads : Add threads support for various packages. Usually pthreads
- - tools : Enable testing tools
+ + udev : Enable virtual/udev integration (device discovery, power and storage device support, etc)
|
|
|
Back to top |
|
|
oRDeX Veteran
Joined: 19 Oct 2003 Posts: 1325 Location: Italy
|
Posted: Mon Aug 24, 2020 2:57 pm Post subject: |
|
|
kvaster wrote: | I've enabled both HSP and HFP sucessfully at my place:
1) Compile pulseaudio with native-headset and ofono-headset flags
2) Compile ofono
3) Configure phonesim plugin in ofono - /etc/ofono/phonesim.conf
[phonesim]
Address=127.0.0.1
Port=12345
4) Start (and add to autostart) ofono
5) Get sources of latest phonesim from https://git.kernel.org/pub/scm/network/ofono/phonesim.git
Compile and run:
phonesim -p 12345 src/default.xml
(by default phonesim will listen on all interfaces, so I've created patch for myself to select listen interface)
Now you can connect your HFP enabled device. |
This worked for me. Thanks a lot!
The audio quality was not that good, but for that I guess there is much we can do from userspace.
Have you looked into why the phonesim binary is not provided by the ofono ebuild?
It'd be nice if it could come with ofono directly, without the need of cloning the repo. |
|
Back to top |
|
|
Chain Tux's lil' helper
Joined: 17 Apr 2006 Posts: 113 Location: Vienna
|
Posted: Sat Aug 29, 2020 12:46 pm Post subject: |
|
|
phonesim seems not to be included in the ofono sources. I couldn't find it at least. It really seems that the phonesim useflag just builds the corresponding module.
However, I found that there is a phonesim.conf file, which maybe should be installed by the ebuild so we don't have to create it ourselves.
So I guess it would be more of an external phonesim ebuild that's needed here.
Edit: Just browsing one level up to https://git.kernel.org/pub/scm/network/ofono/ you will see that phonesim actually is an external project.
Edit 2: There exists an ebuild! Take a look at https://gpo.zugaina.org/net-misc/phonesim |
|
Back to top |
|
|
equaeghe l33t
Joined: 22 Feb 2005 Posts: 630
|
Posted: Thu Sep 10, 2020 8:32 am Post subject: |
|
|
I'm having trouble installing phonesim. The ebuilds lying around do not work and I haven't been able to fix them.
I have:
Code: | # Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit multilib
DESCRIPTION="Phone Simulator for modem testing (oFono)"
HOMEPAGE="http://ofono.org/"
SRC_URI="https://mirrors.edge.kernel.org/pub/linux/network/ofono/${P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""
RDEPEND="
net-misc/ofono
dev-qt/qtcore
dev-qt/qtdbus
dev-qt/qtgui
dev-qt/qtscript
"
DEPEND="
${RDEPEND}
virtual/pkgconfig
"
src_install() {
emake DESTDIR="${D}" install || die "emake install failed"
dodoc ChangeLog AUTHORS doc/*.txt
}
|
But I get the message that Qt is not found:
Code: | checking for QT... no
configure: error: Qt is required |
I would be grateful for any assistance and advice. |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30822 Location: here
|
Posted: Thu Sep 10, 2020 9:18 am Post subject: |
|
|
This happens because phonesim 1.21 require qt4 (release date 2018-10-03), port to qt5 was made on 2019-11-06 and no release after that.
So you can create a 9999 ebuild
phonesim-9999.ebuild: | # Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools git-r3
DESCRIPTION="Phone Simulator for modem testing (oFono)"
HOMEPAGE="http://ofono.org/"
EGIT_REPO_URI="https://git.kernel.org/pub/scm/network/ofono/${PN}.git"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
RDEPEND="
net-misc/ofono
dev-qt/qtcore:5
dev-qt/qtdbus:5
dev-qt/qtgui:5
dev-qt/qtscript:5
"
DEPEND="
${RDEPEND}
virtual/pkgconfig
"
src_prepare() {
default
eautoreconf
}
|
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
equaeghe l33t
Joined: 22 Feb 2005 Posts: 630
|
Posted: Thu Sep 10, 2020 10:23 am Post subject: |
|
|
I've managed to compile phonesim (locally for now; will look into @fedeliallalinea's suggestion for the ebuild). I can create a modem and power it and it does have an impact on how my headset is seen. Namely, the a2dp_sink is now listed as ‘yes’ instead of ‘unknown’. The profile I want, headset_head_unit is still listed as ‘no’:
Code: | index: 3
name: <bluez_card.B4_9A_95_F1_6B_2A>
driver: <module-bluez5-device.c>
owner module: 27
properties:
device.description = "JBL LIVE220BT"
device.string = "B4:9A:95:F1:6B:2A"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "headset"
bluez.path = "/org/bluez/hci0/dev_B4_9A_95_F1_6B_2A"
bluez.class = "0x240404"
bluez.alias = "JBL LIVE220BT"
device.icon_name = "audio-headset-bluetooth"
device.intended_roles = "phone"
profiles:
a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 40, available: yes)
headset_head_unit: Headset Head Unit (HSP/HFP) (priority 30, available: no)
off: Uit (priority 0, available: yes)
active profile: <a2dp_sink>
sinks:
bluez_sink.B4_9A_95_F1_6B_2A.a2dp_sink/#2: JBL LIVE220BT
sources:
bluez_sink.B4_9A_95_F1_6B_2A.a2dp_sink.monitor/#4: Monitor of JBL LIVE220BT
ports:
headset-output: Headset (priority 0, latency offset 0 usec, available: yes)
properties:
headset-input: Headset (priority 0, latency offset 0 usec, available: no)
properties:
|
What I try:
Code: | pacmd set-card-profile 3 headset_head_unit
Failed to set card profile to 'headset_head_unit'. |
The logs tell me:
Code: | [pulseaudio] module-bluez5-device.c: Refused to switch profile to headset_head_unit: Not connected |
Any further suggestions welcome. |
|
Back to top |
|
|
equaeghe l33t
Joined: 22 Feb 2005 Posts: 630
|
Posted: Sun Sep 20, 2020 7:43 pm Post subject: |
|
|
fedeliallalinea wrote: | This happens because phonesim 1.21 require qt4 (release date 2018-10-03), port to qt5 was made on 2019-11-06 and no release after that.
So you can create a 9999 ebuild |
I've added a phonesim-9999 ebuild to my ‘equaeghe’ overlay.
I've changed the dependencies a bit, based on what I saw that was needed during a manual compile. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Thu Oct 29, 2020 2:54 am Post subject: |
|
|
So, what is the state here? Can we get the mic on the bluetooth headsets working in Linux or not? |
|
Back to top |
|
|
equaeghe l33t
Joined: 22 Feb 2005 Posts: 630
|
Posted: Thu Oct 29, 2020 8:03 am Post subject: |
|
|
devsk wrote: | So, what is the state here? Can we get the mic on the bluetooth headsets working in Linux or not? |
I haven't succeeded yet. The fiddling with phonesim/ofono does make the headset bluetooth profiles better detected, but successfully activating them is not something I've managed to do. There are reports here and there of other people that have succeeded with their headset. I still think it is in principle possible, but that just we haven't gathered all the necessary pieces to make it work. |
|
Back to top |
|
|
Etal Veteran
Joined: 15 Jul 2005 Posts: 1931
|
Posted: Sat Oct 31, 2020 2:33 am Post subject: |
|
|
I tried ofono/phonesim but couldn't get it to work.
Instead I got it to work with hsphfpd-prototype. It requires patching pulseaudio, but we're on Gentoo so it's easy
See here: https://github.com/pali/hsphfpd-prototype
Here's what I did:
- If you played with ofono, don't forget to stop and disable it.
- Create a pulseaudio-14 pre-release ebuild. It's the same as 13.0 except you need to disable a patch which doesn't apply:
Code: | # sed '/pulseaudio-11.1-disable-flat-volumes.patch/s/^/#/' pulseaudio-13.0.ebuild > pulseaudio-13.99.3.ebuild
# ebuild pulseaudio-13.99.3.ebuild manifest |
Add and apply the patch. I have a feeling it won't make it into pulseaudio-14 so I put it into /etc/portage/patches rather than the ebuild (so when a newer PA reaches portage, either it applies or fails and I won't forget):
Code: | # mkdir -p /etc/portage/patches/media-sound/pulseaudio
# wget https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/288.patch -O /etc/portage/patches/media-sound/pulseaudio/hsphfp.patch
# emerge -av1 pulseaudio |
Install the hsphfd script. You can find an ebuild here. If you're using systemd, you can find a unit file here.
Enable the hsphfd service ( systemctl enable hsphfpd -or- rc-update add hsphfpd ), start it ( systemctl start hsphfpd -or- /etc/init.d/hsphfpd start ), and as user, restart pulseaudio ( pulseaudio -k ).
Connect your headset, and you should now have an HFP and an HSP profile, which will allow you to use your mic!
(Don't mind the "(unavailable)" - it will become available once you select it)
Last edited by Etal on Sat Nov 07, 2020 6:37 pm; edited 1 time in total |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Sat Oct 31, 2020 5:38 am Post subject: |
|
|
@Etal: how is the audio quality? Both for music listening and during calls
PS: I just got so tired of this whole business that I got one of those USB audio adapters which talk to Bluetooth headphones on one side and expose USB audio on other. Works very nice! |
|
Back to top |
|
|
Etal Veteran
Joined: 15 Jul 2005 Posts: 1931
|
Posted: Sat Oct 31, 2020 1:18 pm Post subject: |
|
|
I got a cheap headset that could connect to both my phone and computer for phone calls and conference calls. Let's just say, for the price, it exceeded my (low) expectations
From my understanding, due to how bluetooth works, HSP/HFP (with mic) will always be worse quality than A2DP (no mic). The difference is significant. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Sat Oct 31, 2020 4:13 pm Post subject: |
|
|
Etal wrote: | I got a cheap headset that could connect to both my phone and computer for phone calls and conference calls. Let's just say, for the price, it exceeded my (low) expectations
From my understanding, due to how bluetooth works, HSP/HFP (with mic) will always be worse quality than A2DP (no mic). The difference is significant. | How come none of these quality problems exist on Macbook or even Windows? Isn't the HSP/HFP profile being configured the same way on Macbooks at the hardware level? I thought these were all done to a well laid specification.
What rubbish is the following:
Quote: |
Bluetooth Profiles: What Is A2DP?
A2DP (Advanced Audio Distribution Profile) is a Bluetooth protocol that enables a headset to stream high quality stereo audio wirelessly from a smartphone or other compatible device. The quality of the audio is much better, both for calls and for music playback.
If you want to buy a Bluetooth headset for listening to music from your phone, make sure that your devices specifications lists A2DP as a supported Bluetooth profile.
| How does A2DP allow calls? Or why does A2DP on linux not allow calls? |
|
Back to top |
|
|
Etal Veteran
Joined: 15 Jul 2005 Posts: 1931
|
|
Back to top |
|
|
AlexJGreen Tux's lil' helper
Joined: 19 Sep 2018 Posts: 149
|
Posted: Wed Nov 11, 2020 11:08 am Post subject: |
|
|
_
Last edited by AlexJGreen on Mon Dec 28, 2020 3:02 am; edited 1 time in total |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3264 Location: Canada
|
Posted: Wed Nov 11, 2020 6:23 pm Post subject: |
|
|
Indeed,
my daughter just got the latest Samsung Galaxy from her work, and bought a fancy set of bluetooth earbuds/mic. And the quality of conversation
went well down in comparison with her older phone/ wired set.
At the same time, in my 4 year old car, in car system switches from/to bluetooth phone rather seamlessly, and the quality of calls is pretty good. |
|
Back to top |
|
|
|