etwmc/Personal-HomeKit-HAP

Not able to pair the acessory

Opened this issue · 8 comments

Hi,

Iam trying to pair but iam stucked with following error what can be the reason anybody know. iam trying this on my ubantu meachine.

venu@venu-desktop:/media/venu/Backup/Personal-HomeKit-HAP-master$ ./PHK reset
Initial Accessory
Serial Port: -1
*** WARNING *** The program 'PHK' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=PHK
Start Connect: 10
Return len 132 for socket 10
Message: POST /pair-setup HTTP/1.1
Host: House\032Light._hap._tcp.local
Content-Length: 6
Content-Type: application/pairing+tlv8

handlePairSeup, 354: State_M1_SRPStartRequest
handlePairSeup, 603, responseBuffer = HTTP/1.1 200 OK
Content-Type: application/pairing+tlv8
Content-Length: 412

����������W2��/�ʾ���r[��R)��n5�/����������8��t�+���Y��`F�@j��IM��8���A/�;��˰tu+�"���� ��oX������

�l1ɨUd�
X���t@#4�I���R������sn��;
���
���b&o0%��#�^��h��_�+w�h���*���%q�J�γ�ڛq�����/��%�Gʧs��rO���"�@zۦ8��[�e���d�|"#����#">H�u[&����y5�Y����!��V[�4r��"t���j��V�����������k�n���������0wX �hE���I;�;���w� �|��4�S���]��, responseLen = 492
Pair Setup Transfered length 492
handlePairSeup, 388: State_M3_SRPVerifyRequest
Password Correct
handlePairSeup, 603, responseBuffer = HTTP/1.1 200 OK
Content-Type: application/pairing+tlv8
Content-Length: 69

���O�d:��t�q�
����#�U���, responseLen = 148
Pair Setup Transfered length 148
handlePairSeup, 438: State_M5_ExchangeRequest
Return len 0 for socket 10
Message: POST /pair-setup HTTP/1.1
Host: House\032Light._hap._tcp.local
Content-Length: 159
Content-Type: application/pairing+tlv8

��Kᆑ(Q2 M���fMZ��kd����&ȝȍ�cI�g
��Z&���)��N�C���0�jg�����kᴺ/�N

����!Mzð�W�Q�!�W��3��m=�2�8�g��oC�Ui���D�2u�IO�<@��X��.��/����|�$��!Jr+c���c��"��єlӜ^�T} y��#[���|;�[�9��

Stop Connect: 10
Start Connect: 11
Return len 165 for socket 11
Message: POST /pair-verify HTTP/1.1
Host: House\032Light._hap._tcp.local
Content-Length: 37
Content-Type: application/pairing+tlv8

���� �[�B�Z֝{���S$��~��<�t�����s
��Z&���)��N�C���0�jg�����kᴺ/�N

����!Mzð�W�Q�!�W��3��m=�2�8�g��oC�Ui���D�2u�IO�<@��X��.��/����|�$��!Jr+c����c����єlӜ^�T} y��#[���|;�[�9��

Start Pair Verify
Pair Verify M1
Pair Verify M3
Verify success
Successfully Connect
send: 0
send: 0
send: 1
Request: GET /accessories HTTP/1.1
Host: House\032Light._hap._tcp.local

Verify successfully!
Receive request: GET /accessories HTTP/1.1
Host: House\032Light._hap._tcp.local

Ask for accessories info
Reply: HTTP/1.1 200 OK
Content-Type: application/hap+json
Content-Length: 666

{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"value":"Light 1","perms":["pr"],"type":"23","iid":2,"format":"string"},{"value":"ET","perms":["pr"],"type":"20","iid":3,"format":"string"},{"value":"Light","perms":["pr"],"type":"21","iid":4,"format":"string"},{"value":"12345678","perms":["pr"],"type":"30","iid":5,"format":"string"},{"perms":["pw"],"type":"14","iid":6,"format":"bool"}]},{"iid":7,"type":"43","characteristics":[{"value":"Light","perms":["pr"],"type":"23","iid":8,"format":"string"},{"value":50,"minValue":0,"maxValue":100,"minStep":1,"perms":["pr","pw","ev"],"type":"8","iid":9,"unit":"percentage","format":"int"}]}]}]}
send: 1
send: 100000000000000
send: 2
Request: �va�@g ء�$m���Wt��g�R�}
�VY%��S!�#�ߓ�OHwB�)���3����0n^~8�}r,�L�:6�?ۈ��)�B�1��M{�c�ZZ"��R2�y#92+ѥ���a7y�:F�L���a�?=T.���s�������b6�����7��NѼB�M�V���҇�*�����!�
Passed-in data is no-verified!
Return len 0 for socket 11
Message:
Stop Connect: 11

etwmc commented

What app and version of code are you using? And what platform are you running it on? (To be specific, which type of endian)
It seems either the notification mess up the encryption counter, or the counter failed to properly translate during the decryption of the request.

what iOS version are you running?

it is little endian

and ios version be 9

etwmc commented

Have you tried the recent commits? I believe this has been solved.

I tried with new commit its working fine for little endian but still facing problem with bigendian.
thank u for ur support.

etwmc commented

If anyone still concern, I will go back home soon, so I will possibly get the big endian fix along with guide on OpenWRT by mid-Sep.

I'm still interested

On Sunday, 17 July 2016, etwmc notifications@github.com wrote:

If anyone still concern, I will go back home soon, so I will possibly get
the big endian fix along with guide on OpenWRT by mid-Sep.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAb3GWAjEOqK4uJjURZns39yVO6FZ1xoks5qWqpagaJpZM4GN75W
.

Hey @etwmc I bought some Omega2 from onion, in case you need more tests devices for the openwrt