Yurik72 / ESPHap

ESP32/ESP8266 Arduino library for native Apple Homekit Accessory Protocol (HAP)
MIT License
265 stars 60 forks source link

Update Characteristics some time failure and didn't received by device #49

Closed Yurik72 closed 3 years ago

Yurik72 commented 3 years ago

Based on Window Covering Blind Example I am seeing intermittent callback failure. In some cases, I am getting a callback, but the data passed fails to pass a comparison for characteristic type. Other times sending a command from the Home app doesn't generate a callback. I do get this output:

10:57:52.159 -> >>> HomeKit: [Client 1073701940] Got 191 incomming data, encrypted is 10:57:52.159 -> >>> HomeKit: [Client 1073701940] Update Characteristics but it is not triggering a callback.

Here is my sketch:

Yurik72 commented 3 years ago

This is cause by limitation of TCP stack Reproduced within option V2 low memory (TCP_MSS=562) Not reproduced with V2 higher bandwidth (TCP_MSS=1460)

As well chunked attempts implemented to try send all packet. Further to be investigated more. But Recomendation is use TCP_MSS=1460