HomeACcessoryKid / ESP8266-HomeKit-Demo

User part of the ESP8266-HomeKit foundation
https://www.youtube.com/watch?v=Xnr-utWDIR8
Apache License 2.0
125 stars 27 forks source link

Pairing failing on Sonoff #19

Closed maccoylton closed 7 years ago

maccoylton commented 7 years ago

Hi, when I try to pair the pairing process does't finish and times out on the IOS device, tried multiple devices on IOS 10.3.2 and 11 beta 3, here's an extract from the end of the log, any help appreciated:-

send result: 0 Free heap2:15672 server sent a packet to 192.168.1.60:55518 at 2712471 p_sema locked server got a packet from 192.168.1.60:55518 at 2712712 len:584 len:584 A_dat:457,tot:457,lenght:457 dsl: 457, tl: 457, hl: 127, len: 457 normal packet saved POST/S: pair-setup C: F: pParseB: 06010303ff8f63517603c4894c989d98b78edd5b4012d1da02625213573464e981f8e043d0b7210c3fb1f39d923c8e9665d4a6a15841b4072625e8c517d10a63f143c15c55fba9e947c1d52cdb3e8b38b0ceea43101e022a202d9e2307cc6c364efd12849df377bc4f14b240d5eb2893501afc605e44706483f33bf085cc6b6bab9820c5648300733c3c500bd00e9f86370508059b4c0c682de9c9a926ccc301e28db93bcb420554911d3427e05e66560649f96e109b274bfa989ab2552ec62b7f345772d825fd0b71aeefeef324c8da711154cd780c5b0d955e8c10c51d1cd129bea9716b223729c9ae7269fb1bb6495710cdb624ee0caf60f0be1c992970a94fea5d93038147213fd31d08a6a324f9b9651d61e81055b6bb1a674f393132a533cfb7042865210c8734026489c46419502fc6edcd0ff04d8613f4715618a7f0dd268ff7b38b8a87a4ea3388003edd18cff0d1615d1a17d3014a34c8a64ba445597a2ce69e151a4086c130888267dce911292c21f05856c182ec8f57025cbd25900256c54ab8a30440fe0007fd0c0521d2de366934c4e13644cc1cf5a34f71e8d91647aac878bdefada52ae25336f6680cfe27759c17d23fcbe50283eed19ba21431b0ee303683c5c3 pair-setup t:6-n:1 t:3-n:255 t:3-n:384 t:4-n:64 3:8f63517603c4894c989d98b78edd5b4012d1da02625213573464e981f8e043d0b7210c3fb1f39d923c8e9665d4a6a15841b4072625e8c517d10a63f143c15c55fba9e947c1d52cdb3e8b38b0ceea43101e022a202d9e2307cc6c364efd12849df377bc4f14b240d5eb2893501afc605e44706483f33bf085cc6b6bab9820c5648300733c3c500bd00e9f86370508059b4c0c682de9c9a926ccc301e28db93bcb420554911d3427e05e66560649f96e109b274bfa989ab2552ec62b7f345772d825fd0b71aeefeef324c8da711154cd780c5b0d955e8c10c51d1cd129bea9716b223729c9ae7269fb1bb6495710cdb624ee0caf60f0be1c992970a94fea5d9347213fd31d08a6a324f9b9651d61e81055b6bb1a674f393132a533cfb7042865210c8734026489c46419502fc6edcd0ff04d8613f4715618a7f0dd268ff7b38b8a87a4ea3388003edd18cff0d1615d1a17d3014a34c8a64ba445597a2ce69e151a4086c130888267dce911292c21f05856c182ec8f57025cbd25900256c54ab8a3 4:fe0007fd0c0521d2de366934c4e13644cc1cf5a34f71e8d91647aac878bdefada52ae25336f6680cfe27759c17d23fcbe50283eed19ba21431b0ee303683c5c3 6:03 Free heap3:16400 Free heap4:16400 srp pair step 3! Free heap:17600 pairing 1, heap 11784, system time=2713093 key: 47c6a5a777243aae0b72cd5e64b9410a52169b4e80241f71d612058c542125cae2b4b14dc9207003f090a0730138e71deacd9a696159285070431a969f8c41e3 i=0,t=6,l=1 i=8,t=4,l=64 chunked_len: 85 485454502f312e3120323030204f4b0d0a436f6e74656e742d747970653a206170706c69636174696f6e2f70616972696e672b746c76380d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a330d0a0601040d0a34320d0a044001000000f076ff3f0000000000000000f5071040f027ff3f01000000fa051040f076ff3f000000002826ff3f0682234000000000b588380000000000000000000d0a300d0a0d0a to be sent by tlv8_send routine arg=3fffb8b0, ptrespconn=3fff2ab8, pcryp=3fffb8b0 send result: 0 waiting for task server sent a packet to 192.168.1.60:55518 at 2714468 client 192.168.1.60:55518 disconnected with status 0 Cleaning 3fffb8b0 @ 2714470 CID: 1 Freeing 3fffb8b0 @ 2714471 pairing 1, heap 18528, system time=2716093 pairing 1, heap 18528, system time=2719093 pairing 1, heap 18528, system time=2722093 pairing 1, heap 18528, system time=2725093 chas: 1.9=valT -> bool

HomeACcessoryKid commented 7 years ago

Hi,

The last binary blob with length 85 ends with 64 bytes of the 'proof'. The fact it contains many zeros seems suspicious to me. Please check if previous steps were OK? Also consider to start from scratch (change the signature or use the factory URL).

BR, HacK

On 28 Jul 2017, at 08:59, maccoylton notifications@github.com wrote:

Hi When I try to pair the pairing process does't finish and time out on the IOS device, tried multiple devices on IOS 10.3.2 and 11 beta 3, here's and extract form the end of the log, and help appreciated:-

send result: 0 Free heap2:15672 server sent a packet to 192.168.1.60:55518 at 2712471 p_sema locked server got a packet from 192.168.1.60:55518 at 2712712 len:584 len:584 A_dat:457,tot:457,lenght:457 dsl: 457, tl: 457, hl: 127, len: 457 normal packet saved POST/S: pair-setup C: F: pParseB: 06010303ff8f63517603c4894c989d98b78edd5b4012d1da02625213573464e981f8e043d0b7210c3fb1f39d923c8e9665d4a6a15841b4072625e8c517d10a63f143c15c55fba9e947c1d52cdb3e8b38b0ceea43101e022a202d9e2307cc6c364efd12849df377bc4f14b240d5eb2893501afc605e44706483f33bf085cc6b6bab9820c5648300733c3c500bd00e9f86370508059b4c0c682de9c9a926ccc301e28db93bcb420554911d3427e05e66560649f96e109b274bfa989ab2552ec62b7f345772d825fd0b71aeefeef324c8da711154cd780c5b0d955e8c10c51d1cd129bea9716b223729c9ae7269fb1bb6495710cdb624ee0caf60f0be1c992970a94fea5d93038147213fd31d08a6a324f9b9651d61e81055b6bb1a674f393132a533cfb7042865210c8734026489c46419502fc6edcd0ff04d8613f4715618a7f0dd268ff7b38b8a87a4ea3388003edd18cff0d1615d1a17d3014a34c8a64ba445597a2ce69e151a4086c130888267dce911292c21f05856c182ec8f57025cbd25900256c54ab8a30440fe0007fd0c0521d2de366934c4e13644cc1cf5a34f71e8d91647aac878bdefada52ae25336f6680cfe27759c17d23fcbe50283eed19ba21431b0ee303683c5c3 pair-setup t:6-n:1 t:3-n:255 t:3-n:384 t:4-n:64 3:8f63517603c4894c989d98b78edd5b4012d1da02625213573464e981f8e043d0b7210c3fb1f39d923c8e9665d4a6a15841b4072625e8c517d10a63f143c15c55fba9e947c1d52cdb3e8b38b0ceea43101e022a202d9e2307cc6c364efd12849df377bc4f14b240d5eb2893501afc605e44706483f33bf085cc6b6bab9820c5648300733c3c500bd00e9f86370508059b4c0c682de9c9a926ccc301e28db93bcb420554911d3427e05e66560649f96e109b274bfa989ab2552ec62b7f345772d825fd0b71aeefeef324c8da711154cd780c5b0d955e8c10c51d1cd129bea9716b223729c9ae7269fb1bb6495710cdb624ee0caf60f0be1c992970a94fea5d9347213fd31d08a6a324f9b9651d61e81055b6bb1a674f393132a533cfb7042865210c8734026489c46419502fc6edcd0ff04d8613f4715618a7f0dd268ff7b38b8a87a4ea3388003edd18cff0d1615d1a17d3014a34c8a64ba445597a2ce69e151a4086c130888267dce911292c21f05856c182ec8f57025cbd25900256c54ab8a3 4:fe0007fd0c0521d2de366934c4e13644cc1cf5a34f71e8d91647aac878bdefada52ae25336f6680cfe27759c17d23fcbe50283eed19ba21431b0ee303683c5c3 6:03 Free heap3:16400 Free heap4:16400 srp pair step 3! Free heap:17600 pairing 1, heap 11784, system time=2713093 key: 47c6a5a777243aae0b72cd5e64b9410a52169b4e80241f71d612058c542125cae2b4b14dc9207003f090a0730138e71deacd9a696159285070431a969f8c41e3 i=0,t=6,l=1 i=8,t=4,l=64 chunked_len: 85 485454502f312e3120323030204f4b0d0a436f6e74656e742d747970653a206170706c69636174696f6e2f70616972696e672b746c76380d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a330d0a0601040d0a34320d0a044001000000f076ff3f0000000000000000f5071040f027ff3f01000000fa051040f076ff3f000000002826ff3f0682234000000000b588380000000000000000000d0a300d0a0d0a to be sent by tlv8_send routine arg=3fffb8b0, ptrespconn=3fff2ab8, pcryp=3fffb8b0 send result: 0 waiting for task server sent a packet to 192.168.1.60:55518 at 2714468 client 192.168.1.60:55518 disconnected with status 0 Cleaning 3fffb8b0 @ 2714470 CID: 1 Freeing 3fffb8b0 @ 2714471 pairing 1, heap 18528, system time=2716093 pairing 1, heap 18528, system time=2719093 pairing 1, heap 18528, system time=2722093 pairing 1, heap 18528, system time=2725093 chas: 1.9=valT -> bool

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

maccoylton commented 7 years ago

Thanks for the response, what is the factory URL?

HomeACcessoryKid commented 7 years ago

