diff --git a/tools/bridge_server.py b/tools/bridge_server.py index 6829799..9fe5d87 100644 --- a/tools/bridge_server.py +++ b/tools/bridge_server.py @@ -27,7 +27,7 @@ import platform import sys PROTOCOL_VERSION = 1 -SERVER_BUILD = 8 # 2026-07-29: start/stop_notify 10s 超时 + connect subscribe 选项(OTA 净连接) +SERVER_BUILD = 9 # 2026-07-29: StreamReader limit 64KiB→4MiB(OTA 144KB 请求行根因修复) EPD_SERVICE_UUID = "13187b10-eba9-a3ba-044e-83d3217d9a38" EPD_CHAR_UUID = "4b646063-6264-f3a7-8941-e65356ea82fe" @@ -279,7 +279,9 @@ async def main(): ap.add_argument("--port", type=int, default=8971) args = ap.parse_args() server = BridgeServer() - srv = await asyncio.start_server(server.handle, args.host, args.port) + # limit: OTA 镜像请求 ~145KB(hex),远超默认 64KiB —— 必须显式放大(2026-07-29 根因) + srv = await asyncio.start_server(server.handle, args.host, args.port, + limit=4 * 1024 * 1024) print(f"[bridge] listening on {args.host}:{args.port} " f"(protocol v{PROTOCOL_VERSION}, platform {platform.system()})", flush=True) async with srv: