You are not logged in.

#1 2020-12-26 21:37:12

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,232

[MOOT] Bluetooth Headset HSP/HFP not working, but available

I received an Aluratek Bluetooth headset for Christmas.  I works perfectly in Arch Linux in A2DP mode and sounds great.  It works seamlessly with my Pixel 4a in both A2DP mode and (presumably) in HSP/HFP mode as it works with phone calls.  It also works with the microphone to talk to Google assistant while listening to hi-def audio (Not quite sure how that works)

Regardless, in Arch Linux, I cannot find a mode in which I can use the microphone.  If I look at the output of pactl list, I can see that both A2DP and HSP/HFP are available, and I can use pacmd set-card-profile to change between the profiles without receiving any errors, but once in HSP/HFP mode, there is no audio, and there is no input from the microphone -- although both show up in pavucontrol.   Sometimes after making the switch to HSP/HFP, the headset will disconnect, and then reconnect again as a different card number.  Other time, nothing happens -- there is just no audio.  Running btmon as root shows data is transferred to the headset in A2DP mode, but not in HSP/HSF mode.

I checked other posts in the forums, and there are many stale threads similar to this that either died out without resolution, or had slightly different problems -- mostly that the poster could not change to the desired profile as it was not available.  The wiki goes off on what I beleive is a tangent of installing ofono and phonesim for some kind of incompatibility of HFP;  I don't think that is the issue and have not invested time descending that rabbit hole.  Of course, if I am wrong, let me know and I'll chase that to the mat.

The pulseaudio website talks of some cards not properly setting up endpoints and offers incantations to solve some of these issues with specific Bluetooth interfaces; mostly the usual culprits (*cough* Broadcom *cough*).  My device is an Intel USB Bluetooth that is internal to my laptop and is independent of the WiFi interface, and does not show up in the discussion of cards with need of workarounds.   

Pertinent output of pactl list with HD audio working:

Card #7
	Name: bluez_card.00_6A_8E_08_04_31
	Driver: module-bluez5-device.c
	Owner Module: 30
	Properties:
		device.description = "Aluratek Headset"
		device.string = "00:6A:8E:08:04:31"
		device.api = "bluez"
		device.class = "sound"
		device.bus = "bluetooth"
		device.form_factor = "headset"
		bluez.path = "/org/bluez/hci0/dev_00_6A_8E_08_04_31"
		bluez.class = "0x240404"
		bluez.alias = "Aluratek Headset"
		device.icon_name = "audio-headset-bluetooth"
		device.intended_roles = "phone"
	Profiles:
		headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 30, available: yes)
		a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 40, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: a2dp_sink
	Ports:
		headset-output: Headset (type: Headset, priority: 0, latency offset: 0 usec, available)
			Part of profile(s): headset_head_unit, a2dp_sink
		headset-input: Headset (type: Headset, priority: 0, latency offset: 0 usec, availability unknown)
			Part of profile(s): headset_head_unit

and again in HSP/HFP mode with no audio:

ewaller@odin/home/ewaller % pacmd set-card-profile 7 headset_head_unit 
ewaller@odin/home/ewaller % pactl list
Module #0
<----SNIP a lot of data that I think is unrelated ---->
Card #7
	Name: bluez_card.00_6A_8E_08_04_31
	Driver: module-bluez5-device.c
	Owner Module: 32
	Properties:
		device.description = "Aluratek Headset"
		device.string = "00:6A:8E:08:04:31"
		device.api = "bluez"
		device.class = "sound"
		device.bus = "bluetooth"
		device.form_factor = "headset"
		bluez.path = "/org/bluez/hci0/dev_00_6A_8E_08_04_31"
		bluez.class = "0x240404"
		bluez.alias = "Aluratek Headset"
		device.icon_name = "audio-headset-bluetooth"
		device.intended_roles = "phone"
	Profiles:
		headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 30, available: yes)
		a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 40, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: headset_head_unit
	Ports:
		headset-output: Headset (type: Headset, priority: 0, latency offset: 0 usec, available)
			Part of profile(s): headset_head_unit, a2dp_sink
		headset-input: Headset (type: Headset, priority: 0, latency offset: 0 usec, available)
			Part of profile(s): headset_head_unit
