chore: 原理图 README
This commit is contained in:
parent
acbb0afd13
commit
f8d617ad34
13
README.md
13
README.md
|
@ -33,4 +33,17 @@ git clone https://github.com/colour93/esp32-car.git
|
||||||
|
|
||||||
## BLE 串口通信协议
|
## BLE 串口通信协议
|
||||||
|
|
||||||
|
其他设备与 ESP32 通信采用 BLE 的 GATT 协议,其服务默认为 Nordic 串口服务,可以在 `src/consts.h` 中修改。
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
# 服务与特征 UUID
|
||||||
|
#define SERVICE_UUID "6E400001-B5A3-F393-E0A9-E50E24DCCA9E"
|
||||||
|
#define CHARACTERISTIC_UUID_RX "6E400002-B5A3-F393-E0A9-E50E24DCCA9E"
|
||||||
|
#define CHARACTERISTIC_UUID_TX "6E400003-B5A3-F393-E0A9-E50E24DCCA9E"
|
||||||
|
```
|
||||||
|
|
||||||
|
数据分为主动发送和被动接收两种,主动发送的特征值为 `CHARACTERISTIC_UUID_TX`,被动接收的特征值为 `CHARACTERISTIC_UUID_RX`。
|
||||||
|
|
||||||
|
同时一些状态信息会主动发送。
|
||||||
|
|
||||||
[数据包格式](./packet.md)
|
[数据包格式](./packet.md)
|
BIN
docs/原理图.png
BIN
docs/原理图.png
Binary file not shown.
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 75 KiB |
Loading…
Reference in New Issue