simpleaible 0.14.1.dev77__tar.gz → 0.14.1.dev79__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/PKG-INFO +7 -2
- {simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/README.rst +6 -1
- {simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/pyproject.toml +9 -1
- simpleaible-0.14.1.dev79/src/simpleaible/cli.py +125 -0
- simpleaible-0.14.1.dev79/src/simpleaible/skills/simpleaible/SKILL.md +32 -0
- simpleaible-0.14.1.dev79/src/simpleaible/skills/simpleaible/references/REFERENCE.md +46 -0
- simpleaible-0.14.1.dev79/src/simpleaible/skills/simpleaible/references/examples.md +77 -0
- simpleaible-0.14.1.dev79/src/simpleaible/skills/simpleaible/references/troubleshooting.md +33 -0
- {simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/src/simpleaible.egg-info/PKG-INFO +7 -2
- {simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/src/simpleaible.egg-info/SOURCES.txt +6 -1
- {simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/src/simpleaible.egg-info/entry_points.txt +1 -0
- {simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/setup.cfg +0 -0
- {simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/src/simpleaible/__init__.py +0 -0
- {simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/src/simpleaible/http.py +0 -0
- {simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/src/simpleaible/mcp.py +0 -0
- {simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/src/simpleaible/py.typed +0 -0
- {simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/src/simpleaible.egg-info/dependency_links.txt +0 -0
- {simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/src/simpleaible.egg-info/requires.txt +0 -0
- {simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/src/simpleaible.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: simpleaible
|
|
3
|
-
Version: 0.14.1.
|
|
3
|
+
Version: 0.14.1.dev79
|
|
4
4
|
Summary: SimpleAIBLE is an AI-friendly BLE toolkit (MCP server & REST API) powered by SimplePyBLE.
|
|
5
5
|
Author-email: Kevin Dewald <kevin@simpleble.org>
|
|
6
6
|
Project-URL: Homepage, https://github.com/simpleble/simpleble
|
|
@@ -85,7 +85,12 @@ See the `HTTP Server docs`_ for the full API reference.
|
|
|
85
85
|
Agent Skills
|
|
86
86
|
------------
|
|
87
87
|
|
|
88
|
-
Install the SimpleAIBLE skill to give your AI agent built-in knowledge of BLE workflows
|
|
88
|
+
Install the SimpleAIBLE skill to give your AI agent built-in knowledge of BLE workflows.
|
|
89
|
+
The bundled installer detects Claude Code and Codex automatically: ::
|
|
90
|
+
|
|
91
|
+
simpleaible install
|
|
92
|
+
|
|
93
|
+
Run ``simpleaible uninstall`` to remove the skill again. For other agents, use the ``skills`` CLI: ::
|
|
89
94
|
|
|
90
95
|
npx skills add https://github.com/simpleble/simpleble --skill simpleaible
|
|
91
96
|
|
|
@@ -58,7 +58,12 @@ See the `HTTP Server docs`_ for the full API reference.
|
|
|
58
58
|
Agent Skills
|
|
59
59
|
------------
|
|
60
60
|
|
|
61
|
-
Install the SimpleAIBLE skill to give your AI agent built-in knowledge of BLE workflows
|
|
61
|
+
Install the SimpleAIBLE skill to give your AI agent built-in knowledge of BLE workflows.
|
|
62
|
+
The bundled installer detects Claude Code and Codex automatically: ::
|
|
63
|
+
|
|
64
|
+
simpleaible install
|
|
65
|
+
|
|
66
|
+
Run ``simpleaible uninstall`` to remove the skill again. For other agents, use the ``skills`` CLI: ::
|
|
62
67
|
|
|
63
68
|
npx skills add https://github.com/simpleble/simpleble --skill simpleaible
|
|
64
69
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "simpleaible"
|
|
7
|
-
version = "0.14.1-
|
|
7
|
+
version = "0.14.1-dev79"
|
|
8
8
|
description = "SimpleAIBLE is an AI-friendly BLE toolkit (MCP server & REST API) powered by SimplePyBLE."
|
|
9
9
|
readme = "README.rst"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -36,6 +36,14 @@ dependencies = [
|
|
|
36
36
|
[project.scripts]
|
|
37
37
|
simpleaible-mcp = "simpleaible.mcp:main"
|
|
38
38
|
simpleaible-http = "simpleaible.http:main"
|
|
39
|
+
simpleaible = "simpleaible.cli:main"
|
|
39
40
|
|
|
40
41
|
[tool.setuptools.packages.find]
|
|
41
42
|
where = ["src"]
|
|
43
|
+
|
|
44
|
+
[tool.setuptools.package-data]
|
|
45
|
+
simpleaible = [
|
|
46
|
+
"py.typed",
|
|
47
|
+
"skills/*/SKILL.md",
|
|
48
|
+
"skills/*/references/*.md",
|
|
49
|
+
]
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"""Command-line entry point for SimpleAIBLE.
|
|
2
|
+
|
|
3
|
+
Running ``simpleaible`` with no subcommand starts the MCP server (stdio
|
|
4
|
+
transport by default), so the bare command remains a valid MCP server
|
|
5
|
+
invocation for agent configurations. The ``install`` and ``uninstall``
|
|
6
|
+
subcommands manage the bundled agent skill for locally detected agents.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import argparse
|
|
12
|
+
import shutil
|
|
13
|
+
import sys
|
|
14
|
+
from dataclasses import dataclass
|
|
15
|
+
from importlib import resources
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
from typing import List
|
|
18
|
+
|
|
19
|
+
SKILL_NAME = "simpleaible"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@dataclass(frozen=True)
|
|
23
|
+
class Agent:
|
|
24
|
+
key: str
|
|
25
|
+
display_name: str
|
|
26
|
+
executable: str
|
|
27
|
+
config_dir: Path
|
|
28
|
+
|
|
29
|
+
@property
|
|
30
|
+
def skill_dir(self) -> Path:
|
|
31
|
+
return self.config_dir / "skills" / SKILL_NAME
|
|
32
|
+
|
|
33
|
+
def detected(self) -> bool:
|
|
34
|
+
return self.config_dir.is_dir() or shutil.which(self.executable) is not None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _known_agents() -> List[Agent]:
|
|
38
|
+
home = Path.home()
|
|
39
|
+
return [
|
|
40
|
+
Agent(key="claude", display_name="Claude Code", executable="claude", config_dir=home / ".claude"),
|
|
41
|
+
Agent(key="codex", display_name="Codex", executable="codex", config_dir=home / ".codex"),
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _select_agents(requested: List[str]) -> List[Agent]:
|
|
46
|
+
agents = _known_agents()
|
|
47
|
+
if requested:
|
|
48
|
+
# Explicitly requested agents are used even if not auto-detected.
|
|
49
|
+
return [agent for agent in agents if agent.key in requested]
|
|
50
|
+
return [agent for agent in agents if agent.detected()]
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def _bundled_skill_path() -> Path:
|
|
54
|
+
skill = resources.files(__package__) / "skills" / SKILL_NAME
|
|
55
|
+
path = Path(str(skill))
|
|
56
|
+
if not (path / "SKILL.md").is_file():
|
|
57
|
+
raise FileNotFoundError(f"Bundled skill not found at {path}")
|
|
58
|
+
return path
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def install_skills(requested: List[str]) -> int:
|
|
62
|
+
agents = _select_agents(requested)
|
|
63
|
+
if not agents:
|
|
64
|
+
print("No supported agents detected (looked for Claude Code and Codex).")
|
|
65
|
+
print("Use --agent to target one explicitly, or install manually:")
|
|
66
|
+
print(" npx skills add https://github.com/simpleble/simpleble --skill simpleaible")
|
|
67
|
+
return 1
|
|
68
|
+
|
|
69
|
+
source = _bundled_skill_path()
|
|
70
|
+
for agent in agents:
|
|
71
|
+
target = agent.skill_dir
|
|
72
|
+
target.parent.mkdir(parents=True, exist_ok=True)
|
|
73
|
+
shutil.copytree(source, target, dirs_exist_ok=True)
|
|
74
|
+
print(f"Installed '{SKILL_NAME}' skill for {agent.display_name} at {target}")
|
|
75
|
+
return 0
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def uninstall_skills(requested: List[str]) -> int:
|
|
79
|
+
agents = _select_agents(requested)
|
|
80
|
+
removed = False
|
|
81
|
+
for agent in agents:
|
|
82
|
+
target = agent.skill_dir
|
|
83
|
+
if not target.is_dir():
|
|
84
|
+
continue
|
|
85
|
+
if not (target / "SKILL.md").is_file():
|
|
86
|
+
# Refuse to delete a directory that doesn't look like an installed skill.
|
|
87
|
+
print(f"Skipping {target}: no SKILL.md found, not removing.")
|
|
88
|
+
continue
|
|
89
|
+
shutil.rmtree(target)
|
|
90
|
+
removed = True
|
|
91
|
+
print(f"Removed '{SKILL_NAME}' skill for {agent.display_name} from {target}")
|
|
92
|
+
|
|
93
|
+
if not removed:
|
|
94
|
+
print(f"No installed '{SKILL_NAME}' skill found.")
|
|
95
|
+
return 0
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def main() -> None:
|
|
99
|
+
argv = sys.argv[1:]
|
|
100
|
+
|
|
101
|
+
if argv and argv[0] in ("install", "uninstall"):
|
|
102
|
+
parser = argparse.ArgumentParser(
|
|
103
|
+
prog=f"simpleaible {argv[0]}",
|
|
104
|
+
description=f"{argv[0].capitalize()} the SimpleAIBLE agent skill for detected agents.",
|
|
105
|
+
)
|
|
106
|
+
parser.add_argument(
|
|
107
|
+
"--agent",
|
|
108
|
+
action="append",
|
|
109
|
+
choices=[agent.key for agent in _known_agents()],
|
|
110
|
+
default=[],
|
|
111
|
+
help="Target a specific agent (repeatable). Defaults to all detected agents.",
|
|
112
|
+
)
|
|
113
|
+
args = parser.parse_args(argv[1:])
|
|
114
|
+
handler = install_skills if argv[0] == "install" else uninstall_skills
|
|
115
|
+
sys.exit(handler(args.agent))
|
|
116
|
+
|
|
117
|
+
# Default: run the MCP server. Imported lazily so skill management works
|
|
118
|
+
# in environments where the BLE backend is unavailable.
|
|
119
|
+
from . import mcp
|
|
120
|
+
|
|
121
|
+
mcp.main()
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
if __name__ == "__main__":
|
|
125
|
+
main()
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: simpleaible
|
|
3
|
+
description: Use the SimpleAIBLE MCP server to scan, connect, and interact with Bluetooth devices. This skill provides guidance on the recommended flow (scan -> connect -> services -> read/notify) and handles platform-specific differences like UUIDs on macOS vs MAC addresses on Linux. Use when the user wants to interact with BLE hardware or debug Bluetooth connections.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SimpleAIBLE
|
|
7
|
+
|
|
8
|
+
SimpleAIBLE is an AI-friendly BLE toolkit powered by SimpleBLE. This skill provides instructions for using the SimpleAIBLE MCP server to interact with Bluetooth Low Energy (BLE) devices directly from the host machine.
|
|
9
|
+
|
|
10
|
+
## Quick Start Flow
|
|
11
|
+
|
|
12
|
+
Always follow this sequence for BLE interactions:
|
|
13
|
+
|
|
14
|
+
1. **Scanning**: Call `scan_for` (default 5s) to find nearby peripherals.
|
|
15
|
+
2. **Connection**: Call `connect` using the `address` from the scan results.
|
|
16
|
+
3. **Exploration**: Call `services` to list available GATT services and characteristics.
|
|
17
|
+
4. **Interaction**: Use `read` for one-time values, `write_request`/`write_command` to send data, or `notify`/`indicate` + `get_notifications` + `unsubscribe` for streaming data.
|
|
18
|
+
5. **Cleanup**: Always call `disconnect` when finished to release the device.
|
|
19
|
+
|
|
20
|
+
## Core Instructions
|
|
21
|
+
|
|
22
|
+
- **Scanning**: Prefer scanning immediately before connecting to ensure the device is in the internal cache.
|
|
23
|
+
- **Addressing**: Be aware that macOS/iOS uses UUIDs for addresses, while Linux/Windows uses MAC addresses.
|
|
24
|
+
- **Data Handling**: Binary data is returned as `data_hex` (always reliable) and `data_utf8` (convenience field). If the data is not valid UTF-8, invalid bytes are skipped, so `data_utf8` may be incomplete or empty. Use `data_hex` for protocol analysis and `data_utf8` for human-readable strings.
|
|
25
|
+
- **Notifications/Indications**: Use `notify` or `indicate` to subscribe, `get_notifications` to retrieve buffered data, and `unsubscribe` when done.
|
|
26
|
+
- **Bluetooth Status**: Assume Bluetooth is enabled by default. Only check `bluetooth_enabled` when an operation fails.
|
|
27
|
+
|
|
28
|
+
## Additional Resources
|
|
29
|
+
|
|
30
|
+
- For detailed tool documentation and platform notes, see [the reference guide](references/REFERENCE.md).
|
|
31
|
+
- For concrete usage examples, see [examples.md](references/examples.md).
|
|
32
|
+
- For troubleshooting common issues, see [troubleshooting.md](references/troubleshooting.md).
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# SimpleAIBLE Reference
|
|
2
|
+
|
|
3
|
+
## Tool Catalog
|
|
4
|
+
|
|
5
|
+
### Adapter Management
|
|
6
|
+
|
|
7
|
+
- `get_adapters`: Lists all Bluetooth adapters. Returns `identifier` and `address`.
|
|
8
|
+
- `scan_for(timeout_ms)`: Scans for devices using the first available adapter. Returns `identifier`, `address`, `rssi`, `connectable`, and `manufacturer_data`.
|
|
9
|
+
|
|
10
|
+
### Connection Management
|
|
11
|
+
|
|
12
|
+
- `connect(address)`: Establishes a connection.
|
|
13
|
+
- `disconnect(address)`: Terminates the connection.
|
|
14
|
+
|
|
15
|
+
### GATT Operations
|
|
16
|
+
|
|
17
|
+
- `services(address)`: Discovers services and characteristics. Returns a list of services with their UUIDs and associated characteristic UUIDs.
|
|
18
|
+
- `read(address, service_uuid, char_uuid)`: Reads a single value. Returns `data_hex` and `data_utf8`. If the data is not valid UTF-8, invalid bytes are skipped in `data_utf8`.
|
|
19
|
+
- `write_request(address, service_uuid, char_uuid, data)`: Writes data (hex string) to a characteristic with response.
|
|
20
|
+
- `write_command(address, service_uuid, char_uuid, data)`: Writes data (hex string) to a characteristic without response.
|
|
21
|
+
- `notify(address, service_uuid, char_uuid)`: Subscribes to notifications. Data is buffered in the background.
|
|
22
|
+
- `indicate(address, service_uuid, char_uuid)`: Subscribes to indications. Data is buffered in the background.
|
|
23
|
+
- `get_notifications(address)`: Retrieves and clears all buffered notifications/indications.
|
|
24
|
+
- `unsubscribe(address, service_uuid, char_uuid)`: Unsubscribes from notifications or indications.
|
|
25
|
+
|
|
26
|
+
## Platform-Specific Behavior
|
|
27
|
+
|
|
28
|
+
### macOS / iOS
|
|
29
|
+
|
|
30
|
+
- **Addresses**: Uses randomized UUIDs (e.g., `5E2A...`) instead of hardware MAC addresses. These UUIDs are temporary and may change between sessions or device restarts.
|
|
31
|
+
- **Permissions**: Requires Bluetooth permissions. If the MCP server fails to start or scan, check System Settings.
|
|
32
|
+
|
|
33
|
+
### Linux (BlueZ)
|
|
34
|
+
|
|
35
|
+
- **Addresses**: Uses standard MAC addresses (e.g., `AA:BB:CC:DD:EE:FF`).
|
|
36
|
+
- **Dependencies**: Works on any Linux OS that uses BlueZ.
|
|
37
|
+
|
|
38
|
+
### Windows
|
|
39
|
+
|
|
40
|
+
- **Addresses**: Uses standard MAC addresses (e.g., `AA:BB:CC:DD:EE:FF`).
|
|
41
|
+
|
|
42
|
+
## Data Encoding
|
|
43
|
+
|
|
44
|
+
- **`data_hex`**: Always reliable. Lowercase hex string without `0x` prefix.
|
|
45
|
+
- **`data_utf8`**: Convenience field. If the data is not valid UTF-8, invalid bytes are silently skipped, so it may be incomplete or empty for binary data.
|
|
46
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# SimpleAIBLE Examples
|
|
2
|
+
|
|
3
|
+
## Example 1: Listing Bluetooth Adapters
|
|
4
|
+
|
|
5
|
+
**User**: "What Bluetooth adapters are available on this machine?"
|
|
6
|
+
|
|
7
|
+
**Agent Workflow**:
|
|
8
|
+
1. Call `get_adapters` to list all available Bluetooth adapters.
|
|
9
|
+
2. Display the adapter identifiers and addresses to the user.
|
|
10
|
+
|
|
11
|
+
## Example 2: Basic Device Discovery
|
|
12
|
+
|
|
13
|
+
**User**: "Find any BLE devices nearby."
|
|
14
|
+
|
|
15
|
+
**Agent Workflow**:
|
|
16
|
+
1. Call `scan_for(timeout_ms=5000)` to search for devices.
|
|
17
|
+
2. Display the list of found devices (Identifier, Address, RSSI).
|
|
18
|
+
|
|
19
|
+
## Example 3: Reading Device Information
|
|
20
|
+
|
|
21
|
+
**User**: "Read the firmware version from the device at address AA:BB:CC:DD:EE:FF."
|
|
22
|
+
|
|
23
|
+
**Agent Workflow**:
|
|
24
|
+
1. Call `scan_for` to ensure the device is in cache.
|
|
25
|
+
2. Call `connect("AA:BB:CC:DD:EE:FF")`.
|
|
26
|
+
3. Call `services("AA:BB:CC:DD:EE:FF")` to find the Device Information Service (usually `0000180a-...`).
|
|
27
|
+
4. Identify the Firmware Revision String characteristic (usually `00002a26-...`).
|
|
28
|
+
5. Call `read("AA:BB:CC:DD:EE:FF", "180a", "2a26")`.
|
|
29
|
+
6. Display the `data_utf8` result.
|
|
30
|
+
7. Call `disconnect("AA:BB:CC:DD:EE:FF")`.
|
|
31
|
+
|
|
32
|
+
## Example 4: Debugging a Connection Issue
|
|
33
|
+
|
|
34
|
+
**User**: "I'm debugging my peripheral, please ensure it is connectable and I can read some data."
|
|
35
|
+
|
|
36
|
+
**Agent Workflow**:
|
|
37
|
+
1. Call `scan_for` to see if the device appears in the scan results.
|
|
38
|
+
2. Check the `connectable` field in the scan results.
|
|
39
|
+
3. If connectable, call `connect(address)`.
|
|
40
|
+
4. Call `services(address)` to explore available GATT characteristics.
|
|
41
|
+
5. Attempt a `read` from a known characteristic (e.g., Device Name or Battery Level) to verify data access.
|
|
42
|
+
6. Report the status of each step to the user to help pinpoint where it fails.
|
|
43
|
+
|
|
44
|
+
## Example 5: Writing to a Characteristic
|
|
45
|
+
|
|
46
|
+
**User**: "Send the command 0x01 to the control characteristic on my device at AA:BB:CC:DD:EE:FF."
|
|
47
|
+
|
|
48
|
+
**Agent Workflow**:
|
|
49
|
+
1. Call `scan_for` to ensure the device is in cache.
|
|
50
|
+
2. Call `connect("AA:BB:CC:DD:EE:FF")`.
|
|
51
|
+
3. Call `services("AA:BB:CC:DD:EE:FF")` to find the relevant service and characteristic.
|
|
52
|
+
4. Call `write_request("AA:BB:CC:DD:EE:FF", "service-uuid", "char-uuid", "01")` for a write with response, or `write_command(...)` for a write without response.
|
|
53
|
+
5. Call `disconnect("AA:BB:CC:DD:EE:FF")`.
|
|
54
|
+
|
|
55
|
+
## Example 6: Streaming Notification Data
|
|
56
|
+
|
|
57
|
+
**User**: "Subscribe to heart rate notifications from my device at AA:BB:CC:DD:EE:FF."
|
|
58
|
+
|
|
59
|
+
**Agent Workflow**:
|
|
60
|
+
1. Call `scan_for` to ensure the device is in cache.
|
|
61
|
+
2. Call `connect("AA:BB:CC:DD:EE:FF")`.
|
|
62
|
+
3. Call `services("AA:BB:CC:DD:EE:FF")` to find the Heart Rate Service (usually `0000180d-...`).
|
|
63
|
+
4. Identify the Heart Rate Measurement characteristic (usually `00002a37-...`).
|
|
64
|
+
5. Call `notify("AA:BB:CC:DD:EE:FF", "180d", "2a37")` to subscribe.
|
|
65
|
+
6. Wait, then call `get_notifications("AA:BB:CC:DD:EE:FF")` to retrieve buffered samples.
|
|
66
|
+
7. Repeat `get_notifications` as needed to collect more data.
|
|
67
|
+
8. Call `unsubscribe("AA:BB:CC:DD:EE:FF", "180d", "2a37")` when done.
|
|
68
|
+
9. Call `disconnect("AA:BB:CC:DD:EE:FF")`.
|
|
69
|
+
|
|
70
|
+
## Example 7: Troubleshooting Discovery
|
|
71
|
+
|
|
72
|
+
**User**: "I've made this Bluetooth integration but I'm not finding any device, please see if you can find any BLE device."
|
|
73
|
+
|
|
74
|
+
**Agent Workflow**:
|
|
75
|
+
1. Call `scan_for(timeout_ms=10000)` with a longer timeout to give devices more time to advertise.
|
|
76
|
+
2. Analyze the results: if no devices are found, suggest checking physical proximity or if the device is already paired/connected to another host.
|
|
77
|
+
3. If devices are found but not the specific one, list the found identifiers to see if it's appearing with a different name.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Troubleshooting SimpleAIBLE MCP Operations
|
|
2
|
+
|
|
3
|
+
## Bluetooth Not Enabled
|
|
4
|
+
|
|
5
|
+
If any MCP operation fails (scanning, connecting, reading, etc.), the first diagnostic step is to check if Bluetooth is enabled on the host system.
|
|
6
|
+
|
|
7
|
+
### Diagnostic Steps
|
|
8
|
+
|
|
9
|
+
1. **When an operation fails, call `bluetooth_enabled` tool** to check the Bluetooth status:
|
|
10
|
+
```python
|
|
11
|
+
result = bluetooth_enabled()
|
|
12
|
+
# Returns: {"enabled": true} or {"enabled": false}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
2. **If Bluetooth is disabled (`enabled: false`)**:
|
|
16
|
+
- Prompt the user: "Bluetooth appears to be disabled on your system. Please enable Bluetooth in your system settings and try again."
|
|
17
|
+
- Wait for the user to confirm they've enabled Bluetooth
|
|
18
|
+
- Call `bluetooth_enabled` again to verify it's now enabled
|
|
19
|
+
- Retry the original operation
|
|
20
|
+
|
|
21
|
+
3. **If Bluetooth is enabled (`enabled: true`) but operations still fail**:
|
|
22
|
+
- The issue is likely something else (permissions, device not in range, hardware issue, etc.)
|
|
23
|
+
- Proceed with other troubleshooting steps:
|
|
24
|
+
- Check if adapters are available with `get_adapters`
|
|
25
|
+
- Verify device proximity and advertising status
|
|
26
|
+
- Check system permissions (especially on macOS/iOS)
|
|
27
|
+
|
|
28
|
+
### Important Notes
|
|
29
|
+
|
|
30
|
+
- **Assume Bluetooth is enabled by default** - do not check `bluetooth_enabled` proactively
|
|
31
|
+
- **Only call `bluetooth_enabled` when an operation fails** to diagnose the issue
|
|
32
|
+
- Bluetooth must be enabled for **all** BLE operations to work
|
|
33
|
+
- The `bluetooth_enabled` check is fast and idempotent - safe to call multiple times
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: simpleaible
|
|
3
|
-
Version: 0.14.1.
|
|
3
|
+
Version: 0.14.1.dev79
|
|
4
4
|
Summary: SimpleAIBLE is an AI-friendly BLE toolkit (MCP server & REST API) powered by SimplePyBLE.
|
|
5
5
|
Author-email: Kevin Dewald <kevin@simpleble.org>
|
|
6
6
|
Project-URL: Homepage, https://github.com/simpleble/simpleble
|
|
@@ -85,7 +85,12 @@ See the `HTTP Server docs`_ for the full API reference.
|
|
|
85
85
|
Agent Skills
|
|
86
86
|
------------
|
|
87
87
|
|
|
88
|
-
Install the SimpleAIBLE skill to give your AI agent built-in knowledge of BLE workflows
|
|
88
|
+
Install the SimpleAIBLE skill to give your AI agent built-in knowledge of BLE workflows.
|
|
89
|
+
The bundled installer detects Claude Code and Codex automatically: ::
|
|
90
|
+
|
|
91
|
+
simpleaible install
|
|
92
|
+
|
|
93
|
+
Run ``simpleaible uninstall`` to remove the skill again. For other agents, use the ``skills`` CLI: ::
|
|
89
94
|
|
|
90
95
|
npx skills add https://github.com/simpleble/simpleble --skill simpleaible
|
|
91
96
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
README.rst
|
|
2
2
|
pyproject.toml
|
|
3
3
|
src/simpleaible/__init__.py
|
|
4
|
+
src/simpleaible/cli.py
|
|
4
5
|
src/simpleaible/http.py
|
|
5
6
|
src/simpleaible/mcp.py
|
|
6
7
|
src/simpleaible/py.typed
|
|
@@ -9,4 +10,8 @@ src/simpleaible.egg-info/SOURCES.txt
|
|
|
9
10
|
src/simpleaible.egg-info/dependency_links.txt
|
|
10
11
|
src/simpleaible.egg-info/entry_points.txt
|
|
11
12
|
src/simpleaible.egg-info/requires.txt
|
|
12
|
-
src/simpleaible.egg-info/top_level.txt
|
|
13
|
+
src/simpleaible.egg-info/top_level.txt
|
|
14
|
+
src/simpleaible/skills/simpleaible/SKILL.md
|
|
15
|
+
src/simpleaible/skills/simpleaible/references/REFERENCE.md
|
|
16
|
+
src/simpleaible/skills/simpleaible/references/examples.md
|
|
17
|
+
src/simpleaible/skills/simpleaible/references/troubleshooting.md
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/src/simpleaible.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{simpleaible-0.14.1.dev77 → simpleaible-0.14.1.dev79}/src/simpleaible.egg-info/top_level.txt
RENAMED
|
File without changes
|