Skip to content

Instantly share code, notes, and snippets.

@pojntfx
Last active August 6, 2025 19:57
Show Gist options
  • Save pojntfx/2584299ea44cb5be36f7a0a6d1d6c231 to your computer and use it in GitHub Desktop.
Save pojntfx/2584299ea44cb5be36f7a0a6d1d6c231 to your computer and use it in GitHub Desktop.
Toggle active noise cancelling mode for AirPods on Linux with MagicPodsCore
#!/bin/bash
git clone https://github.com/steam3d/MagicPodsCore.git
cd MagicPodsCore
ls
mkdir -p build
cd build
cmake ..
make -j$(nproc)
./MagicPodsCore
#!/bin/bash
# Also see https://support.apple.com/en-us/102628
# Get all capabilities
echo '{"method":"GetActiveDeviceInfo"}' | websocat ws://localhost:2020 | jq
# Disable all ANC
echo '{"method":"SetCapabilities","arguments":{"address":"40:B3:FA:66:7E:78","capabilities":{"anc":{"selected":1}}}}' | websocat ws://localhost:2020
# Enable passthrough/transparency mode
echo '{"method":"SetCapabilities","arguments":{"address":"40:B3:FA:66:7E:78","capabilities":{"anc":{"selected":2}}}}' | websocat ws://localhost:2020
# Enable adaptive mode
echo '{"method":"SetCapabilities","arguments":{"address":"40:B3:FA:66:7E:78","capabilities":{"anc":{"selected":4}}}}' | websocat ws://localhost:2020
# Enable full ANC
echo '{"method":"SetCapabilities","arguments":{"address":"40:B3:FA:66:7E:78","capabilities":{"anc":{"selected":16}}}}' | websocat ws://localhost:2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment