|
1 | 1 | ## Getting live ECG data from HeartyPatch over WiFi/TCP
|
2 | 2 |
|
3 | 3 | 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: |
5 | 5 |
|
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*) |
9 | 8 |
|
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. |
11 | 10 |
|
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.` |
13 | 17 |
|
14 | 18 | Setup guides for these components are available on the [ESP-IDF documentation site](https://esp-idf.readthedocs.io/en/latest/get-started/index.html).
|
15 | 19 |
|
@@ -51,7 +55,24 @@ If all goes well and the HeartyPatch gets connected to your specified Wi-Fi netw
|
51 | 55 |
|
52 | 56 | 
|
53 | 57 |
|
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. |
55 | 76 |
|
56 | 77 | [Download TCP Client GUI](https://github.com/Protocentral/protocentral_heartypatch/releases/latest)
|
57 | 78 |
|
|
0 commit comments