Skip to content
Ilyas Zahaf Kradra
All projects

xm4-control

A Windows 11 app to control Sony WH-1000XM4 headphones from your PC, without Sony's mobile app.

Platform
Windows 11
Stack
C#, .NET 10, WinUI 3
License
Open source, MIT
xm4-control's main window: current mode, 3D headphones and quick settings

Why this project

Sony only offers its Headphones Connect app, now Sound Connect, on phones. On a Windows PC, there's no way to switch modes or adjust the equalizer.

And as soon as a video call opens the microphone, Windows switches the headphones to hands-free mode and the sound degrades. xm4-control solves both problems with a real desktop app.

What the app does

xm4-control's panel above the Windows clock: mode, battery, noise canceling and ambient sound

Sound stays in stereo during calls

A Mic switch turns off Windows' hands-free profile: the headphones keep stereo sound when Teams, Discord or Zoom open the microphone.

Everything from the taskbar

A native panel above the clock shows the mode and battery, and gives access to noise canceling, ambient sound and the equalizer. The Ctrl + Alt + N shortcut cycles through the modes.

Every headphone setting

Five-band equalizer and Sony presets, Clear Bass, NC Optimizer, Speak-to-Chat, DSEE Extreme, pause when you take the headphones off, battery alert at 20%.

A command line for scripts

The xm4 tool controls the headphones from a terminal.

xm4 ncxm4 eq BassBoostxm4 mic off

Under the hood

Architecture
C# on .NET 10, in three projects: a shared core, the WinUI 3 app and the command-line tool, with their tests.
Interface
The taskbar panel is native WinUI 3. The main window is HTML and CSS in WebView2, with a 3D model of the headphones rendered by three.js. It comes in French and English, following the Windows language.
Bluetooth
Communication goes through Win32 RFCOMM sockets. I documented in the README the protocol Sony uses to control the headphones.
Delivery
GitHub Actions builds and tests the project, then publishes both executables with each new release.

Stepping outside my stack

Day to day, I write Java and TypeScript. C#, .NET and WinUI 3 aren't part of my stack, and I don't claim to master them.

I relied on Claude Code to learn this ecosystem as the project went along, while keeping control of the architecture and the technical choices. That's how I use AI: not to code for me, but to take on a new subject without waiting to know everything.

Try it

Download Xm4Control.exe from the GitHub Releases and run it: .NET is included, there's nothing else to install.

All projects