Skip to content

Commit 74576a6

Browse files
committed
Feat: Chapter line breaks have been added to the motto80 documentation
1 parent 53cb7e1 commit 74576a6

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

‎bookoo_motto80/README.en.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ Public capabilities include:
4646

4747
The Python example implements only the minimal protocol stack needed to verify the data channel. It does not wrap every business operation. Implement business requests by following the JSON, fragmentation, and GATT write rules in this document.
4848

49+
<br>
50+
4951
## 2. Features Under Development
5052

5153
The capabilities in this section are not included in the current SDK. The following information describes the development direction; the official release determines the actual schedule, interface, and availability.
@@ -69,6 +71,8 @@ To support developers building automatic control for motorized grind-size adjust
6971

7072
The official release determines the final interface, data fields, and actual broadcast frequency.
7173

74+
<br>
75+
7276
## 3. Windows Python Quick Start
7377

7478
### 3.1 Requirements
@@ -107,6 +111,8 @@ The script will:
107111

108112
The terminal should support ANSI cursor control and be wide enough to prevent a single JSON line from wrapping automatically. When output is redirected or the terminal is non-interactive, the script automatically falls back to block-by-block output. Press `Ctrl+C` to exit and disconnect.
109113

114+
<br>
115+
110116
## 4. BLE Discovery and Custom GATT Service
111117

112118
### 4.1 Device Discovery
@@ -151,6 +157,8 @@ flowchart TD
151157

152158
Every BLE disconnection invalidates the current subscription and handshake state. **After reconnecting, subscribe to TX again and resend `appHello`.**
153159

160+
<br>
161+
154162
## 5. GATT Fragment Frame v1
155163

156164
Each RX Write or TX Notify carries one fragment. The frame header is fixed at 8 bytes, and all multibyte integers use little-endian byte order.
@@ -186,6 +194,8 @@ Encode business JSON as UTF-8 before fragmentation. Compact JSON without unneces
186194

187195
All field-length limits are measured in UTF-8 bytes, not Unicode characters.
188196

197+
<br>
198+
189199
## 6. JSON Message Model
190200

191201
### 6.1 Top-Level Message Types
@@ -238,6 +248,8 @@ A success response appears under the same business object as the request:
238248

239249
Only the first detected error is returned for a request, and the entire request is rejected. `error.field` appears only when the error can be associated with a specific field.
240250

251+
<br>
252+
241253
## 7. Handshake and Device Broadcasts
242254

243255
### 7.1 Explicit Application-Layer Handshake
@@ -348,6 +360,8 @@ The client must tolerate non-empty strings not listed in the table and treat the
348360
|`CONNECTED`|Wi-Fi connected|
349361
|`DISCONNECTED`|Wi-Fi disconnected|
350362

363+
<br>
364+
351365
## 8. General Settings: `geneSetting`
352366

353367
### 8.1 Field Definitions
@@ -505,6 +519,8 @@ Set `selector.type` to `keys`; `value` is an array of field names to read.
505519
}
506520
```
507521

522+
<br>
523+
508524
## 9. Grinding Sections: `grindSection`
509525

510526
Up to six grinding sections are supported. The complete configuration can be read or set, but an individual section's name or range cannot be modified separately.
@@ -576,6 +592,8 @@ Each section has the following format:
576592
}
577593
```
578594

595+
<br>
596+
579597
## 10. User Grinding Presets: `grindPreset`
580598

581599
The device can store up to 10 currently visible user presets. Preset deletion uses recycle-bin (tombstone) semantics. A deleted preset can be restored while the device still retains its tombstone.
@@ -1392,6 +1410,8 @@ Device-wide `data` does not contain `uid` or `index`.
13921410
}
13931411
```
13941412

1413+
<br>
1414+
13951415
## 11. Common Error Responses
13961416

13971417
All public operations use the following common failure structure:
@@ -1491,6 +1511,8 @@ User-preset error example:
14911511
}
14921512
```
14931513

1514+
<br>
1515+
14941516
## 12. Copyright, License, and Interpretation
14951517

14961518
**Copyright © 2024 DGSSL BOOKOO TECH LTD. (东莞松山湖不苦科技有限公司).**

‎bookoo_motto80/README.zh-CN.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646

4747
Python 例程只实现验证数据通道所需的最小协议栈,不封装每个业务接口。业务请求可按照本文给出的 JSON、分片和 GATT 写入规则自行实现。
4848

49+
<br>
50+
4951
## 2. 正在开发的内容
5052

5153
本节中的能力尚未包含在当前 SDK 中,以下信息用于说明开发方向。具体发布时间、接口形式和可用范围以正式发布版本为准。
@@ -69,6 +71,8 @@ Python 例程只实现验证数据通道所需的最小协议栈,不封装每
6971

7072
具体接口形式、数据字段和实际广播频率以正式发布版本为准。
7173

74+
<br>
75+
7276
## 3. Windows Python 快速开始
7377

7478
### 3.1 环境要求
@@ -107,6 +111,8 @@ python mt80_gatt_client.py 10:20:30:40:50:60
107111

108112
终端应支持 ANSI 光标控制并具有足够宽度,避免 JSON 单行自动折行。输出重定向或非交互式终端中,脚本会自动降级为逐块打印。按 `Ctrl+C` 退出并断开连接。
109113

114+
<br>
115+
110116
## 4. BLE 发现与 Custom GATT Service
111117

112118
### 4.1 设备发现
@@ -151,6 +157,8 @@ flowchart TD
151157

152158
每次 BLE 断开后,本次订阅和握手状态都失效。**重连后必须重新订阅 TX 并重新发送 `appHello`。**
153159

160+
<br>
161+
154162
## 5. GATT 分片帧 v1
155163

156164
每次 RX Write 或 TX Notify 承载一个分片。帧头固定为 8 字节,所有多字节整数均为小端序。
@@ -186,6 +194,8 @@ flowchart TD
186194

187195
字段长度限制均按 UTF-8 字节数计算,不是按 Unicode 字符数量计算。
188196

197+
<br>
198+
189199
## 6. JSON 消息模型
190200

191201
### 6.1 顶层消息类型
@@ -238,6 +248,8 @@ flowchart TD
238248

239249
同一次请求只返回首个检测到的错误,本次请求整体不生效。`error.field` 仅在错误能定位到具体字段时出现。
240250

251+
<br>
252+
241253
## 7. 握手与设备广播
242254

243255
### 7.1 应用层显式握手
@@ -348,6 +360,8 @@ flowchart TD
348360
|`CONNECTED`|Wi-Fi 已连接|
349361
|`DISCONNECTED`|Wi-Fi 未连接|
350362

363+
<br>
364+
351365
## 8. 常规设置 `geneSetting`
352366

353367
### 8.1 字段定义
@@ -505,6 +519,8 @@ flowchart TD
505519
}
506520
```
507521

522+
<br>
523+
508524
## 9. 研磨区间 `grindSection`
509525

510526
研磨区间最多 6 个,只支持整体读取和整体设置,不支持单独修改某个区间的名称或范围。
@@ -576,6 +592,8 @@ flowchart TD
576592
}
577593
```
578594

595+
<br>
596+
579597
## 10. 用户研磨预设 `grindPreset`
580598

581599
设备最多保存 10 个当前可见的用户预设。预设删除采用垃圾箱(tombstone)语义,删除后可以在设备仍保留该 tombstone 时恢复。
@@ -1392,6 +1410,8 @@ UID: ae8f0ec693f96e37140fc424ab5df303
13921410
}
13931411
```
13941412

1413+
<br>
1414+
13951415
## 11. 通用错误响应
13961416

13971417
所有开放业务使用统一失败结构:
@@ -1491,6 +1511,8 @@ UID: ae8f0ec693f96e37140fc424ab5df303
14911511
}
14921512
```
14931513

1514+
<br>
1515+
14941516
## 12. 版权、许可与解释权
14951517

14961518
**Copyright © 2024 东莞松山湖不苦科技有限公司(DGSSL BOOKOO TECH LTD.)。**

0 commit comments

Comments
 (0)