Skip to content

Commit 29f0f4b

Browse files
committed
upload preview
1 parent fc7607a commit 29f0f4b

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

README.md

+19-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Arduino Homekit ESP8266
22

3-
### Apple HomeKit accessory server library for ESP8266 Arduino
3+
## Apple HomeKit accessory server library for ESP8266 Arduino
44

55
This Arduino library is a native Apple HomeKit accessory implementation for the ESP8266, and works without any additional bridges.
66

@@ -12,12 +12,17 @@ Enjoy the "one-key" build, "one-key" upload, and work to link various other Ardu
1212

1313
Here is a [discussion](https://github.com/HomeACcessoryKid/Arduino-HomeKit/issues/1) about the RTOS is required for running Apple HomeKit, and this project is a proof of concept that Apple HomeKit can be implemented and work fine without the RTOS.
1414

15-
### Setup code of the example sketch
15+
## Preview
16+
17+
![Preview](https://raw.github.com/Mixiaoxiao/Arduino-HomeKit-ESP8266/master/extras/preview.jpg)
18+
19+
20+
## Setup code of the example sketch
1621

1722
``111-11-111``
1823

1924

20-
### Usage
25+
## Usage
2126

2227
1. Define your accessory in a .c file to enjoy the convenient "Macro" style declaration. You can also define your accessory in a .ino file using C++ code.
2328
```C
@@ -47,7 +52,7 @@ Here is a [discussion](https://github.com/HomeACcessoryKid/Arduino-HomeKit/issue
4752
```
4853
Done.
4954

50-
### Performance
55+
## Performance
5156

5257
Notice: You should set the ESP8266 CPU to run at 160MHz (at least during the pairing process), to avoid the tcp-socket disconnection from iOS device caused by timeout.
5358

@@ -61,7 +66,7 @@ Notice: You should set the ESP8266 CPU to run at 160MHz (at least during the pai
6166
All pairing process takes ~14s after you input the setup-code on your iPhone. Notice that Preinit require ~9s before you can start to pair.
6267

6368

64-
### Heap (memory)
69+
## Heap (memory)
6570

6671
The heap is critical for ESP8266 with full TCP/IP support. ESP8266 easily crashes when the memory is lower than ~5000.
6772

@@ -76,14 +81,14 @@ Here are the free heap values of running the example sketch:
7681
* Paired and no iOS device connected: ~23400
7782

7883

79-
### WolfSSL
84+
## WolfSSL
8085

8186
* Based on wolfssl-3.13.0-stable.
8287
* Clean source code: the unused files are removed.
8388
* `CURVE25519_SMALL` and `ED25519_SMALL`: ESP8266 can not directly run without `SMALL` defined since the memory is not sufficient. But the NO `SMALL` version is faster. I mark the big `ge_precomp base[32][8]` with PROGMEM to store it in Flash (around 70KB). Also the `ge_double_scalarmult_vartime` can not run caused by lack of heap. I define `ESP_GE_DOUBLE_SCALARMULT_VARTIME_LOWMEM` in `user_settings.h` to use LOWMEM version of `ge_double_scalarmult_vartime` in `ge_low_mem.c`. This is a trade-off of performance and memory. If you want more Flash space, you should define `CURVE25519_SMALL` and `ED25519_SMALL` and undefine `ESP_GE_DOUBLE_SCALARMULT_VARTIME_LOWMEM` in `user_settings.h`.
8489
* `integer.c`(big integer operations): `MP_16BIT` and `ESP_FORCE_S_MP_EXPTMOD` are defined for better performance in ESP8266. `ESP_INTEGER_WINSIZE` (value is 3) is defined to avoid crash caused by memory exhaust and the values of {3, 4, 5} are of similar performance (this will lead the Pair Verify Steps take 1.2s + 0.9s).
8590

86-
### Storage
91+
## Storage
8792

8893
* The pairing data is stored in the `EEPROM` address in ESP8266 Arduino core.
8994
* This project does not use the `EEPROM` library with data-cache to reduce memory use (directly call flash_read and write).
@@ -93,14 +98,14 @@ Here are the free heap values of running the example sketch:
9398
* This project do NOT use `FS(file system)`, so you can use `FS` freely.
9499

95100

96-
### WatchDog
101+
## WatchDog
97102

98103
* There are software and hardware watchdogs in ESP8266 Arduino core. The heavy crypto computing will lead to watchdog reset.
99104
* There are disable/enable api of software-watchdog in ESP8266 Arduino core.
100105
* I found the [esp_hw_wdt](https://github.com/ComSuite/esp_hw_wdt) to disable/enable the hardware-watchdog.
101106
* The two watchdogs are disabled while `Preinit` and `Pair Setup Step 2/3`.
102107

103-
### Recommended settings in IDE
108+
## Recommended settings in IDE
104109

105110
* Module: Generic ESP8266 Module (to enable full settings)
106111
* FlashSize: at least 470KB for sketch (see `WolfSSL` section if you want a smaller sketch)
@@ -112,25 +117,25 @@ Here are the free heap values of running the example sketch:
112117
* Erase Flash: select `All Flash Contents` when you first upload
113118
* CPU Frequency: 160MHz (must)
114119

115-
### Arduino port
120+
## Arduino port
116121

117122
* `ESP8266WiFi` (WiFiServer and WiFiClient) is used for tcp connection.
118123
* `ESP8266mDNS` is used for advertising (Bonjour)
119124

120-
### TODO
125+
## TODO
121126

122127
* ESP32 Arduino version (ESP32 Arduino is base on RTOS and it is not hard to port).
123128

124129

125-
### More examples and demos
130+
## More examples and demos
126131

127132
* Check [esp-homekit-demo](https://github.com/maximkulkin/esp-homekit-demo)
128133

129-
### Troubleshooting
134+
## Troubleshooting
130135

131136
* Check your serial output with [example_serial_output.txt](https://raw.github.com/Mixiaoxiao/Arduino-HomeKit-ESP8266/master/example_serial_output.txt)
132137

133-
### Thanks
138+
## Thanks
134139
- [esp-homekit](https://github.com/maximkulkin/esp-homekit)
135140
- [esp-homekit-demo](https://github.com/maximkulkin/esp-homekit-demo)
136141
- [esp_hw_wdt](https://github.com/ComSuite/esp_hw_wdt)

extras/preview.jpg

158 KB
Loading

0 commit comments

Comments
 (0)