Get the FREE Ultimate OpenClaw Setup Guide →
I

Bluetooth

Scanned

@ivangdavila

npx machina-cli add skill @ivangdavila/bluetooth --openclaw
Files (1)
SKILL.md
2.0 KB

Core Workflow

  1. Scan — Discover nearby devices
  2. Identify — Match against known profiles or learn new device
  3. Connect — Establish link with appropriate protocol
  4. Execute — Send commands, read data, manage state
  5. Learn — Update device profile based on interaction success/failure

Quick Reference

NeedLoad
CLI commands by platformtools.md
Device profile managementprofiles.md
Security rules and warningssecurity.md
Patterns by use caseuse-cases.md

Workspace

Store device profiles and interaction history:

~/bluetooth/
├── profiles/         # Known device configs (one file per device)
├── history.md        # Interaction log with success/failure
└── pending.md        # Devices discovered but not profiled

Critical Rules

  1. Never auto-connect to unknown devices — require explicit user confirmation
  2. Whitelist first — only interact with pre-authorized devices
  3. Log everything — every connection attempt, command, result
  4. Fail gracefully — if device unreachable, retry with backoff, then report
  5. Profile learning — when something works, save it; when it fails, note why

Platform Detection

OSPrimary ToolFallback
Linuxbluetoothctlhcitool, gatttool
macOSblueutilsystem_profiler, CoreBluetooth
WindowsWinRT/PowerShellpnputil for enumeration
Cross-platformBleak (Python)Noble (Node.js)

Device Interaction Pattern

1. Check ~/bluetooth/profiles/ for device
2. If known → load profile, use saved commands
3. If unknown → scan characteristics, discover capabilities
4. Execute requested action
5. Verify result (read state, check acknowledgment)
6. Update profile: what worked, what failed, timing

Source

git clone https://clawhub.ai/ivangdavila/bluetoothView on GitHub

Overview

This skill enables discovering, connecting, and controlling Bluetooth devices while automatically learning and updating device profiles. It follows a core five-step workflow (Scan, Identify, Connect, Execute, Learn) and uses cross-platform tools to manage devices from a central workspace.

How This Skill Works

It scans for nearby devices, identifies them against known profiles or learns new ones, establishes a connection using the appropriate protocol, executes requested actions, and then updates the device profile based on success or failure. Profiles and history are stored under ~/bluetooth/profiles with dedicated history.md and pending.md files, while all activity is logged to support auditing and troubleshooting.

When to Use It

  • When adding a new Bluetooth device that isn't yet profiled and you want to generate a reusable profile.
  • When working across Linux, macOS, and Windows using platform-specific tools or cross-platform libraries.
  • When requiring explicit user confirmation before connecting to unknown devices.
  • When issuing commands to a device and needing to verify results and refine its profile.
  • When auditing device interactions and maintaining a history of connections and actions.

Quick Start

  1. Step 1: Scan for nearby devices and identify whether they have existing profiles or are new.
  2. Step 2: If known, load the profile; if unknown, perform characteristic discovery to learn capabilities.
  3. Step 3: Connect, execute the requested action, verify the result, and let the Learn step update the profile accordingly.

Best Practices

  • Never auto-connect to unknown devices; require explicit user confirmation.
  • Whitelist pre-authorized devices first and restrict interactions accordingly.
  • Log every connection attempt, command, and result for traceability.
  • Fail gracefully with backoff on unreachable devices and report outcomes clearly.
  • Use the Learn phase to update profiles after successful interactions and note reasons for failures.

Example Use Cases

  • Pair and control a Bluetooth speaker by loading its known profile and issuing playback commands.
  • Discover and learn a BLE heart-rate monitor, then adapt commands based on characteristics.
  • Debug a BLE environmental sensor by exploring characteristics and updating the profile with capabilities.
  • Manage multiple headsets across Linux, macOS, and Windows with consistent profiles.
  • Audit device interactions by reviewing history.md and pending.md when profiling new devices.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers