mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
Add more debug logging for BT stream connection
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6186,11 +6186,14 @@ def get_bt_devices():
|
|||||||
@app.route('/bt/stream')
|
@app.route('/bt/stream')
|
||||||
def stream_bt():
|
def stream_bt():
|
||||||
"""SSE stream for Bluetooth events."""
|
"""SSE stream for Bluetooth events."""
|
||||||
|
print("[BT Stream] Client connected")
|
||||||
def generate():
|
def generate():
|
||||||
import json
|
import json
|
||||||
|
print("[BT Stream] Generator started, waiting for queue...")
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
msg = bt_queue.get(timeout=1)
|
msg = bt_queue.get(timeout=1)
|
||||||
|
print(f"[BT Stream] Got from queue: {msg.get('type')}")
|
||||||
if msg.get('type') == 'device':
|
if msg.get('type') == 'device':
|
||||||
print(f"[BT Stream] Sending device: {msg.get('mac')}")
|
print(f"[BT Stream] Sending device: {msg.get('mac')}")
|
||||||
yield f"data: {json.dumps(msg)}\n\n"
|
yield f"data: {json.dumps(msg)}\n\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user