User Tools

Site Tools


Sidebar

Action disabled: revisions
hardwarerelated:headset:sony_wh-1000xm2

What?

Just some notes around the Sony WH-1000XM2

  • pro: wireless: bluetooth profiles for headset and High Fidelity playback (A2DP)
  • pro: quite good noise cancelling
  • pro: build in rechargable battery
  • con: when the cable is used, only headphone functionality is available. No microphone signal goes over the analog cable.
  • con: after 60min of wearing, I need to take the headset off

Bluetooth profiles

bluetooth profiles supported by the headset:

  • Advanced Audio Distribution Profile (A2DP)
  • Hands Free (HFP)
  • Headphones (HSP)
  • Audio/Video Remote Control Profile (AVRCP)
  • BTLE (Bluetooth Low Energy)

One can choose between pure Audio output (A2DP profile) in good quality, or hearing/listening (HFP/HSP profile) with lower quality. HFP in version 1.6 seems to also support better audio transport. The bluez5 implementation on Linux seems to support HFP v1.6 and HSP v1.2 (reference). Not sure how to see which version is used for communication with the headset.

“Hands-Free Profile (HFP) Version 1.6 adds optional support for wide band speech with the mSBC codec, a 16 kHz monaural configuration of the SBC codec mandated by the A2DP profile.”

Fedora 34 and later / pipewire based setups

### Let's install the required packages.
$ sudo dnf install -y pipewire-alsa pipewire-pulseaudio pipewire
  
### Now ensure dbus and pipewire are running as your user, and enabled.
$ systemctl --user restart dbus pipewire-pulse pipewire
$ systemctl --user enable dbus pipewire-pulse pipewire
$ systemctl --user status dbus pipewire-pulse pipewire

$ sudo systemctl status bluetooth.service

$ bluetoothctl 
Agent registered
[CHG] Controller XX:XX:XX:XX:XX:B7 Pairable: yes
[LE_WH-1000XM2]# scan on
Discovery started
[CHG] Controller XX:XX:XX:XX:XX:B7 Discovering: yes
[CHG] Device XX:XX:XX:XX:XX:85 RSSI: -48
[CHG] Device XX:XX:XX:XX:XX:85 TxPower: 4
[CHG] Device XX:XX:XX:XX:XX:85 Name: WH-1000XM2
[CHG] Device XX:XX:XX:XX:XX:85 Alias: WH-1000XM2
[NEW] Device XX:XX:XX:XX:XX:6D XX:XX:XX:XX:XX:6D
[LE_WH-1000XM2]#  trust XX:XX:XX:XX:XX:85
Changing XX:XX:XX:XX:XX:85 trust succeeded
[LE_WH-1000XM2]# connect XX:XX:XX:XX:XX:85
Attempting to connect to XX:XX:XX:XX:XX:85
Connection successful
[CHG] Device XX:XX:XX:XX:XX:85 RSSI: -59
[CHG] Device XX:XX:XX:XX:XX:85 Name: LE_WH-1000XM2

$ sudo bluetoothctl
[bluetooth]# power on
[bluetooth]# agent on
[bluetooth]# default-agent
[bluetooth]# scan on
[NEW] Device XX:XX:XX:XX:XX:XX WH-1000XM2
[bluetooth]# scan off
[bluetooth]# trust XX:XX:XX:XX:XX:XX
[bluetooth]# pair XX:XX:XX:XX:XX:XX
Attempting to pair with XX:XX:XX:XX:XX:XX
[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... 
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... 
[CHG] Device XX:XX:XX:XX:XX:XX Paired: yes
Pairing successful
[CHG] Device XX:XX:XX:XX:XX:XX Connected: no
[bluetooth]# connect XX:XX:XX:XX:XX:XX
Attempting to connect to XX:XX:XX:XX:XX:XX
[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
Connection successful
[bluetooth]# quit

### Which codec is currently active?
$ pactl info
$ pactl list sinks
[..]
Sink #199
[..]
        Description: WH-1000XM2
        Driver: PipeWire
        Sample Specification: s16le 2ch 48000Hz
[..]
        Properties:
                api.bluez5.transport = ""
                api.bluez5.profile = "a2dp-sink"
                api.bluez5.codec = "sbc"
[..]
OR
                api.bluez5.codec = "aac"  (aac codec, high quality)
OR
                api.bluez5.codec = "ldac" (for low latency)
OR
                api.bluez5.codec = "cvsd" (for headset use, with micro on)

### Change profile, way 1
$ sudo dnf install -y pavucontrol
$ pavucontrol

### Change profile, way 2
$ pactl list cards
Card #197
        Name: bluez_card.70_26_05_9D_31_85
        Driver: module-bluez5-device.c
        Owner Module: n/a
        Properties:
        [..]
        Profiles:
                off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
                a2dp-sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 0, available: yes)
                headset-head-unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 0, available: yes)
                a2dp-sink-sbc: High Fidelity Playback (A2DP Sink, codec SBC) (sinks: 1, sources: 0, priority: 0, available: yes)
                a2dp-sink-aac: High Fidelity Playback (A2DP Sink, codec AAC) (sinks: 1, sources: 0, priority: 0, available: yes)
                a2dp-sink-ldac: High Fidelity Playback (A2DP Sink, codec LDAC) (sinks: 1, sources: 0, priority: 0, available: yes)
                headset-head-unit-cvsd: Headset Head Unit (HSP/HFP, codec CVSD) (sinks: 1, sources: 1, priority: 0, available: yes)
        Active Profile: a2dp-sink-aac
$ pactl set-card-profile bluez_card.70_26_05_9D_31_85 a2dp-sink-sbc

Fedora <=33 / pulseaudio based setups

# Let's install the required packages.  Pulls in pulseaudio.
# Before these codecs became available, package 
# pulseaudio-module-bluetooth got installed instead.
$ sudo dnf install pulseaudio-module-bluetooth-freeworld
  
# Now restart pulseaudio.  Typically, one daemon is running
# on your system.  Execute the following as user, not root.
$ killall pulseaudio
$ pulseaudio --start

$ sudo systemctl status bluetooth.service

$ sudo bluetoothctl
[bluetooth]# power on
[bluetooth]# agent on
[bluetooth]# default-agent
[bluetooth]# scan on
[NEW] Device XX:XX:XX:XX:XX:XX WH-1000XM2
[bluetooth]# scan off
[bluetooth]# trust XX:XX:XX:XX:XX:XX
[bluetooth]# pair XX:XX:XX:XX:XX:XX
Attempting to pair with XX:XX:XX:XX:XX:XX
[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... 
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... 
[CHG] Device XX:XX:XX:XX:XX:XX Paired: yes
Pairing successful
[CHG] Device XX:XX:XX:XX:XX:XX Connected: no
[bluetooth]# connect XX:XX:XX:XX:XX:XX
Attempting to connect to XX:XX:XX:XX:XX:XX
[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
Connection successful
[bluetooth]# quit

### Which codec is currently active?
CARDINDEX=$(pacmd list-cards | grep index|tail -1|awk '{print $2}')
echo $CARDINDEX

### Try to set a2dp codec/for good quality audio 
pacmd set-card-profile $CARDINDEX a2dp_sink

### Try to set h2h profile, for having also microphone usable
pacmd set-card-profile $CARDINDEX headset_head_unit

### Verify active profile
pacmd list-cards|grep active|tail -1

Errors & solutions

Problem
  • 'blueman-applet' says when trying to connect to the headset “protocol not available.
  • bluetoothctl reports this:
[chris@電脳 ~]$ bluetoothctl
Agent registered
[CHG] Controller 34:E1:2D:7C:61:B7 Pairable: yes
[bluetooth]# scan on
Discovery started
[CHG] Controller 34:E1:2D:7C:61:B7 Discovering: yes
[..]
[CHG] Device 70:26:05:9D:31:85 Name: LE_WH-1000XM2
[CHG] Device 70:26:05:9D:31:85 Alias: LE_WH-1000XM2
[bluetooth]# trust 70:26:05:9D:31:85
Changing 70:26:05:9D:31:85 trust succeeded
[NEW] Device 4D:E9:CA:BF:05:3B 4D-E9-CA-BF-05-3B
[bluetooth]# connect 70:26:05:9D:31:85
Attempting to connect to 70:26:05:9D:31:85
Failed to connect: org.bluez.Error.Failed
  • When trying to connect in 'blueman-applet', error “unknown protocol” appears, and “systemctl status bluetooth.service” reports:
bluetoothd[23]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for 70:26:05:9D:31:85: Protocol not available
bluetoothd[23]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for 70:26:05:9D:31:85: Protocol not available
Solution 1 (pulseaudio based setups only)
  • Ensure package pulseaudio-module-bluetooth-freeworld or pulseaudio-module-bluetooth is installed.
  • If you installed the package after starting pulseaudio or your Xorg session, then do this as user:
killall pulseaudio
pulseaudio --start
Solution 2

Install package blueman and run 'blueman-manager', for me that frontend was able to connect when 'bluetoothctl' could not.

hardwarerelated/headset/sony_wh-1000xm2.txt · Last modified: 2021/04/30 09:47 by chris