ewaller@odin/home/ewaller % 

 

Between Pulseaudo, alsa, bluez, and the wiki, there are a lot of windmills to tilt; any suggestions as to where to direct my efforts?

Last edited by ewaller (2022-07-04 15:51:27)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#2 2020-12-28 14:19:45

Stellarator
Member
Registered: 2019-01-12
Posts: 32

Re: [MOOT] Bluetooth Headset HSP/HFP not working, but available

Actually, it would be nice to close this topic once and for all. Considering the fact that people with 10+ years of experience (at least considering BB but I am sure that not only) took the stage smile.

I have SONY WH-1000XM3. I did everything you've mentioned (explored stale threads, read wiki pages, checked pulseaudio website, ...). What I've never tried was to install ofono smile (personally, I think that phonesim is definitely overkill). So, someone might have to look down the rabbit hole... For me this moment was not so important, because I have prioritized audio quality and the microphone in my laptop is still working. So, I decided not to waste time at that moment and settled on just playing audio. But the engineering mind demands an answer!

I watched the issues in this repo a year+ ago (it is mentioned in wiki's page). Especially interesting (and promising) one was Add HFP support ?. But I lost context 1.5 years ago and so need a refresh.

Personally, I checked author posts once in awhile (like this one). Because author has similar setup (in terms of headset). But it looks like the issue has not been resolved. And maybe all these things (and my words) are not related with your problem at all.

Offline

#3 2020-12-28 14:32:21

progandy
Member
Registered: 2012-05-17
Posts: 5,268

Re: [MOOT] Bluetooth Headset HSP/HFP not working, but available

It also works with the microphone to talk to Google assistant while listening to hi-def audio (Not quite sure how that works)

I'd guess it switches from A2DP to HFP with the 16kHz mSBC codec (which is currently not supported by pulseaudio)

This merge request and the others mentioned in the comments discuss different ways that could be implemented.
https://gitlab.freedesktop.org/pulseaud … quests/254

You could also try to replace pulseaudio with pipewire and try its implementations https://gitlab.freedesktop.org/pipewire … issues/249 (Edit: It seems to be incomplete)

Last edited by progandy (2020-12-28 14:43:45)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2021-01-03 17:06:46

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,232

Re: [MOOT] Bluetooth Headset HSP/HFP not working, but available

I did try setting the default sample rate to 48000 to no avail.

It looks the collective opinion around the internet is that it may be related to the Linux firmware package and not using the proper USB endpoint.  Could all be noise, but that is jest of what I am seeing.   Still investigating.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2022-01-15 18:47:11

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,232

Re: [MOOT] Bluetooth Headset HSP/HFP not working, but available

A year later, and I am still fighting this.   I have worked around it to this point by using teams on my tablet.  The IT department at work has decided that, for the privilege to use Teams, they want the ability to administer my tablet.  Um, not gonna happen.
So, I'm back to trying to figure out how to use the microphone on this headset with Arch. 

I am now trying pipewire and am working my way through https://wiki.archlinux.org/title/PipeWire#Audio_2 .  The headphones work in high def mode and sound great; love using them on airplanes to watch movies.  But, no headset mode will work. 
I am, however in my natural state -- confused.   That article talks of pipewire being a systemd service and the need to restart it after changing configuration files.  But, on my system, it is most definitely not a service.  What am I missing?  It seems to be using pipwire:

ewaller@odin/home/ewaller % pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 75
Tile Size: 65472
User Name: ewaller
Host Name: odin
Server Name: PulseAudio (on PipeWire 0.3.43)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1b.0.analog-stereo
Default Source: alsa_input.pci-0000_00_1b.0.analog-stereo
Cookie: d04f:9cc7
ewaller@odin/home/ewaller % 

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2022-01-15 19:04:48

progandy
Member
Registered: 2012-05-17
Posts: 5,268

Re: [MOOT] Bluetooth Headset HSP/HFP not working, but available

pipewire should start as a service in the user session like this: (I believe it should be automatically enabled, but I did that manually as well) You can then restart these services after configuration changes.

% systemctl --user status "pipewire*"
● pipewire.service - PipeWire Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-01-15 17:02:51 CET; 3h 1min ago
TriggeredBy: ● pipewire.socket
   Main PID: 2093 (pipewire)
      Tasks: 2 (limit: 18852)
     Memory: 8.0M
        CPU: 51.005s
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
             └─2093 /usr/bin/pipewire

Jan 15 17:02:51 archspectre systemd[2079]: Started PipeWire Multimedia Service.

● pipewire-pulse.socket - PipeWire PulseAudio
     Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.socket; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-01-15 17:02:51 CET; 3h 1min ago
      Until: Sat 2022-01-15 17:02:51 CET; 3h 1min ago
   Triggers: ● pipewire-pulse.service
     Listen: /run/user/1000/pulse/native (Stream)
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/pipewire-pulse.socket

Jan 15 17:02:51 archspectre systemd[2079]: Listening on PipeWire PulseAudio.

● pipewire-pulse.service - PipeWire PulseAudio
     Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-01-15 17:02:51 CET; 3h 1min ago
TriggeredBy: ● pipewire-pulse.socket
   Main PID: 2096 (pipewire-pulse)
      Tasks: 2 (limit: 18852)
     Memory: 16.5M
        CPU: 1min 7.795s
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-pulse.service
             └─2096 /usr/bin/pipewire-pulse

Jan 15 17:02:51 archspectre systemd[2079]: Started PipeWire PulseAudio.

● pipewire.socket - PipeWire Multimedia System Socket
     Loaded: loaded (/usr/lib/systemd/user/pipewire.socket; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-01-15 17:02:51 CET; 3h 1min ago
      Until: Sat 2022-01-15 17:02:51 CET; 3h 1min ago
   Triggers: ● pipewire.service
     Listen: /run/user/1000/pipewire-0 (Stream)
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/pipewire.socket

Jan 15 17:02:51 archspectre systemd[2079]: Listening on PipeWire Multimedia System Socket.

Edit: There is also a wireplumber service that is not included in this output. (Or pipewire-media-session if you use that)

Edit: By the way, someone else with HFP/HSP problems with different earbuds: https://gitlab.freedesktop.org/pipewire … ssues/1817

Last edited by progandy (2022-01-15 19:20:25)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2022-01-15 19:18:03

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,232

Re: [MOOT] Bluetooth Headset HSP/HFP not working, but available

*Headdesk* 
A user service.

Thanks.  Missed that (obviously)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#8 2022-01-15 19:23:53

progandy
Member
Registered: 2012-05-17
Posts: 5,268

Re: [MOOT] Bluetooth Headset HSP/HFP not working, but available

By the way, does that headset maybe support AptX LL or FastStream? In that case there should be an option for bidirectional A2DP in the profile selection with a recent pipewire version.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#9 2022-01-15 19:26:45

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,232

Re: [MOOT] Bluetooth Headset HSP/HFP not working, but available

progandy wrote:

By the way, does that headset maybe support AptX LL or FastStream? In that case there should be an option for bidirectional A2DP in the profile selection with a recent pipewire version.

It have not seen a bidirectional A2DP profile, but I have been experimenting with config files.   Let me look into this and see what I find (perhaps going back to the default configuration)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#10 2022-01-15 19:43:57

progandy
Member
Registered: 2012-05-17
Posts: 5,268

Re: [MOOT] Bluetooth Headset HSP/HFP not working, but available

If you haven't tried, you could also limit "bluez5.headset-roles" to only one of "hsp_ag" or "hfp_ag". Or try the external hsphfpd backend, though that seems to be mostly abandoned.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#11 2022-01-16 21:26:08

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,232

Re: [MOOT] Bluetooth Headset HSP/HFP not working, but available

Well, the headset seems not to support FastStream or AptX.  If I force it, the headset won't connect in High Fidelity mode.  It will only connect in High Fidelity mode as A2DP SBC and A2DP SBC-XQ.
In this mode, it sounds great for listening privately to movies and music; which is why I bought the unit in the first place.  If this did not work, I would be upset.

But, it would be nice to be able to use it for Zoom and Teams.  As I stated, I use those on my Android tablet (Samsung Galaxy Tab A) and on my Android phone (Pixel 4a) and the headset seems to work seamlessly.  But, I cannot prove what mode it is using for video conferencing vs multimedia.   

I also have a completely worthless, locked down, under powered Windows 10 Laptop that belongs to IT at $DAYJOB.  The headset works with it -- I think.  It might actually be using the built in microphone, but it does use a low fidelity connection that is persistent after a video call.  If I force the connection to high definition, it sounds better, but subsequent video calls won't work.     I don't care and won't spend an iota of my time diagnosing that pig; I was just hoping to get some intelligence as to how Windows handled this headset.  The answer is -- badly.

Which brings me back to this laptop.  The High Fidelity connection works, but has no reverse channel as would Faststream.   If I put it into one of the Headset modes, it used to disconnect after a few moments.  Your suggestion of locking down hsp_ag and hfp_ag looked promising, but did not pan out in the end.   After doing that, I was able to select a HSP/HFS mode in mSBC and not have the headset disconnect.   Even more promising, an input for the microphone appeared in PaVuControl.  But the streams seem dead.  Outbound audio vanishes into the aether, and recording functions attaching to the input stream receive nary a byte.

Tangentially, this headset does have a cable with uUSB on one end, and a phono jack with stereo and mic on the other end that permits use as an analog headset I can use in a pinch, but that is not the point, is it?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#12 2022-01-16 21:38:48

progandy
Member
Registered: 2012-05-17
Posts: 5,268

Re: [MOOT] Bluetooth Headset HSP/HFP not working, but available

A last thing you could try is disabling msbc and maybe hw-volume (while keeping the hfp/hsp selection locked down): https://gitlab.freedesktop.org/pipewire … or.conf#L8
bluez5.enable-msbc = false
bluez5.enable-hw-volume = false

Otherwise you probably have to open a bug report, start capturing bluetooth traffic like e.g. here: https://gitlab.freedesktop.org/pipewire … ssues/1827
Edit: Or maybe there is some firmware file or update for your bluetooth device missing?
Edit: Maybe deleting the pairing (and bluez cache files for that device in /var/lib/blueooth) before reconnecting might also help if there is wrong data in the cache?

Last edited by progandy (2022-01-16 21:44:20)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#13 2022-01-16 22:11:54

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,232

Re: [MOOT] Bluetooth Headset HSP/HFP not working, but available

I did not mention that I re-paired every time I changed the configuration and restarted pipewire.   I'll give those suggestions a try.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#14 2022-04-19 12:13:28

krahser
Member
From: Argentina
Registered: 2009-04-02
Posts: 5

Re: [MOOT] Bluetooth Headset HSP/HFP not working, but available

did you find a way to make it work? I have the same headset and was about to try pipewire, because no profile on pulseaudio is working hmm

Offline

#15 2022-04-19 15:07:19

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,232

Re: [MOOT] Bluetooth Headset HSP/HFP not working, but available

Unfortunately, no.   And I have tried both pipewire and pulseaudio.   I did see a new Linux firmware package go by in a recent update, so I will have to revisit this. In my case, I have become somewhat overcome by events.  IT at work has decided to only permit the use of Microsoft Teams on company laptops that are part of a Microsoft domain (I don't like it, but they have very good reasons for doing so that I cannot discuss here).  The  BT headset works fine with the my POS company Windows laptop. Any personal video calls I tend to use my phone, either with or without headsets.  The only use case for my headset for on Linux is to listen to music or watch movies on airplanes. 

As a work around, one can use the phono plug to microUSB cable that came with the headset and use the built in audio.


Edit:
By the way, what is your Bluetooth hardware in your system?  Mine is  an integral USB device by Intel.  VID=8087 PID=07DC

Not that I think it matters, the main audio device is an Intel PCI device:
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)

I think the fault lies in the driver for the USB Bluetooth device.

Last edited by ewaller (2022-04-19 15:28:16)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#16 2022-07-04 15:50:50

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,232

Re: [MOOT] Bluetooth Headset HSP/HFP not working, but available

This is now moot.  The HP laptop I was using died after years of service.  Its Asus replacement works with this headset right out of the box.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB