I want to connect SONY headphones WH-1000XM4 with LDAC on ubuntu 20.04! !!

Hello, If you wait! This time, I connected Sony's WH-1000XM4 headphones released on September 4, 2020 with LDAC, so I would like to write about what I did!

Device information

OS ubuntu 20.04
Window manager i3 wm

bluetooth connection

This time I connected using bluetoothctl. Let's do it right away!

$ $ sudo apt install bluez #Install the bluetoothctl command used this time(Not needed if already)
$ bluetoothctl #Execute interactive command
[bluetooth]# power on #Power on the controller(Off by default)
[bluetooth]# scan on #Start scanning the device(It will be amazing if you do it outside w)
[new]Device MAC address... #Devices that can be recognized from the PC come out in a row
[bluetooth]#pair MAC address#Pair the device with the MAC address
Attempting to pair with MAC address#Try pairing with a device with a MAC address
[CHG]Device MAC address Connected: yes
...
Pairing successful #Success if this is displayed(If you have already paired, it will be Failed)
[bluetooth]#connect MAC address#Connect to paired devices
[CHG]Device MAC address Connected: yes
Connection successful #This and the character before the command input[bluetooth]From[Device name]Success if it changes to
[Device name]# exit

If you want to connect WH_1000XM4, please select the device name WH-1000XM4! Choosing another LE_WH_1000XM4 doesn't work! be careful!

The connection is closed! Finally I will write where I stumbled w

Install LDAC

You can install it by executing the following command, so let's do it!

$ sudo add-apt-repository ppa:berglh/pulseaudio-a2dp
$ sudo apt update
$ sudo apt install libldac pulseaudio-modules-bt
$ sudo apt install libavcodec-extra58 libfdk-aac1 bluez pulseaudio
$ sudo apt install blueman
$ pulseaudio -k
$ pulseaudio --start

About pulseaudio

Setting up the connection with LDAC

You can check the settings of the currently connected audio device with the following command, so let's do it!

$ pacmd list-cards
...
    index: 2
        name: <bluez_card.94_DB_56_88_DA_AC>
        driver: <module-bluez5-device.c>
        owner module: 24
        properties:
                device.description = "WH-1000XM4"
                device.string = "94:DB:56:88:DA:AC"
                device.api = "bluez"
                device.class = "sound"
                device.bus = "bluetooth"
                device.form_factor = "headset"
                bluez.path = "/org/bluez/hci0/dev_94_DB_56_88_DA_AC"
                bluez.class = "0x240404"
                bluez.alias = "WH-1000XM4"
                device.icon_name = "audio-headset-bluetooth"
                device.intended_roles = "phone"
        profiles:
                headset_head_unit: Headset Head Unit (HSP/HFP) (priority 30, available: unknown)
                a2dp_sink_sbc: High Fidelity Playback (A2DP Sink: SBC) (priority 40, available: unknown)
                a2dp_sink_aac: High Fidelity Playback (A2DP Sink: AAC) (priority 40, available: unknown)
                a2dp_sink_aptx: High Fidelity Playback (A2DP Sink: aptX) (priority 40, available: no)
                a2dp_sink_aptx_hd: High Fidelity Playback (A2DP Sink: aptX HD) (priority 40, available: no)
                a2dp_sink_ldac: High Fidelity Playback (A2DP Sink: LDAC) (priority 40, available: yes)
                off: Off (priority 0, available: yes)
        active profile: <a2dp_sink_ldac>
        sinks:
                bluez_sink.94_DB_56_88_DA_AC.a2dp_sink/#2: WH-1000XM4
        sources:
                bluez_sink.94_DB_56_88_DA_AC.a2dp_sink.monitor/#4: Monitor of WH-1000XM4
        ports:
                headset-output: Headset (priority 0, latency offset 0 usec, available: yes)
                        properties:

                headset-input: Headset (priority 0, latency offset 0 usec, available: unknown)
                        properties:

This sample is in my condition, so it will change If there is no ldac column in profiles in this, it can not be installed above, so let's try again! If there is a available is no, unfortunately it cannot be used ... You can definitely use yes. However, you can't know unless you specify unknown, so let's specify it with the command if you want to use unknown!

$ pacmd set-card-profile 'index number' a2dp_sink_ldac

For the index number, delete'' and specify the number. In my case, it is 2! a2dp_sink_ldac can be specified as long as it is in profiles! If there are no particular errors, it is a success!

That's all! !! good job! !! I would like to write the last addictive part w

A story squeezed by WH-1000XM4 for a day

As you may have noticed from the above article, when connecting with bluetoothctl, I chose LE_WH_1000XM as eternal without knowing anything and spent a day w I would like to explain why it melted with this!

What is LE in the head?

What is this LE? I think there are many people who have doubts, so I will explain it!

This is a wireless PAN technology called Bluetooth Low Energy. This is a low power communication mode added from Bluetooth 4.0 and consists of Bluetooth Basic Rate / Enhanced Data Rate (BR / EDR) and Bluetooth Low Energy (LE). The communication speed is 1 Mbps for Bluetooth 4, 2 Mbps, 1 Mbps, 500 kbps, 125 bps for 5 but it is about 10 kbps due to various restrictions. Since we are focusing on power saving, such a result It is natural that the power consumption is low if the communication speed is minimized! w Also, the reachable distance can be set to 30m or more, but it is actually about 5m for the same reason as the communication speed. As an aside, if the communication speed is set to 125kbps with Bluetooth 5, the maximum reachable distance Seems to be a compound with 400m w

At the end

This time it ends like this! It hasn't been so long since it arrived, but this is the best! QOL explosion! !! w By the way, I made a reservation in the middle of August and got it at the fastest speed! w

Thank you for watching till the end! If I have time, I'm thinking of writing the equalizer settings in ubuntu 20.04, so please take a look there if you like!

References

Recommended Posts

I want to connect SONY headphones WH-1000XM4 with LDAC on ubuntu 20.04! !!
I want to install PHP 7.2 on Ubuntu 20.04.
I want to redirect sound from Ubuntu with xrdp
I want to use screen sharing on the login screen on Ubuntu 18
I want to add a browsing function with ruby on rails
Connect to Amazon EC2 with SSH (Ubuntu)
I want to display background-ground-image on heroku.
I want to use DBViewer with Eclipse 2018-12! !!
Serially connect to Ubuntu on Raspberry Pi
I want to mess with Permission of Windows directory from WSL (ubuntu)
I want to test Action Cable with RSpec test
I want to use java8 forEach with index
I want to play with Firestore from Rails
I want to perform aggregation processing with spring-batch
[Rails] I want to load CSS with webpacker
I want to use NetBeans on Mac → I can use it!
I started MySQL 5.7 with docker-compose and tried to connect
I want to dark mode with the SWT app
I want to monitor a specific file with WatchService
I want to authenticate users to Rails with Devise + OmniAuth
[Android Studio] I want to use Maven library on Android
I want to transition screens with kotlin and java!
I want to hit the API with Rails on multiple docker-composes set up locally
I want to get along with Map [Java beginner]
I want to simplify the log output on Android
I want to connect to Heroku MySQL from a client
Implemented a strong API for "I want to display ~~ on the screen" with simple CQRS
I want to push an app made with Rails 6 to GitHub
I want to make a list with kotlin and java!
I want to make a function with kotlin and java!
Even in Java, I want to output true with a == 1 && a == 2 && a == 3
I want to put the JDK on my Mac PC
I tried to automate LibreOffice Calc with Ruby + PyCall.rb (Ubuntu 18.04)
I want to manually send an authorization email with Devise
I want to distinct the duplicated data with has_many through
I want to implement various functions with kotlin and java!
I want to pass the startup command to postgres with docker-compose.
[Java] I want to test standard input & standard output with JUnit
I want to convert characters ...
Connect to DB with Java
Connect to MySQL 8 with Java
Connect to oracle with eclipse!
Results of trying to use NVENC (CUDA) with Ubuntu 18.04 on WSL2
I want to make a button with a line break with link_to [Note]
I want to convert an array to Active Record Relation with Rails
I want to hook log file generation / open with log4j # FileAppender
I want to use swipeback on a screen that uses XLPagerTabStrip
I just want to write Java using Eclipse on my Mac
I want to return to the previous screen with kotlin and java!
Ubuntu on WSL2: Cannot connect to the Docker daemon at unix
I want to INSERT Spring Local Time with MySQL Time (also milliseconds)
I want to avoid OutOfMemory when outputting large files with POI
A note when I was addicted to converting Ubuntu on WSL1 to WSL2
I want to operate cron with GUI, so I will install Dkron
I want to add the disabled option to f.radio_button depending on the condition
How to install Adopt OpenJDK on Debian, Ubuntu with apt (-get)
[Java] I want to perform distinct with the key in the object
[Rails] I want to add data to Params when transitioning with link_to
I want to perform asynchronous processing and periodic execution with Rail !!!
Install Ubuntu Server 20.04 in VirtualBox on Mac and connect with SSH
I want to extract between character strings with a regular expression