This repository has been archived on 2023-12-22. You can view files and clone it, but cannot push or open issues or pull requests.
old-monorepo/docs/communication.md

42 lines
1.8 KiB
Markdown

# Heliox communication protocol
The following structure can be used to communicate with the Heliox control over several carrier protocols (UART, BL LE,...)
## Basic data structure
The following table describes the bit pattern for a successful communication with and between Heliox devices.
| 0x0 | 0x1 | 0x2 | 0x3 | 0x4 | ... |
| --- | --- | -------- | ------ | --------- | --------------- |
| H | X | _length_ | _mode_ | _submode_ | _optional data_ |
## Modes
### Mode selection
The columns represent modes and the rows represent submodes:
| | 0x0 | 0x1 | 0x2 | 0x3 |
| :---: | :---------: | :---------------: | :---------------: | :-------------------------: |
| | **Message** | **Settings** | **Light control** | **Basic commands** |
| 0x0 | light data | set baud rate | on | request light data |
| 0x1 | info | set WIFI password | off | enter console flashing mode |
| 0x2 | warning | set WIFI SSID | toggle | exit console flashing mode |
| 0x3 | error | | increase | pair Bluetooth |
| 0x4 | success | | decrease | help |
| 0x5 | | | | version |
### Optional data
Every submode can take any number of Bytes except the below-mentioned ones:
| **0 Bytes** | **1 Byte** |
| :------------: | :--------: |
| on | increase |
| off | decrease |
| flash console | toggle |
| pair Bluetooth | |
### Additional information
The maximum length of a message ist 255 Bytes excluding the magic number "BM" and the length slot itself.