Skip to content

Latest commit

 

History

History

linux

Folders and files

README.md

Linux Device SDK

This turns any Linux computer, like a Raspberry Pi, into a Muse gadget. Install it, pair it with the Muse app, and Muse can run commands and move files on the machine.

Then make it your own: wire up a sensor, bridge a webhook, or give Muse a new command.

Note: Built by hackers, for hackers, just for fun. Proceed at your own risk! Muse gets the same access to the machine as the account you install it for.

What you need

  • A Raspberry Pi with Bluetooth: a 3B+, 4, 5 or Zero 2 W. Other Linux computers work too, as long as they have Bluetooth LE.
  • Raspberry Pi OS Bullseye or later, Debian 11 or later, Ubuntu 22.04 or later, Arch, Fedora, openSUSE Tumbleweed or Leap 16, or Gentoo (with OpenRC), or Chimera (with dinit), already on your network. Debian/Ubuntu support 32-bit and 64-bit; Arch/Fedora/openSUSE/Gentoo/Chimera require x86_64 or aarch64.
  • Python 3.9 or later, using the distro's Python and Bluetooth bindings.
  • An account with sudo on the machine (doas on Chimera). Chimera doesn't ship bash, which runs the installer: install it first with doas apk add bash.
  • An SDK token from gadgets.muse.ai (Account > SDK tokens). Every gadget needs one to pair, including ones you build for yourself. Read the Gadget SDK Terms before you use it.
  • The Muse app on your phone, to pair the device.

Install

On the machine, as the account Muse should use:

curl -fsSL https://raw.githubusercontent.com/facebookincubator/muse-gadget-sdk/main/linux/install.sh -o install.sh
less install.sh     # read it first
bash install.sh --sdk-token mgst_…

The installer checks your system, installs what it needs into /opt/musegadget, and starts the musegadget service. Before it gives Muse your account, it asks, and tells you if that account can use sudo. Then it opens Bluetooth pairing.

Behind a proxy

If the machine reaches the internet only through an HTTP proxy, give it to the installer:

bash install.sh --sdk-token mgst_… --proxy http://proxy.example:3128