If you dig into the code that parses the url you will find it

BR, HacK

On 31 Jul 2017, at 08:38, maccoylton notifications@github.com wrote:

Thanks for the response, what is the factory URL?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

maccoylton commented 7 years ago

Looks like for those looking for a quick answer it's x.x.x.x:661/factory.

Here's the full trace from factory reset to pairing timed out on IOS device, any suggestions would be appreciated:-

GET/S: factory C: F: factory reset state: 5 -> 0 (0) rm 0 pm close 7 0 0/3030750128 del if0 usl sul 0 0 client 192.168.1.5:53840 disconnected with status -11 Cleaning 3fffb8b0 @ 3034038 CID: 1 �@r��P���K�t�dr�,@��.�Ѫ�Ko8a ���T������P۬�@������nzAl )�m~�V�H~t�R���@j|��������nzA��8x�vA,Z[!�(��(A��{~An ���R�����P�/���*�␋��nzAn )�m~�XZ�r�(���OS SDK ver: 1.5.0-dev(950076a) compiled @ Nov 4 2016 19:29:32 phy ver: 1055, pp ver: 10.7

rf cal sector: 11 tcpip_task_hdl : 3fff0e10, prio:10,stack:512 idle_task_hdl : 3fff0eb0,prio:0, stack:384 tim_task_hdl : 3fff3468, prio:2,stack:512 start of user_init @ç 99 hkc by HomeACcessoryKid! Compiled Jul 27 2017@21:14:19 Heap: 47704 EspMsgMutex created 48696c644040616161636e607041606400 initializing flash ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff key written: 0 eef083e29a0ef7d205cb430c94ecc9ee9cef7bf8773995e1707893e56ff52c625c760285e75da5975513dd04ec8e53fc47e0ce701516f01310d32b5bafb20fbf pairing: 1 ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff myUsername: 5C:CF:7F:96:28:43 end of user_init @ 298 mode : sta(5c:cf:7f:96:28:43) add if0 system time: 309 s: 85dce383d3a9a5a859582ec0613c7425 b: b79e6ad33022d4ac2af2c6f7eebd6b3c06062b469a0a32a06ccdb46ea1026b9a scandone state: 0 -> 2 (b0) state: 2 -> 3 (0) state: 3 -> 5 (10) add 0 aid 8 pm open phy_2,type:2 0 0 cnt

connected with MacCoylton-WiFi, channel 6 dhcp client start... ip:192.168.1.63,mask:255.255.255.0,gw:192.168.1.254 srp_prepare done: system time: 25776 B: 3a29ac3623d5f4aaf3f0ac2cd7bf5f14641ca76d331da5f4237eb174cc73aa4ca72bdbf1cd9a4e92f25fb4339809b022abebf4d34c164088ab43e28c7aa2d478e85f8e13ce6cd3a6abf8610c182dff70fcb45dec0f647b73e9e34f88bf59c7e1775720d2111ce320a93b248467e700b7bc85283467b890abb122ec7fcbbf132c922aa6eaf917ea6bd800860c1f1981d85eb67ad3b4d9f1b9aa66f3c3ee456502e338d20b4cf477d1fbc50b0ccf0d542142c311e5bf83a342f44d59aaeb277f52b073c0081cafad7e1a378133034347092a17f6789cf61d0b89c43d7002a0b9767d57a9d2d47070c76fc5f7276a95f7cd346f8676ba1dacb8ba2dced352f78d9d9db2f31b8493852a99e873acbe01cb58bf135e4c7a0a815c2f34bd01dc619787b20b5f5a9a09e94c097e331a779f3636ee9ec7a257e1d5c2ad102509eac994483a0867b23ff19864ce1749e80b21fbca64ead0b9302afd0207c72ee8175ca8be84c894aa0c48aa1cd7023128206a310c48eb861d071f5840c70bde4246aa76d4 ServerInitPriority:1 pairing 1, heap 31728, system time=25883 waiting for task pairing 1, heap 31728, system time=28882 pairing 1, heap 31728, system time=31882 pairing 1, heap 31728, system time=34882 pairing 1, heap 31728, system time=37882 pairing 1, heap 31728, system time=40882 pairing 1, heap 31728, system time=43882 pairing 1, heap 31728, system time=46882 pairing 1, heap 31728, system time=49882 pairing 1, heap 31728, system time=52882 pairing 1, heap 31728, system time=55882 pairing 1, heap 31728, system time=58882 pairing 1, heap 31728, system time=61882 pairing 1, heap 31728, system time=64882 pairing 1, heap 31728, system time=67882 pairing 1, heap 31728, system time=70882 pairing 1, heap 31728, system time=73882 pairing 1, heap 31728, system time=76882 pairing 1, heap 31728, system time=79882 pairing 1, heap 31728, system time=82882 pairing 1, heap 31728, system time=85882 pairing 1, heap 31728, system time=88882 pairing 1, heap 31728, system time=91882 pairing 1, heap 31728, system time=94882 pairing 1, heap 31728, system time=97882 pairing 1, heap 31728, system time=100882 pairing 1, heap 31728, system time=103882 pairing 1, heap 31728, system time=106882 pairing 1, heap 31728, system time=109882 pairing 1, heap 31728, system time=112882 pairing 1, heap 31728, system time=115882 pairing 1, heap 31728, system time=118882 pairing 1, heap 31728, system time=121882 pairing 1, heap 31728, system time=124882 pairing 1, heap 31728, system time=127882 pairing 1, heap 31728, system time=130882 pairing 1, heap 31728, system time=133882 pairing 1, heap 31728, system time=136882 pairing 1, heap 31728, system time=139882 pairing 1, heap 31728, system time=142882 pairing 1, heap 31728, system time=145882 pairing 1, heap 31728, system time=148882 pairing 1, heap 31728, system time=151882 pairing 1, heap 31728, system time=154882 pairing 1, heap 31728, system time=157882 pairing 1, heap 31728, system time=160882 pairing 1, heap 31728, system time=163882 pairing 1, heap 31728, system time=166882 pairing 1, heap 31728, system time=169882 pairing 1, heap 31728, system time=172882 pairing 1, heap 31728, system time=175882 pairing 1, heap 31728, system time=178882 pairing 1, heap 31728, system time=181882 pairing 1, heap 31728, system time=184882 pairing 1, heap 31728, system time=187882 pairing 1, heap 31728, system time=190882 pairing 1, heap 31728, system time=193882 pairing 1, heap 31728, system time=196882 pairing 1, heap 31728, system time=199882 pairing 1, heap 31728, system time=202882 pairing 1, heap 31728, system time=205882 pairing 1, heap 31728, system time=208882 p_sema taken 3fff27b8 connects from 192.168.1.60:50504 id:00000001 p_sema locked server got a packet from 192.168.1.60:50504 at 210358 len:131 len:131 A_dat:6,tot:6,lenght:6 dsl: 6, tl: 6, hl: 125, len: 6 normal packet saved POST/S: pair-setup C: F: pParseB: 000100060101 pair-setup t:0-n:1 t:6-n:1 0:00 6:01 Free heap1:30472 srp pair step 1! Free heap:30032 s: 85dce383d3a9a5a859582ec0613c7425 i=0,t=6,l=1 i=8,t=2,l=16 i=32,t=3,l=384 chunked_len: 432 Priority:10 485454502f312e3120323030204f4b0d0a436f6e74656e742d747970653a206170706c69636174696f6e2f70616972696e672b746c76380d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a330d0a0601020d0a31320d0a021085dce383d3a9a5a859582ec0613c74250d0a3138340d0a03ff3a29ac3623d5f4aaf3f0ac2cd7bf5f14641ca76d331da5f4237eb174cc73aa4ca72bdbf1cd9a4e92f25fb4339809b022abebf4d34c164088ab43e28c7aa2d478e85f8e13ce6cd3a6abf8610c182dff70fcb45dec0f647b73e9e34f88bf59c7e1775720d2111ce320a93b248467e700b7bc85283467b890abb122ec7fcbbf132c922aa6eaf917ea6bd800860c1f1981d85eb67ad3b4d9f1b9aa66f3c3ee456502e338d20b4cf477d1fbc50b0ccf0d542142c311e5bf83a342f44d59aaeb277f52b073c0081cafad7e1a378133034347092a17f6789cf61d0b89c43d7002a0b9767d57a9d2d47070c76fc5f7276a95f7cd346f8676ba1dacb8ba2dced352f78d03819d9db2f31b8493852a99e873acbe01cb58bf135e4c7a0a815c2f34bd01dc619787b20b5f5a9a09e94c097e331a779f3636ee9ec7a257e1d5c2ad102509eac994483a0867b23ff19864ce1749e80b21fbca64ead0b9302afd0207c72ee8175ca8be84c894aa0c48aa1cd7023128206a310c48eb861d071f5840c70bde4246aa76d40d0a300d0a0d0a to be sent by tlv8_send routine arg=3fff2a28, ptrespconn=3fff27b8, pcryp=3fff2a28 send result: 0 Free heap2:28832 server sent a packet to 192.168.1.60:50504 at 210723 pairing 1, heap 30512, system time=211882 pairing 1, heap 30512, system time=214882 pairing 1, heap 30512, system time=217882 3fff27b8 conn, rev:3fff0bf8, nxt:00000000, act:3, 192.168.1.60:50504, cid:01 pairing 1, heap 30512, system time=220882 pairing 1, heap 30512, system time=223882 p_sema locked server got a packet from 192.168.1.60:50504 at 224776 len:584 len:584 A_dat:457,tot:457,lenght:457 dsl: 457, tl: 457, hl: 127, len: 457 normal packet saved POST/S: pair-setup C: F: pParseB: 06010303ff40d55a3ae16aea6950b8c0031d1c62e1c59f456d5a18d904449f0490c90451c897906f5cb4096e9e3c63b15ff50e2a7d14e9ee065df2f74ac50b0ffa9932c444f2ba370309cbd5a98336846be32e89f80b10b4ccf50eb22a1d1095085b85544e9a2d28363d67edd7165d0aa5658ec3956ca311f374afc75f743541f234790725e82538c380c3831695d9df5184f71893adb03d00954497a556bbe348676052c6f09a38104240ee9721e2700fd5e3d44e85d510476f9f4ff48b992e1a54949287e11aa9b1effbd67bc53e1cd064e9ab7288839611a77a0d1b1daee3905f8703354670951c066fccaf1c90f72bddeff69440523914fe0f114acfd3b47a8bb060038149643f0a6d679ac657be5bb5f5c25c1e9d54163524f90431cd866ad2e59dcf2b211932b2be9f4838b6d478dfd5aa2ff384cbd8828d8780904087cc2af5c135c16626eeef381b075c271e474f48e3cdd19631984f7b31a7a27bbe2b9e7e37322d2dd8237627f11b799fd3513953c53ed2712998a0317c73b8a9a659bccff482c126044025e537b430e70183cbb3a850ffa0ddbbd0e0b25f3c1c4439b1fa78fec9b560a3cadb30814836333276d382fe5c6a9cae72e98829cc5fbec6cd871f45707e1f2f pair-setup t:6-n:1 t:3-n:255 t:3-n:384 t:4-n:64 3:40d55a3ae16aea6950b8c0031d1c62e1c59f456d5a18d904449f0490c90451c897906f5cb4096e9e3c63b15ff50e2a7d14e9ee065df2f74ac50b0ffa9932c444f2ba370309cbd5a98336846be32e89f80b10b4ccf50eb22a1d1095085b85544e9a2d28363d67edd7165d0aa5658ec3956ca311f374afc75f743541f234790725e82538c380c3831695d9df5184f71893adb03d00954497a556bbe348676052c6f09a38104240ee9721e2700fd5e3d44e85d510476f9f4ff48b992e1a54949287e11aa9b1effbd67bc53e1cd064e9ab7288839611a77a0d1b1daee3905f8703354670951c066fccaf1c90f72bddeff69440523914fe0f114acfd3b47a8bb06049643f0a6d679ac657be5bb5f5c25c1e9d54163524f90431cd866ad2e59dcf2b211932b2be9f4838b6d478dfd5aa2ff384cbd8828d8780904087cc2af5c135c16626eeef381b075c271e474f48e3cdd19631984f7b31a7a27bbe2b9e7e37322d2dd8237627f11b799fd3513953c53ed2712998a0317c73b8a9a659bccff482c126 4:25e537b430e70183cbb3a850ffa0ddbbd0e0b25f3c1c4439b1fa78fec9b560a3cadb30814836333276d382fe5c6a9cae72e98829cc5fbec6cd871f45707e1f2f 6:03 Free heap3:29592 Free heap4:29592 srp pair step 3! Free heap:30792 pairing 1, heap 9000, system time=226882 3fff27b8 conn, rev:3fff0bf8, nxt:00000000, act:3, 192.168.1.60:50504, cid:01 pairing 1, heap 11048, system time=229892 pairing 1, heap 9000, system time=232902 pairing 1, heap 11048, system time=235912 pairing 1, heap 11048, system time=238922 3fff27b8 conn, rev:3fff0bf8, nxt:00000000, act:3, 192.168.1.60:50504, cid:01 pairing 1, heap 22744, system time=241922 pairing 1, heap 6816, system time=244932 pairing 1, heap 6816, system time=247932 key: 66a1aba4bb6a7ee7e4bc9bbf29cdb8378683517cacf942d4dbc859f6921cf5801f5d098accfe18b9f243fd3bc24769fa6d9c95f930cfd2973780360605e9f5c5 i=0,t=6,l=1 i=8,t=4,l=64 chunked_len: 85 485454502f312e3120323030204f4b0d0a436f6e74656e742d747970653a206170706c69636174696f6e2f70616972696e672b746c76380d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a330d0a0601040d0a34320d0a044001000000f076ff3f0000000000000000f50710404827ff3f01000000fa051040f076ff3f000000002826ff3f0682234000000000710a000000000000000000000d0a300d0a0d0a to be sent by tlv8_send routine arg=3fff2a28, ptrespconn=3fff27b8, pcryp=3fff2a28 send result: 0 waiting for task pairing 1, heap 28784, system time=250942 server sent a packet to 192.168.1.60:50504 at 250944 client 192.168.1.60:50504 disconnected with status 0 Cleaning 3fff2a28 @ 250951 CID: 1 Freeing 3fff2a28 @ 250952 pairing 1, heap 31640, system time=253942 pairing 1, heap 31640, system time=256942 p_sema taken 3fff2a28 connects from 192.168.1.60:50505 id:00000001 p_sema locked server got a packet from 192.168.1.60:50505 at 257680 len:131 len:131 A_dat:6,tot:6,lenght:6 dsl: 6, tl: 6, hl: 125, len: 6 normal packet saved POST/S: pair-setup C: F: pParseB: 000100060101 pair-setup t:0-n:1 t:6-n:1 0:00 6:01 Free heap1:30408 srp pair step 1! Free heap:29968 s: 85dce383d3a9a5a859582ec0613c7425 i=0,t=6,l=1 i=8,t=2,l=16 i=32,t=3,l=384 chunked_len: 432 Priority:10 485454502f312e3120323030204f4b0d0a436f6e74656e742d747970653a206170706c69636174696f6e2f70616972696e672b746c76380d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a330d0a0601020d0a31320d0a021085dce383d3a9a5a859582ec0613c74250d0a3138340d0a03ff3a29ac3623d5f4aaf3f0ac2cd7bf5f14641ca76d331da5f4237eb174cc73aa4ca72bdbf1cd9a4e92f25fb4339809b022abebf4d34c164088ab43e28c7aa2d478e85f8e13ce6cd3a6abf8610c182dff70fcb45dec0f647b73e9e34f88bf59c7e1775720d2111ce320a93b248467e700b7bc85283467b890abb122ec7fcbbf132c922aa6eaf917ea6bd800860c1f1981d85eb67ad3b4d9f1b9aa66f3c3ee456502e338d20b4cf477d1fbc50b0ccf0d542142c311e5bf83a342f44d59aaeb277f52b073c0081cafad7e1a378133034347092a17f6789cf61d0b89c43d7002a0b9767d57a9d2d47070c76fc5f7276a95f7cd346f8676ba1dacb8ba2dced352f78d03819d9db2f31b8493852a99e873acbe01cb58bf135e4c7a0a815c2f34bd01dc619787b20b5f5a9a09e94c097e331a779f3636ee9ec7a257e1d5c2ad102509eac994483a0867b23ff19864ce1749e80b21fbca64ead0b9302afd0207c72ee8175ca8be84c894aa0c48aa1cd7023128206a310c48eb861d071f5840c70bde4246aa76d40d0a300d0a0d0a to be sent by tlv8_send routine arg=3fff2a78, ptrespconn=3fff2a28, pcryp=3fff2a78 send result: 0 Free heap2:28768 server sent a packet to 192.168.1.60:50505 at 257958 p_sema locked server got a packet from 192.168.1.60:50505 at 258138 len:584 len:584 A_dat:457,tot:457,lenght:457 dsl: 457, tl: 457, hl: 127, len: 457 normal packet saved POST/S: pair-setup C: F: pParseB: 06010303ffcf4d388cf3a80fbf1d905d6f47337e15643c91d2eb3a8a797f9973c1bd64eafc1b675cc0bf0a9c3306377cd6451db0147559197ae67dc68a778768baf0a7c7dec5b912ce3afc480e28a0a2f59af7e8d5348e38822b5ed9d337a7933036b1d3757eba69798c1531f13bbd9cfbb310649436c25e95dd0142c28d5c769a57e14f3bbf48d8539ed62fb1d8b0de795fcba8f190c62defa02406cdfce22a25320ecdd3489e86b755332d0ed58bdd303bce6d143db572919285eb8ff2360503268eba5530dc3343ce49fc5b81f1d944398e881c42c8aa2942855aa52b2f123b79f5f548143ca8b862b06b6cc5ac37bf71cc47cc48cdbb749205e9d1d4a9342bfb3bc80381290d9fdd2b09e10e47e72ca3715bd5b6db5965c2f2a569b80e6b7fe2249b6553d370054b2240a9e014850585352f43968159eede8a501b914fa3d759d94d3f57a4db61a94d45959ff2a25ba4958fd9eb78de7b15d1e2fecca966ce73aa69cc620c3a5f105939aa800d84adf6f15da7bd96cf0e102575852921bf856c66237d385c0440518514d7d5a2e329a7412680dca37086d4e6dbc1bc725bf24489d3fe1eeda3a91e8fa3ddb2a7c6cddb491f0096bf398f34e490a9a3049fe5968f3c595eda69ec pair-setup t:6-n:1 t:3-n:255 t:3-n:384 t:4-n:64 3:cf4d388cf3a80fbf1d905d6f47337e15643c91d2eb3a8a797f9973c1bd64eafc1b675cc0bf0a9c3306377cd6451db0147559197ae67dc68a778768baf0a7c7dec5b912ce3afc480e28a0a2f59af7e8d5348e38822b5ed9d337a7933036b1d3757eba69798c1531f13bbd9cfbb310649436c25e95dd0142c28d5c769a57e14f3bbf48d8539ed62fb1d8b0de795fcba8f190c62defa02406cdfce22a25320ecdd3489e86b755332d0ed58bdd303bce6d143db572919285eb8ff2360503268eba5530dc3343ce49fc5b81f1d944398e881c42c8aa2942855aa52b2f123b79f5f548143ca8b862b06b6cc5ac37bf71cc47cc48cdbb749205e9d1d4a9342bfb3bc8290d9fdd2b09e10e47e72ca3715bd5b6db5965c2f2a569b80e6b7fe2249b6553d370054b2240a9e014850585352f43968159eede8a501b914fa3d759d94d3f57a4db61a94d45959ff2a25ba4958fd9eb78de7b15d1e2fecca966ce73aa69cc620c3a5f105939aa800d84adf6f15da7bd96cf0e102575852921bf856c66237d385c 4:518514d7d5a2e329a7412680dca37086d4e6dbc1bc725bf24489d3fe1eeda3a91e8fa3ddb2a7c6cddb491f0096bf398f34e490a9a3049fe5968f3c595eda69ec 6:03 Free heap3:29512 Free heap4:29512 srp pair step 3! Free heap:30712 pairing 1, heap 10984, system time=259942 pairing 1, heap 8936, system time=262942 3fff2a28 conn, rev:3fff0bf8, nxt:00000000, act:3, 192.168.1.60:50505, cid:01 pairing 1, heap 8936, system time=265942 pairing 1, heap 8936, system time=268942 pairing 1, heap 10984, system time=271942 pairing 1, heap 24808, system time=274942 3fff2a28 conn, rev:3fff0bf8, nxt:00000000, act:3, 192.168.1.60:50505, cid:01 pairing 1, heap 8776, system time=277942 pairing 1, heap 8776, system time=280942 key: c38bc8b38ea665abd8978abe633485a96da18bee7f8ae1b294ddd24aa63ded0a9eca3c4affb93c396e394dbfb1370659504048f780a0220a833c688b0b676961 i=0,t=6,l=1 i=8,t=4,l=64 chunked_len: 85 485454502f312e3120323030204f4b0d0a436f6e74656e742d747970653a206170706c69636174696f6e2f70616972696e672b746c76380d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a330d0a0601040d0a34320d0a044001000000f076ff3f0000000000000000f507pairing 1, heap 30104, system time=283942 10405829ff3f01000000fa051040f076ff3f000000002826ff3f06822340000000003562000000000000000000000d0a300d0a0d0a to be sent by tlv8_send routine arg=3fff2a78, ptrespconn=3fff2a28, pcryp=3fff2a78 send result: 0 waiting for task server sent a packet to 192.168.1.60:50505 at 283978 client 192.168.1.60:50505 disconnected with status 0 Cleaning 3fff2a78 @ 283993 CID: 1 Freeing 3fff2a78 @ 283997 pairing 1, heap 31552, system time=286942 pairing 1, heap 31552, system time=289942 pairing 1, heap 31552, system time=292942 pairing 1, heap 31552, system time=295942 pairing 1, heap 31552, system time=298942 pairing 1, heap 31552, system time=301942 pairing 1, heap 31552, system time=304942 p_sema taken 3fff2a80 connects from 192.168.1.60:50507 id:00000001 p_sema locked server got a packet from 192.168.1.60:50507 at 306483 len:131 len:131 A_dat:6,tot:6,lenght:6 dsl: 6, tl: 6, hl: 125, len: 6 normal packet saved POST/S: pair-setup C: F: pParseB: 000100060101 pair-setup t:0-n:1 t:6-n:1 0:00 6:01 Free heap1:30328 srp pair step 1! Free heap:29888 s: 85dce383d3a9a5a859582ec0613c7425 i=0,t=6,l=1 i=8,t=2,l=16 i=32,t=3,l=384 chunked_len: 432 Priority:10 485454502f312e3120323030204f4b0d0a436f6e74656e742d747970653a206170706c69636174696f6e2f70616972696e672b746c76380d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a330d0a0601020d0a31320d0a021085dce383d3a9a5a859582ec0613c74250d0a3138340d0a03ff3a29ac3623d5f4aaf3f0ac2cd7bf5f14641ca76d331da5f4237eb174cc73aa4ca72bdbf1cd9a4e92f25fb4339809b022abebf4d34c164088ab43e28c7aa2d478e85f8e13ce6cd3a6abf8610c182dff70fcb45dec0f647b73e9e34f88bf59c7e1775720d2111ce320a93b248467e700b7bc85283467b890abb122ec7fcbbf132c922aa6eaf917ea6bd800860c1f1981d85eb67ad3b4d9f1b9aa66f3c3ee456502e338d20b4cf477d1fbc50b0ccf0d542142c311e5bf83a342f44d59aaeb277f52b073c0081cafad7e1a378133034347092a17f6789cf61d0b89c43d7002a0b9767d57a9d2d47070c76fc5f7276a95f7cd346f8676ba1dacb8ba2dced352f78d03819d9db2f31b8493852a99e873acbe01cb58bf135e4c7a0a815c2f34bd01dc619787b20b5f5a9a09e94c097e331a779f3636ee9ec7a257e1d5c2ad102509eac994483a0867b23ff19864ce1749e80b21fbca64ead0b9302afd0207c72ee8175ca8be84c894aa0c48aa1cd7023128206a310c48eb861d071f5840c70bde4246aa76d40d0a300d0a0d0a to be sent by tlv8_send routine arg=3fff2ad0, ptrespconn=3fff2a80, pcryp=3fff2ad0 send result: 0 Free heap2:28688 server sent a packet to 192.168.1.60:50507 at 307100 p_sema locked server got a packet from 192.168.1.60:50507 at 307103 len:584 len:584 A_dat:457,tot:457,lenght:457 dsl: 457, tl: 457, hl: 127, len: 457 normal packet saved POST/S: pair-setup C: F: pParseB: 06010303ff485673f5e160fed1950488d154d0a75aed0e484d741f004c40dc31041a87c703685ea95fd7f3b1ff2b506b55ab1f802f9c073b91c7b5113f7bfa108cfc464210306d96f1a000762912dd03ff7fe93d7e99c48f31b6bcabf2662fd70bccd3beb1b67cef32bc27b156c8e24915c6b5d8e4b10c3d7d8cac5df9fbf21730d1d24da1f65ed7b1530cf2275453b6e09b5cf74b1da3cf42d9dbb4d2f6218339e68c9084efc703d8978e748b5c90293fa0f0e8a12aa0566bf11573f7d116d7daa4825b8cc1fbfad51c8621f15d8cd5fa2836f5ce99298a5bac4b563fe390e28092a5fd3c617458b7c5f59099d99b643601571c7bceaafc0fdb2183f6bfb86d403f9530038157a1204cb312788dbba6812183f6a57a7693f02773d9bc69d9b394b316a7db6305c969fbb20027ccf672d0316987dcdb36685d59fcb4f50d452fc0d07375400c4c6b9a2546a0f09a9cfb09f23105620ff5dc5266f14c8a1055ce0e41abc4c796060eb5783b6caeb2e5a1c2ae49957701812a367e2d882d5fef53af923bf81b92f204400c2d9c6eb41ce8abbe3c3b26997eb911fad6707bd6465724622f1d71cc6796864df34562fe989d9637d8e7877b3c40bdff67d302baf53fea5f7eded6489f43fe pair-setup t:6-n:1 t:3-n:255 t:3-n:384 t:4-n:64 3:485673f5e160fed1950488d154d0a75aed0e484d741f004c40dc31041a87c703685ea95fd7f3b1ff2b506b55ab1f802f9c073b91c7b5113f7bfa108cfc464210306d96f1a000762912dd03ff7fe93d7e99c48f31b6bcabf2662fd70bccd3beb1b67cef32bc27b156c8e24915c6b5d8e4b10c3d7d8cac5df9fbf21730d1d24da1f65ed7b1530cf2275453b6e09b5cf74b1da3cf42d9dbb4d2f6218339e68c9084efc703d8978e748b5c90293fa0f0e8a12aa0566bf11573f7d116d7daa4825b8cc1fbfad51c8621f15d8cd5fa2836f5ce99298a5bac4b563fe390e28092a5fd3c617458b7c5f59099d99b643601571c7bceaafc0fdb2183f6bfb86d403f953057a1204cb312788dbba6812183f6a57a7693f02773d9bc69d9b394b316a7db6305c969fbb20027ccf672d0316987dcdb36685d59fcb4f50d452fc0d07375400c4c6b9a2546a0f09a9cfb09f23105620ff5dc5266f14c8a1055ce0e41abc4c796060eb5783b6caeb2e5a1c2ae49957701812a367e2d882d5fef53af923bf81b92f2 4:0c2d9c6eb41ce8abbe3c3b26997eb911fad6707bd6465724622f1d71cc6796864df34562fe989d9637d8e7877b3c40bdff67d302baf53fea5f7eded6489f43fe 6:03 Free heap3:29416 Free heap4:29416 srp pair step 3! Free heap:30616 pairing 1, heap 21640, system time=307942 pairing 1, heap 10872, system time=310942 3fff2a80 conn, rev:3fff0bf8, nxt:00000000, act:3, 192.168.1.60:50507, cid:01 pairing 1, heap 10872, system time=313942 pairing 1, heap 8824, system time=316952 pairing 1, heap 10872, system time=319952 pairing 1, heap 8824, system time=322962 3fff2a80 conn, rev:3fff0bf8, nxt:00000000, act:3, 192.168.1.60:50507, cid:01 pairing 1, heap 8688, system time=325972 pairing 1, heap 6640, system time=328982 pairing 1, heap 8688, system time=331992 key: c9936883b29f01075c6c559c9369d912d4cfc009faf159716eb0797a95970ddc53444829ffa17c9743f25b17df975e1a0b9f0eb3018b8fc6c0ebabad00de8af2 i=0,t=6,l=1 i=8,t=4,l=64 chunked_len: 85 485454502f312e3120323030204f4b0d0a436f6e74656e742d747970653a206170706c69636174696f6e2f70616972696e672b746c76380d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a330d0a0601040d0a34320d0a044001000000f076ff3f000000001b000000f50710405829ff3f01000000fa051040f076ff3f000000002826ff3f0682234000000000446f000000000000000000000d0a300d0a0d0a to be sent by tlv8_send routine arg=3fff2ad0, ptrespconn=3fff2a80, pcryp=3fff2ad0 send result: 0 waiting for task server sent a packet to 192.168.1.60:50507 at 333208 client 192.168.1.60:50507 disconnected with status 0 Cleaning 3fff2ad0 @ 333212 CID: 1 Freeing 3fff2ad0 @ 333212 pairing 1, heap 31480, system time=335002 pairing 1, heap 31480, system time=338002 pairing 1, heap 31480, system time=341002 pairing 1, heap 31480, system time=344002 pairing 1, heap 31480, system time=347002 pairing 1, heap 31480, system time=350002

ageorgios commented 7 years ago

did you succeed to make sonoff basic work as a standalone homekit device?

maccoylton commented 7 years ago

It compiles, installs and runs, however the paring process doesn't complete as per the trace posted earlier in this topic. Looking for help to debug

HomeACcessoryKid commented 7 years ago

I don’t have a lot of time now, but the fact that the ‘proof’ contains that many zeros is the direct lead to the root cause.

Maybe you should be adding more debug statements to pin down if any of the intermediate steps actually deliver an error. Maybe the random generator doesn’t;t work in this chip?

Good luck, HacK

On 2 Aug 2017, at 00:06, maccoylton notifications@github.com wrote:

It compiles, installs and runs, however the paring process doesn't complete as per the trace posted earlier in this topic. Looking for help to debug

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/HomeACcessoryKid/ESP8266-HomeKit-Demo/issues/19#issuecomment-319510961, or mute the thread https://github.com/notifications/unsubscribe-auth/AV0HQlmu8jNGsbnBD5drwn8H0uZrZqiTks5sT6FygaJpZM4OmOcC.

maccoylton commented 7 years ago

I created a new home and it paired first time, so is this related to doing a factory reset and not having the random name change in my build?

HomeACcessoryKid commented 7 years ago

I guess that is right. The evidence is gone anyway with that new Home. Please close the issue if you are fine with the answer.