MIDI-BLE-RTD(1)

NAME
midi-ble-rtd - ALSA Sequencer to BLE-MIDI daemon

SYNOPSIS
midi-ble-rtd --config DIR
midi-ble-rtd --config-dir DIR
midi-ble-rtd -v|--version
midi-ble-rtd -vv|--version-verbose

DESCRIPTION
midi-ble-rtd runs the midi-ble-rt daemon. It bridges ALSA Sequencer MIDI ports to configured BLE-MIDI devices through BlueZ GATT.

The daemon uses configuration-directory mode only. One daemon process owns one BlueZ system-bus connection, one ALSA Sequencer client, and one runtime session per configured BLE-MIDI device. Each configured device gets a stable ALSA port inside the daemon's ALSA client. Normal BLE disconnect/reconnect cycles change session state but do not recreate the local ALSA port.

OPTIONS

--config DIR
    Load daemon configuration from DIR. The directory must contain daemon.ini and a devices.d subdirectory with one or more *.ini device files.

--config-dir DIR
    Alias for --config.

-v, --version
    Print daemon version and exit.

-vv, --version-verbose
    Print version plus compiled feature summary and exit.

CONFIGURATION
The daemon expects a directory layout similar to:

~/.config/midi-ble-rt/
  daemon.ini
  devices.d/
    controller.ini

Common daemon.ini keys:

[defaults].pair
    Pair configured devices by default.

[defaults].trust
    Set BlueZ Trusted=true by default.

[defaults].reconnect_on_link_loss
    Reconnect sessions after BLE link loss.

[defaults].enable_tx
    Enable ALSA-to-BLE MIDI transmit path by default.

[gatt].service_uuid
    BLE-MIDI service UUID. The default is the standard BLE-MIDI service UUID.

[gatt].io_uuid
    BLE-MIDI I/O characteristic UUID. The default is the standard BLE-MIDI I/O UUID.

[gatt].io_uuid_alias
    Optional alternate characteristic UUID, used for device-specific aliases.

[gatt].require_notify
    Require notification support on the selected BLE-MIDI characteristic.

[gatt].require_write_without_response
    Require Write Without Response support for TX.

[daemon].client_name
    ALSA Sequencer client name. Default: midi-ble-rt.

[alsa].port_name
    Default ALSA port name for configured devices.

[stats].enabled
    Enable runtime stats.tsv export.

[stats].interval_ms
    Stats export interval in milliseconds.

[stats].latency_diagnostics
    Enable runtime latency.tsv diagnostics export.

[realtime].rtkit
    Request RTKit realtime scheduling.

[realtime].realtime_rx
    Apply RTKit to RX worker threads when RTKit is enabled. Default: yes.

[realtime].realtime_tx
    Apply RTKit to TX worker threads when RTKit is enabled. Default: no.

[realtime].rt_priority
    RTKit realtime priority. The daemon clamps the value to its supported range.

Common devices.d/*.ini keys:

[device].id
    Stable local device identifier used by midi-ble-rtctl daemon-connect and related commands.

[device].address
    Bluetooth device address.

[device].name
    Human-readable device name.

[device].profile
    Device profile name. Use standard_ble_midi for generic BLE-MIDI devices or a specific profile such as roland_gokeys when a quirk is required.

[device].alsa_port_name
    ALSA port name for this configured device.

[device].enabled
    Whether this device config is active.

[device].connect_on_start
    Connect this configured device during daemon startup.

[policy].pair
    Override default pairing policy for this device.

[policy].trust
    Override default BlueZ trust policy for this device.

[policy].reconnect_on_link_loss
    Override default reconnect policy for this device.

[midi].enable_tx
    Override default ALSA-to-BLE transmit policy for this device.

RUNTIME FILES
By default the daemon writes runtime files below $XDG_RUNTIME_DIR/midi-ble-rt, or below the system temporary directory if XDG_RUNTIME_DIR is not set.

control.sock
    Local control socket used by midi-ble-rtctl.

stats.tsv
    Runtime packet, byte, drop, queue, and session statistics.

latency.tsv
    Optional latency diagnostics file when enabled in configuration.

EXAMPLES
Start the daemon with the user's configuration directory:

midi-ble-rtd --config ~/.config/midi-ble-rt

Show verbose daemon version and feature defaults:

midi-ble-rtd -vv

SEE ALSO
midi-ble-rtctl(1), aconnect(1), aplaymidi(1), aseqdump(1)

BUGS
Report bugs at the project repository: https://github.com/mwprado/midi-ble-rt.