Skip to content

Commit 894f58c

Browse files
Updated docs with new packet format
1 parent 143af07 commit 894f58c

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
*.idb
4343
*.pdb
4444
*.DS_Store
45+
*.csv
4546

4647
# Kernel Module Compile Results
4748
*.mod*

docs/streaming-ecg-tcp-mode.md

+28-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
## Getting live ECG data from HeartyPatch over WiFi/TCP
22

33
The firmware for the HeartyPatch's on-board Espressif ESP32 chip uses the [esp-idf framework](https://github.com/espressif/esp-idf)
4-
for development. You will need to install and configure the following components to setup a development environment:
4+
for development. You will need to install and configure the following components to setup a development environment:
55

6-
* The Xtensa ESP32 toolchain (*Plase make sure download the toolchain from the links at: http://esp-idf.readthedocs.io/en/v2.1/get-started/index.html#standard-setup-of-toolchain*)
7-
* The v2.1 release of esp-idf (*this is the most stable release with the required features*)
8-
* Supporting software such as Python and pyserial
6+
### The Xtensa ESP32 toolchain
7+
(*Plase make sure download the toolchain from the links at: http://esp-idf.readthedocs.io/en/v2.1/get-started/index.html#standard-setup-of-toolchain*)
98

10-
**Please make sure all of the above tools are properly installed before proceeding.**
9+
This version of the esp-idf compiles well only with the toolchain version 1.22.0-61-gab8375a-5.2.0.
1110

12-
**The current version of the HeartyPatch code compiles well and performs well only with v2.1 of the ESP-IDF and version 1.22.0-61-gab8375a-5.2.0 of the Xtensa toolchain.**
11+
### The v2.1 release of esp-idf
12+
*The current version of the HeartyPatch code compiles well and performs well only with v2.1 of the ESP-IDF and version 1.22.0-61-gab8375a-5.2.0 of the Xtensa toolchain.*
13+
14+
[Download the ESP-IDF version 2.1 here](https://github.com/espressif/esp-idf/releases/download/v2.1/esp-idf-v2.1.zip)
15+
16+
`Please make sure all of the above tools are properly installed before proceeding.`
1317

1418
Setup guides for these components are available on the [ESP-IDF documentation site](https://esp-idf.readthedocs.io/en/latest/get-started/index.html).
1519

@@ -51,7 +55,24 @@ If all goes well and the HeartyPatch gets connected to your specified Wi-Fi netw
5155

5256
![idf-monitor](images/idf-monitor-tcp-connection.png)
5357

54-
You can download the TCP client GUI for your platform from this link:
58+
# The TCP Client GUI
59+
60+
The HeartyPatch is now configured as a TCP sever ready for connection from a TCP client. The HeartyPatch sends data out in the following packet format.
61+
62+
Offset | Byte Value | Description
63+
------ | ----------- | ------------------
64+
0 | 0x0A | Start of frame
65+
1 | 0xFA | Start of frame
66+
2| Payload Size LSB |
67+
3| Payload Size MSB |
68+
4| Protocol version | (currently 0x03)
69+
5-8| Packet sequence | incremental number
70+
9-16| Timestamp | From ESP32 gettimeofday()
71+
17-20| R-R Interval |
72+
18-...| ECG Data samples | Currently 8 samples / packet
73+
...| 0x0B | End of Frame
74+
75+
You can download the ProtoCentral TCP client GUI for your platform from the following link.
5576

5677
[Download TCP Client GUI](https://github.com/Protocentral/protocentral_heartypatch/releases/latest)
5778

0 commit comments

Comments
 (0)