Initial commit - Phase 3/4

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
michael
2026-01-06 13:45:29 -08:00
parent 1da6730735
commit 4f35df1781
323 changed files with 98287 additions and 1195 deletions

View File

@@ -0,0 +1,48 @@
"""BLE GATT server implementation for Dangerous Pi.
This module provides Bluetooth Low Energy (BLE) GATT server functionality
that reuses the service layer for business logic, ensuring consistency
with the REST API.
Components:
- DangerousPiGATTServer: GATT handlers that call service layer
- BlueZGATTAdapter: Bridges bless library to GATT handlers
- Characteristic UUIDs: Service and characteristic definitions
"""
from .gatt_server import DangerousPiGATTServer
from .characteristics import (
PM3CharacteristicUUIDs,
WiFiCharacteristicUUIDs,
SystemCharacteristicUUIDs,
UpdateCharacteristicUUIDs,
)
# BlueZ adapter (requires bless library)
try:
from .bluez_adapter import (
BlueZGATTAdapter,
get_ble_adapter,
start_ble_server,
stop_ble_server,
)
BLESS_AVAILABLE = True
except ImportError:
BlueZGATTAdapter = None
get_ble_adapter = None
start_ble_server = None
stop_ble_server = None
BLESS_AVAILABLE = False
__all__ = [
"DangerousPiGATTServer",
"PM3CharacteristicUUIDs",
"WiFiCharacteristicUUIDs",
"SystemCharacteristicUUIDs",
"UpdateCharacteristicUUIDs",
"BlueZGATTAdapter",
"get_ble_adapter",
"start_ble_server",
"stop_ble_server",
"BLESS_AVAILABLE",
]