ESPHap: Cannot pair with esp8266

Hello,

where can do a change? I’m experiencing pairing problem on 8266, EspHapLed example

the line Connection: close received, client will be disconnected comes when right after I press “Continue” after entering the pairing code. I have tried on NodeMCU clones, ESP-12E/F

I’m currently using latest version of the library. is there any debug I can enable to provide more information?

thanks

....scandone
state: 0 -> 2 (b0)
.state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 4
cnt 

connected with S2, channel 11
dhcp client start...
....ip:10.0.0.235,mask:255.255.255.0,gw:10.0.0.1
.
IP address: 
10.0.0.235
Free heap: 34144
init_hap_storage>>> HomeKit: init_storage_ex size 0x1c1
>>> Home Integration: hap_services added chararacteristic  0: 23 
>>> Home Integration: hap_services added chararacteristic  1: 25 
>>> Home Integration: homekit_is_paired 0
>>> HomeKit: Update the CPU to run at 160MHz
>>> HomeKit: Free heap: 32376
>>> server_new: WiFiServer begin at port: 5556

>>> HomeKit: Starting server
>>> HomeKit: storage init 0
>>> HomeKit: Using existing accessory ID: 11:2A:28:A6:CE:A5
>>> HomeKit: find pairings
>>> HomeKit: Preinit pairing context
>>> crypto_srp_new: crypto_srp_new
>>> crypto_srp_new: Initializing SRP
>>> arduino_homekit_preinit: Free heap: 27744
>>> HomeKit: Using user-specified password: 111-11-111
>>> HomeKit: Free heap: 26032
>>> HomeKit: Calculating public key len=384
pm open,type:2 0
>>> HomeKit: Calculating public key result 0
>>> HomeKit: arduino_homekit_preinit success
>>> HomeKit: Configuring mDNS
>>> HomeKit: Wifi Sleep type:2
sleep disable
>>> HomeKit: Set Wifi Sleep type :0
>>> HomeKit: MDNS.begin: SHT-112A, IP: 10.0.0.235
>>> homekit_mdns_init: Accessory Setup ID = YK72
>>> HomeKit: Init server over
>>> HomeKit: WiFiServer receives a new client (current 0, max 8)
>>> HomeKit: Got new client connection: local 10.0.0.235:5556, remote 10.0.0.50:55617
>>> HomeKit: [Client 1073700340] Got client content from the cache 0
>>> HomeKit: [Client 1073700340] new client accepted
>>> homekit_client_process: [Client 1073700340] Reading 126 bytes
>>> homekit_server_on_message_complete: http_parser message_complete
>>> homekit_server_on_pair_setup: Pair Setup
>>> homekit_server_on_pair_setup: Free heap: 23400
>>> tlv_debug: Got following TLV values:
>>> tlv_debug: Type 0 value (1 bytes): \x00
>>> tlv_debug: Type 6 value (1 bytes): \x01
>>> HomeKit: [Client 1073700340] Pair Setup Step 1/3
>>> homekit_server_on_pair_setup: Free heap: 23328
>>> send_tlv_response: [Client 1073700340] Sending TLV response
>>> tlv_debug: Got following TLV values:
>>> tlv_debug: Type 3 value (384 bytes): \xBE\xC6\xD5<\x16KR'1\xF4\x09.\x01\xF1\x8B/pl\xE4\x88[\x9F\x85\x80\x06\xE0\x18k\x92/\xE6h-\xCE|\xF2\xD1\x9F\xB2f\xB8\x9B{\xF9$\xDC\xA3>R\xA7\x9Efn\x14\x99_\x1F\x90\xB3\x13o\x05\x97\xEDxv\xE6Ew\xB4\x17\xAA|\xB8Z\xA3!\x0E\xE0y\x886\x95\xB3m\x00)\x96\xFB\x83tf\xCF\x8AQ\x8AJZ\x14\xFFU6U3\xDB\xC9\xA8\x0A\xDCN\x1F\x1B\x09>SY\xF2\x9D\xE1#J\x82c\x9EJ\xC3m4\xD3k\x92}tPa/\xC3z.\xF0r\xE3Ao2`\x187\xAB\xBD\xCE\xE6\xDC<\xF1xG\xFBr`\xAF6\xC5\xEE\xED\x90Q\x96x)wV\xC7\x92)\xEFm%\xAA\x90\xF8[\x9F\xD2:\xDD\xCC\xC6!\x80\xF5\x1B\xAC\x1F/}\xB6\x81\x0F\xAB'>\xC5\x9AH\x0BO\xE8\xCE)L\x92\xC4\x0B\xCC\xEFk\xA0\xFE:\xCC\xB0\x09R\x89\xF4\x8C\x84e[y<\xC3\x99\xA2\xBFM\xCE7XGO\xA3\x81\xB0\xAFx\xD6\xFB\xA2\x0F1n\xA6\xE5\x88\xCA\\%\xA25\xE9\x98\xE0b}\xA9\x13\xD7\x0E\xC6\xE7<0Y\xD3\xBF\x04.(\xD4\xD3\xB1U\x10\xEAm\xC8u\xCF\x92\x11:\xE2\xF2\xE0\xA5\x97\x15p\xBE\xB2\x95$\x85M\xB4\x980\x18P\x84"\x1C\xA6\x98\xE8,\xCB\x0FU\xCE\xC2};\xBBx>\x84k\xBDM\xD3j\x1C\xCB)s\x8Cr\x91\xFC\x80Yyq\xA0\x19\xC5%\x83[A\x12\x0Fr/\x9EOk\xB3\x19$}\xF6\xF7'\xD1X\xDD4\xDA7W-Ggq\x8C\x87\x06\xB1\xBC\x98
>>> tlv_debug: Type 2 value (16 bytes): e\xAD\xB0Kh\xF9\x98\x1C\x9B\x13\xE8_\xE9A\xE6\xB4
>>> tlv_debug: Type 6 value (1 bytes): \x02
>>> client_send: [Client 1073700340] send data size=513, encrypted=false
>>> client_send: [Client 1073700340] Sending payload: HTTP/1.1 200 OK\x0D\x0AContent-Type: application/pairing+tlv8\x0D\x0AContent-Length: 409\x0D\x0AConnection: keep-alive\x0D\x0A\x0D\x0A\x03\xFF\xBE\xC6\xD5<\x16KR'1\xF4\x09.\x01\xF1\x8B/pl\xE4\x88[\x9F\x85\x80\x06\xE0\x18k\x92/\xE6h-\xCE|\xF2\xD1\x9F\xB2f\xB8\x9B{\xF9$\xDC\xA3>R\xA7\x9Efn\x14\x99_\x1F\x90\xB3\x13o\x05\x97\xEDxv\xE6Ew\xB4\x17\xAA|\xB8Z\xA3!\x0E\xE0y\x886\x95\xB3m\x00)\x96\xFB\x83tf\xCF\x8AQ\x8AJZ\x14\xFFU6U3\xDB\xC9\xA8\x0A\xDCN\x1F\x1B\x09>SY\xF2\x9D\xE1#J\x82c\x9EJ\xC3m4\xD3k\x92}tPa/\xC3z.\xF0r\xE3Ao2`\x187\xAB\xBD\xCE\xE6\xDC<\xF1xG\xFBr`\xAF6\xC5\xEE\xED\x90Q\x96x)wV\xC7\x92)\xEFm%\xAA\x90\xF8[\x9F\xD2:\xDD\xCC\xC6!\x80\xF5\x1B\xAC\x1F/}\xB6\x81\x0F\xAB'>\xC5\x9AH\x0BO\xE8\xCE)L\x92\xC4\x0B\xCC\xEFk\xA0\xFE:\xCC\xB0\x09R\x89\xF4\x8C\x84e[y<\xC3\x99\xA2\xBFM\xCE7XGO\xA3\x81\xB0\xAFx\xD6\xFB\xA2\x0F1n\xA6\xE5\x03\x81\x88\xCA\\%\xA25\xE9\x98\xE0b}\xA9\x13\xD7\x0E\xC6\xE7<0Y\xD3\xBF\x04.(\xD4\xD3\xB1U\x10\xEAm\xC8u\xCF\x92\x11:\xE2\xF2\xE0\xA5\x97\x15p\xBE\xB2\x95$\x85M\xB4\x980\x18P\x84"\x1C\xA6\x98\xE8,\xCB\x0FU\xCE\xC2};\xBBx>\x84k\xBDM\xD3j\x1C\xCB)s\x8Cr\x91\xFC\x80Yyq\xA0\x19\xC5%\x83[A\x12\x0Fr/\x9EOk\xB3\x19$}\xF6\xF7'\xD1X\xDD4\xDA7W-Ggq\x8C\x87\x06\xB1\xBC\x98\x02\x10e\xAD\xB0Kh\xF9\x98\x1C\x9B\x13\xE8_\xE9A\xE6\xB4\x06\x01\x02
>>> homekit_server_on_pair_setup: [Client 1073700340] Server on pair setup end
>>> homekit_client_process: [Client 1073700340] Reading 536 bytes
>>> homekit_client_process: [Client 1073700340] Reading 43 bytes
>>> HomeKit: [Client 1073700340] Connection: close received, client will be disconnected
>>> HomeKit: [Client 1073700340] Closing client connection
>>> homekit_server_close_client: [Client 1073700340] The sockect is stoped
>>> HomeKit: Free saved_preinit_pairing_context
>>> HomeKit: [Client 0] Clear the pairing context
>>> HomeKit: [Client 0] client content free
>>> HomeKit: Preinit pairing context
>>> crypto_srp_new: crypto_srp_new
>>> crypto_srp_new: Initializing SRP
>>> arduino_homekit_preinit: Free heap: 25400
>>> HomeKit: Using user-specified password: 111-11-111
>>> HomeKit: Free heap: 23688
>>> HomeKit: Calculating public key len=384
>>> HomeKit: Calculating public key result 0
>>> HomeKit: arduino_homekit_preinit success

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 34 (14 by maintainers)

Most upvoted comments

One question, does this whole thing need internet connection to access anything from any server, like Apple or something?

Sorry for my intrusion, but yes, sure, as hap works thru the apple servers, internet connection is definitely required. Or, what do you think, how could your accessory update its state in your home.app then?