The installer uses the proxy for its own downloads and for pairing, and saves it for the service in /etc/systemd/system/musegadget.service.d/ (on OpenRC, /etc/conf.d/musegadget), in a file only root can read, since the URL can hold a password (http://user:password@host:port). Later runs reuse it. --no-proxy HOSTS lists hosts to reach directly, --proxy none removes the proxy, and --uninstall removes it too.

Avoid a user name or password that needs percent-encoding in the URL, such as p%40ss for p@ss. websockets before 17.2, which the installer uses, sends it still encoded, so pairing works but the proxy refuses the Muse connection with a 407.

sudo drops your shell's proxy settings, so when you run musegadget pair or musegadget doctor yourself, set https_proxy (and no_proxy) and keep them:

sudo --preserve-env=https_proxy,no_proxy musegadget pair

Only HTTP proxies that support CONNECT work, given with their port; SOCKS proxies don't. Video calls send their media directly, not through the proxy.

Set it up with Muse

When the installer says pairing is open, go to the Muse app:

  1. Turn on Settings > Devices > Developer mode.
  2. Add a device (Settings > Devices > Add Device, the + icon in the top right). It shows up as MuseGadgetXXXXXX, with the name the installer printed.
  3. Muse warns that this is a community device. Continue if it's yours.
  4. When asked for Wi-Fi, pick the network shown. The machine is already online, so no password is needed.

That's it: the device connects to Muse and stays connected, across reboots. Pairing is open for 10 minutes. To pair again later, run sudo musegadget pair.

Every setup creates a fresh encrypted session, and pairing only opens when you run the installer or musegadget pair on the machine itself. Because these are community devices, pairing has no manufacturer verification and can't prevent an active man-in-the-middle attack. Set it up on a network you trust.

What Muse can do

Command What it does
system.run Runs a shell command and returns its output and exit code
file.read Reads a file, 64 KB at a time
file.write Writes a file, 64 KB at a time, replacing it only when complete
device.health Reports uptime, load, memory, disk and temperature

Commands run as the account you installed for, with exactly that account's permissions. If it can use sudo, so can Muse.

The service runs at most four commands at once, including commands still running from a disconnected session. Disconnecting does not stop a command that already started; it keeps its slot until it returns. Queued commands from the old session are cancelled. Results from that session are not resent after reconnecting, and the service does not automatically retry those commands.

Ask Muse things like:

What's using all the disk space on my Pi?

Install Home Assistant on my Pi and tell me how to open it.

Every morning at 7, check if my Pi's backups ran and tell me if they didn't.

Realtime voice (WAV first)

On an already paired host, run a call against an exact leased VM ID:

musegadget voice-call --vm-id YOUR_VM_ID --in-wav question.wav --out-wav reply.wav

Input is uncompressed PCM16LE, mono, 24 kHz. The client sends up to 960 samples every 40 ms and writes played reply audio to the output WAV. Initial all-zero media keepalives are omitted; once playback starts, silence is kept to preserve pauses without extending call activity. It does not resample. Input EOF continues a quiet microphone stream (one 960-sample zero frame every 40 ms) so automatic speech endpointing can finish; it sends neither a manual commit nor end-call. Quiet input neither renews activity nor bypasses hold/playback gates. The client keeps receiving until remote hang-up, Ctrl-C, or a 45-second inactivity / 300-second overall timeout. Adjust these with --idle-timeout and --overall-timeout. The VM has one active call: a new call can replace a phone or another device's call. These timers are client behavior, not server-enforced limits for a paired device. Treat output WAVs as private recordings.

Credentials come only from the existing host-local pairing store and the normal VM lookup. --vm-id never changes your account's default VM and never falls back to it. If lookup rejects an expired device token, let the normal musegadget run service refresh it first. Do not copy tokens into command-line arguments. The voice connection uses a voice-only Noise transport: it never opens the control stream or sends link.register, so it cannot replace the normal run service's live transport for the same persistent device identity. That identity is used only for call attribution. Use --thread-id when targeting a particular conversation. Every invocation admits a fresh call; resume/session-ID targeting is not supported.

--app-id defaults to the protocol's hatch-web identity; a configured positive signed 64-bit integer is also accepted. It is sent in the Noise upgrade query, not a per-request header, and stays fixed for that connection. Other SDK sessions keep their existing behavior. The server must admit paired devices to both /voice/realtime and /voice/end-call; a client cannot bypass server admission.

For a microphone and speaker, install the optional extra (and the system PortAudio library), then use --live instead of WAV flags:

python -m pip install 'musegadget[voice]'
musegadget voice-call --vm-id YOUR_VM_ID --live

Half duplex is the default: microphone input is gated during audible playback and a short settling tail. Silent media does not mute the mic or extend idle life. --full-duplex disables this echo protection; use headphones or your own AEC. --mic-threshold 500 optionally filters quiet microphone input by RMS level (0 disables it; range 0–32767). After a 400 ms speech tail, filtered frames become paced zeros, not missing audio, so speech detection still receives silence. The provider owns turn boundaries: neither threshold muting nor EOF sends a manual commit that could detach the final transcript from its speech-start identity. Quiet frames do not extend inactivity. Live capture buffers only the newest 320 ms; input captured while held/gated is discarded rather than replayed later. WAV input pauses instead. Server input-hold events pause appends. Speech-start and VoiceCall.barge_in() flush playback and fence interrupted provider response IDs for the rest of the call. A new caller input and matching turn admit the next reply; a bounded prefix waits for that confirmation. After interruption, missing provider/input lineage stays muted, with no timer-based unmute. ID or audio-buffer exhaustion ends the call rather than forgetting IDs. barge_in() also best-effort cancels a known open mapper response; new speech, not that cancellation, preempts the server's speech model. A delayed background reply without lineage after a confirmed turn cannot be distinguished from that turn's continuation.

The client validates HTTP success and call readiness before uploading audio. It handles both continuous audio and legacy audio-delta records, ignores unknown events, and never treats a cancelled response or a settled turn as call EOF. End-call carries the client call ID, start/end timestamps and admitted thread ID, including on cancellation and remote close. Cleanup has a deadline, and cleanup failures never replace the original call error. A broken connection can prevent an end-call acknowledgment; the SDK does not claim otherwise. This one-shot voice client does not reconnect: the VM may retain the call through its grace windows or another client's takeover until the owner ends it or a new call replaces it.

Limits: response queue 2 MiB / 256 chunks, NDJSON line 1 MiB, one decoded audio event 4 seconds, playback and unconfirmed-reply queues 5 seconds each, upload chunk 64 KiB. Exceeding a bound fails the Linux call instead of accumulating unbounded latency; ESP32 can instead drop an unconfirmed reply and show REPLY MISSED. File and protocol tests are hardware-free. Live sound-device behavior still needs testing on your audio setup.

Server compatibility: this client has no channel for ui.set.voice.end_call. Instead it offers end_call_stop (hatch.voice.capability.offer, right after admission), telling Muse it ends the call on a session_control stop, so Muse can hang up when you say goodbye. A VM that doesn't support that yet ignores the offer, and a spoken goodbye doesn't hang up: use explicit hang-up or the client timers. The SDK honors the existing conversation.item.added / session_control / stop shape on the admitted call's realtime response stream. The item's call_id is a control ID, not the voice call ID; the dedicated stream provides the call boundary. Stops are terminal and processed once, and cleanup ignores subsequent records. On a stop or remote EOF the client drains queued speech for at most 5.2 seconds, then explicitly ends the call. Without that server support, use explicit hang-up or the client idle timer. The SDK adds no server events or permissions itself.

Video calls

Add --video-player (mpv or ffplay, or any command that reads raw H.264 on standard input) or --video-out FILE (raw H.264; - for standard output, which moves the CLI's own messages to standard error) to make a video call:

musegadget voice-call --vm-id YOUR_VM_ID --live --video-player
musegadget voice-call --vm-id YOUR_VM_ID --live --video-out - | ffplay -f h264 -i -

A video call is signaled over the Noise session (/voice/calls/media-endpoint, /voice/calls/join, /voice/end-call) and its media goes straight to Muse's media endpoint as SRTP: Opus audio both ways and Muse's H.264 video, about 1 Mbit/s. It tries UDP and TCP on the same port at once and keeps whichever answers first, so it works where UDP is blocked. Video calls need the system Opus library (apt install libopus0); there is no other dependency beyond cryptography. Half duplex is the default here too: while Muse speaks and for about half a second after, live microphone audio is replaced with silence and WAV input waits. The call ends on the idle or overall timer, when media stops for 10 seconds or the endpoint stops answering connectivity checks for 30, or on Ctrl-C, and always with an explicit end-call. Video never stalls or ends the call: an output that falls behind drops frames and resumes at the next keyframe, and one that fails stops video only. In code, use VideoCall(session, device_id=..., video_output=...) with any object that has a nonblocking write_unit(bytes); voice_video has the CLI's outputs.

Optional Hey Muse wake word

Wake-word listening is off by default. Detection runs in a small native library built from the ESP32 firmware's own wake word runner and model (libmuse_wakeword.so, about 170 KB): TensorFlow Lite Micro's microfrontend, the int8 model through ExecuTorch's ESP-NN delegate, and the detector, on one thread, with no torch or other Python packages at run time. It uses about 0.4% of one core, with the 24 to 16 kHz resampling of its tap. The setup skill is gadget-linux-wakeword, and wakeword/README.md has the details.

From the SDK repository root, preview the setup, then remove --dry-run to install:

bash linux/wakeword/setup.sh --dry-run

The helper installs the voice extra into linux/.venv-wakeword, builds the library (linux/wakeword/build.sh: a C/C++ compiler plus three pinned, checksum-verified ESP Component Registry archives, the same ones the firmware uses), and checks it without opening the microphone, pairing, or restarting the normal service. System prerequisites require the explicit --install-system-packages option; reusing an existing environment requires --reuse-venv; --library FILE uses an already built library.

To check an environment again, without audio or network access:

linux/.venv-wakeword/bin/python -m musegadget.wakeword_check

Enable live listening only when wanted:

linux/.venv-wakeword/bin/musegadget voice-call --vm-id YOUR_VM_ID --live --wake-word

Setup installs the library into the environment (lib/musegadget/), where it is found first; MUSE_WAKEWORD_LIBRARY overrides that, and a checkout run in place falls back to linux/wakeword/build/. Waiting audio stays local. A detection admits the same realtime voice call as above, retaining up to one second of pre-roll at 24 kHz. Only the detector's tap is resampled to 16 kHz; voice upload and playback stay unchanged. Detection is paused throughout the call (including speaker playback and server input holds). A voice call started by a wake word ends if the microphone picks up no speech in the first 5 s of audio after the wake word's pre-roll (the pre-roll holds the wake word itself, so it doesn't count), so a false wake in a quiet room doesn't stream on. After a successful hangup, live mode resets the detector and returns to local listening. Ctrl-C stops it; omit --wake-word or use --no-wake-word for the original immediate-call behavior. The normal musegadget run service never opens the microphone or enables this feature.

--wake-sensitivity low|default|high selects the ESP32 detector's presets. Measured on synthetic voices (held-out text-to-speech voices) and 23.5 hours of real non-wake audio, low wakes falsely about 0.3 times an hour and catches 71% of wake words, default about 0.4 and 74%, high about 1.4 and 80%; real voices and Linux microphones haven't been measured. Each false wake followed by speech starts a call that sends audio until the call ends (by default after 45 quiet seconds). --wake-model PATH selects another model with the bundled model's contract. --wake-timeout SECONDS bounds each local wait; call idle/overall timers start only after activation. WAV mode also accepts --wake-word, runs at most one call, and exits without admitting a call if the file ends before a detection. Audio queued after a detection (the pre-roll and capture from before the call was ready) is sent up to three times faster than real time until it has caught up, so speech doesn't arrive later and later. The queue holds the pre-roll plus every start stage's full limit (VM lookup 15 s, transport 35 s, call readiness 35 s) and a little slack, 91 seconds; a live capture backlog beyond that fails the call closed rather than silently truncating the user's question, and live mode then returns to listening. Startup needs the configured VM to be reachable.

Lifecycle diagnostics

Operation-level server errors after readiness are advisory; they increment VoiceCall.advisory_error_count without logging the server's message or ending the call. Admission errors and explicit session_dead remain fatal. An active hatch.voice.turn_started pauses the idle timer during silent asynchronous work. Settlement must match a known submission ID and caller input item; stale or unidentified settlements cannot clear newer work. A matched settlement gives the idle timer a fresh window. The overall timeout always applies, and tracking is bounded to 64 active and 1,024 settled submissions. Settled identities remain for the whole call; exhaustion fails closed rather than forgetting lineage.

end_call_acknowledged reports a validated end-call response. If media EOF then stalls, a successful bounded stream reset preserves the acknowledged hangup; media_drain_incomplete records that fallback. A missing end-call ACK is still a cleanup failure.

Streaming API

LinkSession.stream_request() exposes independent request and response bodies:

stream = await session.stream_request("POST", "/your-stream")
async with stream:
    await stream.send_body(b'{"message":"hello"}\n')
    await stream.wait_response()  # raises HTTPStatusError on non-2xx
    # Consume response chunks now, before finishing the upload if needed.
    chunk = await stream.read()   # bytes, or None at EOF
    await stream.half_close()     # upload EOF only
    async for chunk in stream:
        consume(chunk)

Use musegadget.streaming.read_ndjson(stream) for bounded fragmented records. Callers own their deadlines (for example asyncio.wait_for) and must close abandoned streams. A slow consumer fails only its stream, not the multiplexed control channel. send_chat() still returns its buffered acknowledgment.

History and user-VM files

On servers that enable these device-token operations, the existing LinkSession.request() API can use GET /chat/history?limit=1, GET /fs/raw/<path> and POST /fs/upload. File paths are relative to the server's file root (percent-encode them in /fs/raw/, except for slashes). No list, stat or deletion API is implied by this access, and POST /fs/read / POST /fs/write are owner-only: a device's credentials get 403 there.

  • Read: GET /fs/raw/gadget-data/example.txt returns the file's raw bytes. Send Range: bytes=0-65535 (and so on) to read it in parts: the reply is a 206 with that range, or a 200 with the whole file.
  • Write: POST /fs/upload with a multipart/form-data body: text fields path (required), overwrite (true or 1 replaces an existing file) and create_parent (missing folders are made unless it is false or 0), then the bytes in a file part. Each upload writes the whole file; there's no append.

Buffered SDK replies are limited to 1 MiB, so use modest ranges and history pages. Keep the acknowledgment from send_chat() when correlating history entries with your request.

Hack and extend it

Programs on the machine can send messages to Muse, with no credentials of their own:

musegadget send-user-msg "The garage door has been open for an hour."
musegadget send-user-msg --session-id 6f1c2d4e-0b7a-4c3e-9f5d-2a8b1e0c7d93 "Posted to a side chat"
musegadget send-user-msg --image porch.jpg "Who is at the door?"

--image attaches a JPEG, PNG, GIF or WebP picture of at most 2 MiB for Muse to look at.

--wait SECONDS (1 to 600) waits that long for Muse's answer and prints it. It exits with status 3 if no answer came in time, or if Muse was still answering (what arrived is printed). On the main chat, Muse's replies don't name the message they answer, so an answer to something sent there at the same moment, from the Muse app say, can be taken for this one. With --session-id the answer comes from that side chat only.

--session-id posts into a side chat: a new id starts one, and reusing it keeps later messages there. examples/pebble_ring_bridge.py is a complete example: a webhook listener that sends every note from a Pebble ring to its own Muse chat.

Gadgets can pass device="mcu-wearable" to LinkSession.send_chat() for dictation or to LinkSession.send_voice() for voice notes. This uses the same device-class hint as ESP32 spoken turns, asking Muse for short plain sentences. The hint applies to that request only. It does not change device_id, registration, or output_modality. Omit it for typed messages and to keep the server's usual reply style.

For an interactive text conversation in your terminal:

musegadget chat
musegadget chat --session-id YOUR_EXISTING_SIDE_CHAT_ID

chat uses the running service's connection and needs the same socket access as send-user-msg, without sudo or credentials of its own. It defaults to your main Muse chat and displays live user messages and assistant replies, including messages sent from the phone or web app while connected. Echoes of messages typed in this terminal are suppressed by their acknowledged message IDs. Type one message per line; you can send follow-ups while Muse is thinking or replying. Messages are sent in typing order, waiting only for each send acknowledgement. Muse decides whether to combine them into one response. The conversation uses compact User: and Muse: lines, with colored speaker labels and word-wrapped text aligned after the label. Colors use the terminal's palette and default background; terminals without color support use bold labels. The input area wraps at word boundaries and grows as you type, staying editable while replies arrive. Drafts taller than the available space scroll vertically to keep the cursor visible. A dim status line beneath it shows waiting, public activity, responding and ready updates. Arrow keys, Home/End and Backspace/Delete edit your message; Page Up/Down scroll the recent transcript. Mouse wheels and touchpad scrolling also move through the transcript in terminals that report mouse events, when supported by Python's curses library. Each wheel event scrolls three lines; Page Up/Down remain available otherwise. The view keeps up to 512 transcript entries and 8192 wrapped lines. Up to 16 messages can wait to be sent; additional input is rejected with a notice. /clear clears the local screen and retained transcript; the conversation stays connected and new replies continue to appear. It does not delete chat history in Muse. Screen clearing is unavailable for redirected output or TERM=dumb. /quit or /exit, Ctrl-C or EOF exits; already submitted work continues in Muse. Queued messages that were not sent are discarded with a notice; an unconfirmed send may already have reached Muse. Streamed replies and final corrections update in place. Interactive terminals use a full-screen view and restore the terminal on exit. Redirected output and TERM=dumb use plain text, with progress printed as lines and corrections labeled when necessary.

Update the installed package and restart the service once to enable terminal chat. Restarting interrupts running device commands, so check the service log for recent invoke lines first. Socket access is limited to root and the configured command account's group. Connection loss or a refused send ends terminal chat; run it again to reconnect. Messages are never automatically resent. This version shows subscription events without fetching chat history, and supports text only. --session-id selects an existing side chat; use send-user-msg first if you need to create one.

A few other ways to build on it:

  • Let Muse do it. Muse can run commands on the machine, so you can ask it to set up the rest: "Write a service that tells me when the Pi gets too hot."
  • Add a command. Give Muse a command of its own, like "switch the pump", without changing the package: see Add your own commands.
  • Build your own gadget. A program on its own hardware can pair, stay connected and talk to Muse through the musegadget package. AGENTS.md lists what it can use.
  • Change the account. bash install.sh --run-as someone gives Muse a different account, such as one without sudo.
  • Change the SDK token. bash install.sh --sdk-token mgst_… replaces it. It's saved in /var/lib/musegadget/sdk_token, readable only by root. Muse records a device's token only when it pairs, so pair again afterwards with sudo musegadget pair --force. Do the same if you revoke the token the device paired with: it can't reach Muse until it pairs with a new one.

Add your own commands

Drop a JSON file in /etc/musegadget/commands.d/, named after the command, and restart the service. pump.set.json:

{
  "description": "Switch the garden pump on or off.",
  "exec": ["/usr/local/bin/pump"],
  "required": {"on": {"type": "boolean", "description": "true to switch it on."}},
  "timeout_ms": 10000
}
sudo systemctl restart musegadget
sudo journalctl -u musegadget | grep commands   # commands from /etc/musegadget/commands.d: pump.set

Muse sees pump.set next to the built-in commands and calls it when you ask for it. The program runs like system.run: as the same account, with no shell, and killed after timeout_ms (default 30 seconds). It gets the parameters as a JSON object on stdin, {"on": true}. Print a JSON object to return it to Muse; any other output comes back as text. Exit non-zero to report an error, with the last captured line on stderr as the reason. Both output streams are retained up to 96 KiB (with JSON escaping accounted for). Once the program itself exits, inherited pipes are drained for at most 0.5 seconds; background descendants do not turn success into a timeout.

  • Names are lowercase words joined by dots, like pump.set. Names starting with system., file., device. or link. are reserved.
  • Parameters go under required and optional, each with a type (string, integer, number, boolean, object or array) and a description. Muse reads the descriptions, so say what each one does.
  • Files and directory: when the service runs as root, both must be owned by root and neither may be group- or world-writable. Directory and file symlinks are refused. Non-root development still permits your own files and directory; MUSEGADGET_COMMANDS_DIR selects it. This is a trust check, not a sandbox or a guarantee against changes by another root process.
  • Bad definitions are diagnosed and skipped individually; other commands remain usable. Diagnostics omit configuration contents and unexpected exception text.
  • Registration: built-ins are kept. Complete custom specs are considered in command-name order, skipping any that would put the serialized link.register (metadata, escaping and four-byte prefix included) above 256 KiB. Later smaller definitions may still fit. Skipped commands are neither advertised nor executable. Check the log for skipping command; a VM registration rejection is still reported as a rejection.

Community device notes

  • RDK X5: Ubuntu ARM64 deployment notes and an optional community touchscreen UI, with its tested configuration and limitations.
  • Raspberry Pi 2: running the gadget on a board with no Bluetooth, by pairing once on another machine and copying the pairing state.

Manage it

sudo musegadget info                     # name, node id, SDK token and pairing state
sudo musegadget doctor                   # read-only setup and connectivity checks
sudo systemctl status musegadget         # is it running?
sudo journalctl -u musegadget -f         # follow the log
sudo musegadget pair                     # pair again
bash install.sh --uninstall              # remove it (add --purge to forget the pairing)

On OpenRC, use sudo rc-service musegadget status and sudo tail -f /var/log/musegadget.log instead.

doctor checks saved pairing credentials, SDK token format, the systemd or OpenRC service, Bluetooth controller power, TCP connectivity to the default Muse API on port 443 (through the proxy, if one is set), and whether the system trust store is safe to use. Each check prints OK, FAIL, or WARN and a next step. It exits with code 1 if any check fails, or 0 otherwise. Bluetooth problems are warnings because Bluetooth is only needed for pairing.

Run it on the gadget with sudo so it can read the root-owned state files. It never changes settings, starts services, opens pairing, or prints tokens. It does not validate credentials online or confirm a live Muse VM session; an active service and reachable API alone do not establish that connection.

Root CAs

musegadget uses the system trust store and checks it for four root CAs linked to eMudhra:

  • Compromised: emSign ECC Root CA - G3, whose intermediates' private keys became public, and Comodo AAA Services root, which cross-signed them. musegadget won't start or connect (exit code 78), and doctor reports FAIL, while the store can't be read or still trusts either. Update the ca-certificates package, then restart musegadget. The installer updates that package, and stops before it downloads uv or musegadget (exit code 78) if the store still trusts one of these roots. openSUSE's store still includes Comodo AAA Services root (for email), so on openSUSE put it in the blocklist, as described below, before installing.
  • Retired: emSign Root CA - C1 and emSign ECC Root CA - C3, which Mozilla removed at eMudhra's request as it retires its dual-purpose roots, not because of a compromise. Some distros' ca-certificates packages still include them. musegadget still connects, but logs a warning, doctor reports WARN, and the installer prints a warning.

To stop trusting the retired roots yourself on Debian, Ubuntu or Raspberry Pi OS, put ! in front of their lines in /etc/ca-certificates.conf (change the existing lines rather than adding new ones), then rebuild the store:

sudo sed -i -e 's|^mozilla/emSign_Root_CA_-_C1\.crt$|!&|' \
    -e 's|^mozilla/emSign_ECC_Root_CA_-_C3\.crt$|!&|' /etc/ca-certificates.conf
sudo update-ca-certificates

sudo dpkg-reconfigure ca-certificates lets you deselect them interactively instead. On Fedora and Arch, put a copy of each certificate in the p11-kit blocklist (/etc/pki/ca-trust/source/blocklist/ on Fedora, /etc/ca-certificates/trust-source/blocklist/ on Arch), then run sudo update-ca-trust. On openSUSE, put them in /etc/pki/trust/blocklist/ and run sudo update-ca-certificates. The PEM block for each root, under its name, is in tests/vectors/distrusted_roots.pem.

Develop

From this directory, with uv:

uv run --with pytest --with . pytest

The tests run anywhere, with no Bluetooth or Muse needed. To try a change on a device, copy this directory to it and run bash install.sh --from ..

Community

Meet other hackers who are building and customizing Muse gadgets in our community Discord. Get inspired, support each other, and share what you make.

License

Apache 2.0. See LICENSE.