Skip to content

mos9527/SonyHeadphonesClient

 
 

Repository files navigation

SonyHeadphonesClient

A spiritual successor to Plutoberth's original SonyHeadphonesClient - now with standardized support for newer devices and more platforms.

There's no release build yet - but you can always grab the latest nightly builds, or use the Web Version.

Build Nightly Builds

Roadmap

This brach is expected to be merged once the following features have been implemented.

  • Support for legacy (v1 protocol) devices, e.g. WH-1000XM4, WH-1000XM3
  • Native macOS platform support

Compatiblity

The following platforms (applies to libmdr, client) are natively supported with first-party effort.

Platform Support Status Maintainers
Windows Full Support @mos9527, @Amrsatrio
Linux Full Support @mos9527
Web (Emscripten) Full Support @mos9527

For device support, refer to docs/device-support to check. If the feature support status for your own device is missing/incorrect/untested here, feel free to submit an Issue so we can work on it!

Notes on Web Platform

The client app is available as a Progressive Web App with exact UI/Feature parity seen in other platforms.

Live version is available at: https://mos9527.com/SonyHeadphonesClient/

A Web Serial supporting browser is required - with a minor exception of Chrome on Android where Web serial over Bluetooth on Android is supported as of Android build 138. You can expect the app to work on all reasonably new Desktop Chrome browsers, and the latest Android Chrome builds.

As always, status reports are welcome - please do submit an Issue if your browser supports the Web version of the client app.

For Developers

We have extensive documentations available in the source files. Moreover, refer to the respective README files in each source folder to understand what they do!

A C++20 compliant compiler is required. GCC 14, Clang 21 and MSVC 19 has been used for development and are guanrateed to be supported.

Building (Regular CMake)

This is no different from your regular CMake projects. Third-party dependencies (see contrib) are managed by CMake's FetchContent and are always statically linked, so no worries - Expect things to just work.

For Developers: See also tooling for codegen dependencies.

Building on Linux

You need DBus and BlueZ development packages installed.

  • Debian (Ubuntu): sudo apt install libbluetooth-dev libdbus-1-dev
  • Fedora: sudo dnf install bluez-libs-devel dbus-devel
  • Arch Linux: sudo pacman -S bluez dbus

For Developers: You may want to have bluez-tools/bluez-utils installed for testing.

Example

mkdir build
cd build
cmake ..
cmake --build . --target SonyHeadphonesClient

Building (emscripten)

  • Install the SDK with emsdk and verify your installation - https://emscripten.org/docs/getting_started/downloads.html
  • Run emcmake cmake ... in place of configuration.
    • Or, set up CMake Toolchain variables manually with e.g. -DCMAKE_TOOLCHAIN_FILE=/usr/lib/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/usr/lib/emsdk/node/20.18.0_64bit/bin/node
  • No extra dependencies are required.
  • Example usage
mkdir build
cd build
emcmake cmake ..
cmake --build . --target SonyHeadphonesClient
  • Run the generated page with emrun client/index.html - or host it with any static HTTP server.

IntelliJ CLion/Rider (emscripten)

Set up CMake Toolchain variables with a new CMake Profile (in CMake options) - you can then build from there and serve the static content within <build directory>/client/ with any static HTTP server.

Platform Quirks

Linux

On Linux, you may not see player metadata (track title, artist, etc.) despite correct output from playerctl metadata command while your device having proper AVRCP support (e.g. works on other platforms).

About

Cross-platform Sony Sound Connect (formerly Headphones Connect) implementation / 索尼 Sound Connect 第三方实现

Topics

Resources

Stars

Watchers

Forks

Languages

  • C++ 98.5%
  • Other 1.5%