BLE RC uses a TOML configuration file located at ~/.config/blerc/config.toml.
mkdir -p ~/.config/blerc
cp config/config.example.toml ~/.config/blerc/config.toml
[bluetooth]Bluetooth adapter and BLE advertising settings.
| Key | Type | Default | Description |
|---|---|---|---|
adapter |
string | "hci0" |
Bluetooth adapter name |
device_name |
string | "BLE-RC" |
Advertised device name |
service_uuid |
string | "6e400001-b5a3-f393-e0a9-e50e24dcca9e" |
GATT service UUID (NUS default) |
auth_mode |
string | "none" |
Authentication: "none" or "passkey" |
Example:
[bluetooth]
adapter = "hci0"
device_name = "My-Pi-RC"
auth_mode = "none"
[logging]Logging verbosity and debug output.
| Key | Type | Default | Description |
|---|---|---|---|
level |
string | "info" |
Log level: trace/debug/info/warn/error |
show_dbus |
bool | false |
Log D-Bus method calls and signals |
show_ble |
bool | false |
Log BLE connection and characteristic events |
[http]HTTP client settings for HTTP-type apps.
| Key | Type | Default | Description |
|---|---|---|---|
base_url |
string | "http://localhost:8080" |
Base URL for HTTP apps |
timeout_ms |
int | 5000 |
Request timeout (ms) |
Apps are defined using [[apps]] arrays. Two types are supported: CLI and HTTP.
Execute local commands with templated parameters.
| Key | Type | Required | Description |
|---|---|---|---|
name |
string | ✓ | Unique app identifier |
type |
string | "cli" (default) |
|
path |
string | ✓ | Path to executable |
params |
array | CLI arguments with {placeholder} templating |
|
env |
table | Environment variables with templating |
Examples:
# Simple command
[[apps]]
name = "hostname"
type = "cli"
path = "/bin/hostname"
# Templated parameters
[[apps]]
name = "echo"
type = "cli"
path = "/bin/echo"
params = ["Hello", "{name}"]
# With environment variables
[[apps]]
name = "env-demo"
type = "cli"
path = "/usr/bin/env"
env = { DEMO_VAR = "Hello from BLE", USER_INPUT = "{input}" }
Make HTTP requests to REST APIs.
| Key | Type | Required | Description |
|---|---|---|---|
name |
string | ✓ | Unique app identifier |
type |
string | ✓ | "http" |
method |
string | HTTP method: GET/POST/PUT/DELETE | |
endpoint |
string | ✓ | URL path (appended to base_url) |
body_template |
string | JSON body with {placeholder} templating |
Example:
[[apps]]
name = "api-notify"
type = "http"
method = "POST"
endpoint = "/api/notify"
body_template = '{"message": "{message}", "priority": "{priority}"}'
Apps can have persistent variables stored at ~/.config/blerc/<app_name>/config.toml. These variables:
Variable file example (~/.config/blerc/volume_control/config.toml):
default_step = 5
max_volume = 100
device_name = "Living Room Speakers"
Supported types: string, integer, float, boolean.
See PROTOCOL.md for variable management commands.
blerc [OPTIONS]
Options:
-c, --config <PATH> Config file path [default: ~/.config/blerc/config.toml]
-d, --debug Enable debug logging
-a, --adapter <NAME> Bluetooth adapter [default: hci0]
-h, --help Print help
CLI options override config file values.