[{"data":1,"prerenderedAt":322},["ShallowReactive",2],{"post-en-engineering-driver-bridge-architecture":3,"header-article-translation-en-engineering-driver-bridge-architecture":182,"trans-engineering-driver-architecture-en":183},{"id":4,"title":5,"body":6,"category":152,"date":153,"description":154,"difficulty":155,"draft":156,"duration":155,"extension":157,"featured":156,"image":155,"layout":158,"locale":159,"meta":160,"navigation":161,"path":162,"references":163,"related":155,"section":175,"seo":176,"slug":177,"status":178,"stem":179,"tags":155,"translationKey":180,"updated":155,"video":155,"__hash__":181},"content\u002Fen\u002Fengineering\u002Fdriver-bridge-architecture.md","Architecture of Laetoly Driver Bridge & GRBL Protocol",{"type":7,"value":8,"toc":146},"minimark",[9,14,23,32,59,69,73,80,123,127],[10,11,13],"h2",{"id":12},"system-architecture","System Architecture",[15,16,17,18,22],"p",{},"The core engineering principle of Laetoly is ",[19,20,21],"strong",{},"Physical Decoupling between Cloud\u002FBrowser Workspace and Local CAM Computation",":",[24,25,26],"blockquote",{},[15,27,28,31],{},[19,29,30],{},"Status: Experimental."," This page describes the current internal bridge notes. Endpoint details, thresholds, and hardware compatibility must be verified against the specific Driver and controller build.",[33,34,35,47,53],"ul",{},[36,37,38,41,42,46],"li",{},[19,39,40],{},"Browser Workspace (Laetoly Web)",": Runs in the browser at ",[43,44,45],"code",{},"app.laetoly.com",". Responsible for 2D design, vector import (SVG\u002FDXF), tool library selection, project cloud sync, and 3D simulation preview.",[36,48,49,52],{},[19,50,51],{},"Local PC Driver (CAM Engine & Hardware Bridge)",": A dedicated native daemon running on the user's PC. It executes heavy CAM toolpath generation (toolpath offsets, step-downs, feed calculations), and manages low-latency hardware communication with the CNC router over USB serial or local Wi-Fi.",[36,54,55,58],{},[19,56,57],{},"CNC Controller",": Standard 3-axis desktop CNC machine running GRBL-compatible firmware.",[60,61,66],"pre",{"className":62,"code":64,"language":65},[63],"language-text","+------------------------------------+\n|       Laetoly Web (Browser)        |\n|   - 2D Canvas & Vector Import      |\n|   - 3D Cut Preview & Simulation    |\n|   - Tool Library & Project Sync    |\n+-----------------+------------------+\n                  | Local Loopback (WebSocket \u002F IPC)\n                  v\n+-----------------+------------------+\n|       Laetoly PC Driver            |\n|   - Native CAM Toolpath Engine     |\n|   - Post-Processor & G-Code Gen    |\n|   - Serial \u002F Wi-Fi Machine Control |\n+-----------------+------------------+\n                  | USB Serial (115200 Baud) \u002F Wi-Fi\n                  v\n+-----------------+------------------+\n|       GRBL-Compatible CNC Router   |\n|   - 3-Axis Stepper Motion (XYZ)    |\n|   - Spindle & Safety Limit Switches|\n+------------------------------------+\n","text",[43,67,64],{"__ignoreMap":68},"",[10,70,72],{"id":71},"buffer-management-character-counting-protocol","Buffer Management: Character-Counting Protocol",[15,74,75,76,79],{},"The approved Driver V2 notes describe GRBL or FluidNC controllers with a 128-byte receive ring buffer. To prevent buffer overruns, the Laetoly PC Driver follows the GRBL ",[19,77,78],{},"Character-Counting"," approach:",[81,82,83,90,100,115],"ol",{},[36,84,85,86,89],{},"Maintain an integer counter ",[43,87,88],{},"buffer_available"," initialized to 128 bytes.",[36,91,92,93,96,97,99],{},"For each outgoing command line (including ",[43,94,95],{},"\\r\\n","), subtract its byte length from ",[43,98,88],{},".",[36,101,102,103,106,107,110,111,114],{},"If ",[43,104,105],{},"buffer_available \u003C line_length",", block until an ",[43,108,109],{},"ok"," or ",[43,112,113],{},"error:"," response is received from the hardware.",[36,116,117,118,120,121,99],{},"When ",[43,119,109],{}," is received, restore the length of the oldest completed command to ",[43,122,88],{},[10,124,126],{"id":125},"real-time-command-interception","Real-Time Command Interception",[15,128,129,130,133,134,137,138,141,142,145],{},"Non-blocking single-byte commands (such as ",[43,131,132],{},"!"," for feed hold, ",[43,135,136],{},"~"," for cycle resume, and ",[43,139,140],{},"?"," for real-time status queries) are prioritized over the queued G-code stream. The V2 notes specify a 500 ms debounce before a WebSocket drop triggers feed hold and ",[43,143,144],{},"M5","; end-to-end response depends on the operating system, connection path, Driver build, and controller, so this page makes no sub-millisecond guarantee.",{"title":68,"searchDepth":147,"depth":147,"links":148},2,[149,150,151],{"id":12,"depth":147,"text":13},{"id":71,"depth":147,"text":72},{"id":125,"depth":147,"text":126},"Architecture","2026-09-08","How Laetoly bridges high-level browser design with local PC CAM computation and hardware serial control.",null,false,"md","article","en",{},true,"\u002Fen\u002Fengineering\u002Fdriver-bridge-architecture",[164,168,172],{"id":165,"title":166,"url":167},"grbl-protocol","GRBL v1.1 Interface Basics","https:\u002F\u002Fgithub.com\u002Fgnea\u002Fgrbl\u002Fblob\u002Fmaster\u002Fdoc\u002Fmarkdown\u002Finterface.md",{"id":169,"title":170,"url":171},"rfc-6455","The WebSocket Protocol (RFC 6455)","https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc6455",{"id":173,"title":174},"spec-proto-01","Technical Architecture Spec: Laetoly Driver WebSocket Bridge Protocol V2","engineering",{"title":5,"description":154},"driver-bridge-architecture","experimental","en\u002Fengineering\u002Fdriver-bridge-architecture","engineering-driver-architecture","E-O0l_cIvxKpoG_sIlCrxciumPMrJKNjp6R_O03eK9g",{"section":175,"slug":177},{"id":184,"title":185,"body":186,"category":307,"date":153,"description":308,"difficulty":155,"draft":156,"duration":155,"extension":157,"featured":156,"image":155,"layout":158,"locale":309,"meta":310,"navigation":161,"path":311,"references":312,"related":155,"section":175,"seo":319,"slug":177,"status":178,"stem":320,"tags":155,"translationKey":180,"updated":155,"video":155,"__hash__":321},"content\u002Fzh\u002Fengineering\u002Fdriver-bridge-architecture.md","Laetoly 驱动桥架构与 GRBL 硬件协议设计",{"type":7,"value":187,"toc":302},[188,191,198,206,229,235,239,246,284,287],[10,189,190],{"id":190},"系统分层架构",[15,192,193,194,197],{},"Laetoly 采用清晰的 ",[19,195,196],{},"云端\u002F网页工作台与本地计算控制解耦"," 架构：",[24,199,200],{},[15,201,202,205],{},[19,203,204],{},"状态：实验性。"," 本页描述当前内部桥接技术笔记；端点、阈值和硬件兼容范围必须以具体 Driver 与控制器版本核对为准。",[33,207,208,217,223],{},[36,209,210,213,214,216],{},[19,211,212],{},"浏览器工作台（Laetoly Web）","：运行于浏览器前端（",[43,215,45],{},"）。负责 2D 矢量设计（SVG\u002FDXF 导入）、刀具库配置、工程云端存取以及三维切削仿真预览。",[36,218,219,222],{},[19,220,221],{},"本地驱动程序（Laetoly PC Driver）","：安装并运行于用户电脑的后台守护进程。它作为核心 CAM 引擎，执行复杂的刀路计算、进给与下刀量规划、后处理生成 G 代码，并通过本地 USB 串口或 Wi-Fi 维持与 CNC 机床的低延迟指令通信及真机控制。",[36,224,225,228],{},[19,226,227],{},"数控机床硬件（CNC Machine）","：运行 GRBL 固件的标准 3 轴桌面数控雕刻机。",[60,230,233],{"className":231,"code":232,"language":65},[63],"+------------------------------------+\n|       Laetoly 网页工作台 (Web)      |\n|   - 2D 矢量画布与图形导入 (SVG)     |\n|   - 3D 刀路切削与材料去除仿真       |\n|   - 刀具参数配置与项目云端存储      |\n+-----------------+------------------+\n                  | 本地安全回环 (WebSocket \u002F IPC)\n                  v\n+-----------------+------------------+\n|       Laetoly PC 驱动程序 (CAM)    |\n|   - 自研后台 CAM 刀路生成引擎       |\n|   - G 代码后处理器与流控分发        |\n|   - USB 串口 \u002F Wi-Fi 硬件连接控制   |\n+-----------------+------------------+\n                  | USB 串口 (115200 波特率) \u002F Wi-Fi\n                  v\n+-----------------+------------------+\n|       GRBL 兼容桌面数控雕刻机       |\n|   - 三轴步进电机运动驱动 (XYZ)      |\n|   - 主轴电机、限位与急停开关        |\n+------------------------------------+\n",[43,234,232],{"__ignoreMap":68},[10,236,238],{"id":237},"缓冲区管理字符计数流控法","缓冲区管理：字符计数流控法",[15,240,241,242,245],{},"批准的 Driver V2 技术笔记将 GRBL 或 FluidNC 控制器的接收环形缓冲区描述为 128 字节。为避免缓冲区溢出，Laetoly PC Driver 采用 GRBL 推荐的 ",[19,243,244],{},"字符计数（Character-Counting）"," 方法：",[81,247,248,254,263,276],{},[36,249,250,251,253],{},"在内存中维护可用缓冲变量 ",[43,252,88],{},"，初始值为 128 字节。",[36,255,256,257,259,260,262],{},"每发送一行指令（包含 ",[43,258,95],{},"），从 ",[43,261,88],{}," 中扣除该行字节长度。",[36,264,265,266,269,270,272,273,275],{},"若 ",[43,267,268],{},"buffer_available \u003C 当前待发指令长度","，暂停发送，等待机床返回 ",[43,271,109],{}," 或 ",[43,274,113],{},"。",[36,277,278,279,281,282,275],{},"收到 ",[43,280,109],{}," 响应时，将最早一条已完成指令的字符长度退还给 ",[43,283,88],{},[10,285,286],{"id":286},"实时特权指令拦截",[15,288,289,290,292,293,295,296,298,299,301],{},"诸如 ",[43,291,132],{},"（进给保持\u002F暂停）、",[43,294,136],{},"（继续切削）与 ",[43,297,140],{},"（实时坐标与状态查询）等单字节控制字符会优先于排队的 G 代码发送。V2 技术笔记规定 WebSocket 断开后先经过 500 ms 防抖，再触发进给保持和 ",[43,300,144],{},"；端到端响应取决于操作系统、连接路径、Driver 构建版本与控制器，因此本页不作亚毫秒保证。",{"title":68,"searchDepth":147,"depth":147,"links":303},[304,305,306],{"id":190,"depth":147,"text":190},{"id":237,"depth":147,"text":238},{"id":286,"depth":147,"text":286},"底层架构","详解免安装浏览器工作台、本地 PC 后台 CAM 引擎与数控雕刻机硬件之间的架构分工与低延迟控制设计。","zh",{},"\u002Fzh\u002Fengineering\u002Fdriver-bridge-architecture",[313,315,317],{"id":165,"title":314,"url":167},"GRBL v1.1 接口基础",{"id":169,"title":316,"url":171},"WebSocket 协议 RFC 6455 规范文档",{"id":173,"title":318},"Laetoly Driver WebSocket Bridge Protocol V2 技术架构笔记",{"title":185,"description":308},"zh\u002Fengineering\u002Fdriver-bridge-architecture","TOIqvMJjTjsn7ca_-8tBPTZWdNe1Z4NvoVTF8bCSWM0",1789009347477]