Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessory without cert #176

Open
mpietron opened this issue Oct 15, 2020 · 1 comment
Open

Accessory without cert #176

mpietron opened this issue Oct 15, 2020 · 1 comment

Comments

@mpietron
Copy link

mpietron commented Oct 15, 2020

Hi,
I try to compile teperature sensor with my esp8266 (4MB). Project build with make -j8 all without errors, but when run this project, I have problem with cert generate. After that, when I try to add accessory on Home App I have the message: Accessory without certificete

I try to use another version wolfssl but without success.

I use iMac,

--- idf_monitor on /dev/cu.usbserial-0001 74880 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
I (8439) tcpip_adapter: sta ip: 10.0.1.72, mask: 255.255.255.0, gw: 10.0.1.1
I (8441) wifi station: got ip:10.0.1.72
I (8443) wifi station: connected to ap SSID:*********** password:*************
>>> HomeKit: Starting server
>>> HomeKit: Formatting HomeKit storage at 0x200000
>>> HomeKit: Generated new accessory ID: 81:BE:83:DF:7F:9A
Guru Meditation Error: Core  0 panic'ed (LoadStoreAlignment). Exception was unhandled.
Core 0 register dump:
PC      : 0x40270530  PS      : 0x00000030  A0      : 0x40270530  A1      : 0x3fff78e0
0x40270530: hwrand_generate_block at /Users/michal/Programming/Embedded/Workspace/Eclipse/Espressif/esp8266/RTOS/homekit/components/wolfssl/wolfssl-4.1.0/wolfcrypt/src/random.c:943
 (inlined by) wc_RNG_GenerateBlock at /Users/michal/Programming/Embedded/Workspace/Eclipse/Espressif/esp8266/RTOS/homekit/components/wolfssl/wolfssl-4.1.0/wolfcrypt/src/random.c:883

A2      : 0xc7f54ac8  A3      : 0xaa5126a2  A4      : 0x0000001e  A5      : 0x40107a6a
A6      : 0x40107a5c  A7      : 0x00000001  A8      : 0x00000000  A9      : 0x0000ffff
A10     : 0x00000000  A11     : 0xffffffff  A12     : 0x40107a4a  A13     : 0x00000000
A14     : 0x00000004  A15     : 0x00000020  SAR     : 0x00000013  EXCCAUSE: 0x00000009

Backtrace: 0x40270530:0x3fff78e0 0x402655d4:0x3fff7900 0x4023afe1:0x3fff7910 0x40239c90:0x3fff7930 0x40239d00:0x3fff7940
0x40270530: hwrand_generate_block at /Users/michal/Programming/Embedded/Workspace/Eclipse/Espressif/esp8266/RTOS/homekit/components/wolfssl/wolfssl-4.1.0/wolfcrypt/src/random.c:943
 (inlined by) wc_RNG_GenerateBlock at /Users/michal/Programming/Embedded/Workspace/Eclipse/Espressif/esp8266/RTOS/homekit/components/wolfssl/wolfssl-4.1.0/wolfcrypt/src/random.c:883

0x402655d4: wc_ed25519_make_key at /Users/michal/Programming/Embedded/Workspace/Eclipse/Espressif/esp8266/RTOS/homekit/components/wolfssl/wolfssl-4.1.0/wolfcrypt/src/ed25519.c:713

0x4023afe1: crypto_ed25519_generate at /Users/michal/Programming/Embedded/Workspace/Eclipse/Espressif/esp8266/RTOS/homekit/components/homekit/src/crypto.c:363

0x40239c90: homekit_accessory_key_generate at /Users/michal/Programming/Embedded/Workspace/Eclipse/Espressif/esp8266/RTOS/homekit/components/homekit/src/server.c:3393

0x40239d00: homekit_server_task at /Users/michal/Programming/Embedded/Workspace/Eclipse/Espressif/esp8266/RTOS/homekit/components/homekit/src/server.c:3427

��*�P*V��ET����T��K��u�U+UZ�Z�T��T
                                  .......
                                  .......
                                  .......
                                  .......                                 
T������]UZJPqQQ��U�
I (464) system_api: Base MAC address is not set, read default base MAC address from EFUSE
I (467) system_api: Base MAC address is not set, read default base MAC address from EFUSE
phy_version: 1163.0, 665d56c, Jun 24 2020, 10:00:08, RTOS new
I (536) phy_init: phy ver: 1163_0
I (556) wifi station: wifi_init_sta finished.
I (678) wifi:state: 0 -> 2 (b0)
I (683) wifi:state: 2 -> 3 (0)
I (693) wifi:state: 3 -> 5 (10)
I (703) wifi:connected with *************, aid = 4, channel 11, HT20, bssid = *********
I (2459) tcpip_adapter: sta ip: 10.0.1.72, mask: 255.255.255.0, gw: 10.0.1.1
I (2461) wifi station: got ip:10.0.1.72
I (2468) wifi station: connected to ap SSID:********* password:************
>>> HomeKit: Starting server
>>> HomeKit: Using existing accessory ID: 81:BE:83:DF:7F:9A
>>> HomeKit: Configuring mDNS
>>> homekit_run_server: Staring HTTP server
>>> HomeKit: Got new client connection: 55 from 10.0.1.112
>>> homekit_client_process: [Client 55] Got 139 incomming data
>>> homekit_server_on_pair_setup: Pair Setup
>>> homekit_server_on_pair_setup: Free heap: 47600
>>> tlv_debug: Got following TLV values:
>>> tlv_debug: Type 0 value (1 bytes): \x00
>>> tlv_debug: Type 6 value (1 bytes): \x01
>>> HomeKit: [Client 55] Pair Setup Step 1/3
>>> homekit_server_on_pair_setup: Free heap: 47516
>>> crypto_srp_new: Initializing SRP
>>> homekit_server_on_pair_setup: [Client 55] Initializing crypto
>>> homekit_server_on_pair_setup: Free heap: 46852
>>> homekit_server_on_pair_setup: [Client 55] Using user-specified password: 111-11-111
>>> crypto_srp_init: Generating salt
>>> crypto_srp_init: Setting SRP username
>>> crypto_srp_init: Setting SRP params
>>> crypto_srp_init: Setting SRP password
>>> crypto_srp_init: Getting SRP verifier
>>> crypto_srp_init: Setting SRP verifier
>>> crypto_srp_get_public_key: Calculating public key
>>> send_tlv_response: [Client 55] Sending TLV response
>>> tlv_debug: Got following TLV values:
>>> tlv_debug: Type 3 value (384 bytes): \x13\x0F\xA3+\x1DW\x08[VG\xEAQ\xDF\xC3\x98\xED�U\xCE\x8BH&\x93\xEC\x0B?]\xAD\x81\x01=Gi\x0D\xCB\xEE\x19\x1E\xDD,\xF4\xA5\x91\x0C,\x02\xA4e\x05\x0A\x90\x0D\x95\x8DsPf\x0D\xF4\x08\x81\xA5\xE8\x05\x9A\xBF\x97#54\xA6\x93\xB5\x99Z\x11s+\x88\x95`|,\x90\xBE\xDB\x81\\bS\x1F_\x8Er\xD5l\xEB,$\x19\x1E\xB2\xA8\x0A\xC0^\x9C\xAE\xDE\xF8R\x91x`\x8Ec\xE7\x9B(6(\x93\x99\xA0\xE6\x1A\x03\x9C\xF1\xB9d64B\x06\x0BI\x0Fi\x00zO\xEF\xE30\x15m\x12.Cy\xBD\xF3\x85\xA9\x94\xB5\x823\xBCs\x8D\xD1\xBB\x17yb"\x9F\x1C\xCF\xBCd\xA7\xE3?\xFB\x07&\x0E\x8B\x02\xE8\xF9Z\xBE'\xBB\xEB!\x80\xBD\xEF\x0D\x8F�g\xC8\x0E\x15Pc\xF4\x9C.\x88\xB3\xF7H\xE5\xEE@o\\X\xA3\xE8\xC6\xC1!\xFE7o=\x11\xDE9,\xBBOp\x14\xD6n\x0C\xFAO\x90\x00\xF6!\xB2\x9A\xA5\xD8\xDB\xEE\xB7\x0C\xCE\xB7\xB2v!H=\x8C\xE3"\xB0\x85\xBB\x02\xF6\xBB\xF0\xC7\x8D\xB5;\x16-\x15\xC4\xD6\x18E\xB2\\\xDC\xC5\xF1\xE7\x94\xEF\x07\xB2`\xB3\x16\xD9$\x17\x1D\x16\xD7\xA3\xD4xa"x\xF2\xE1\xF8\xF9\xC0k\\\xA5e\x1E}\x15s\xE7\x08P\xAB\xC7' \xA4\xA3(\xCF_(.\x9B\x0Es\xF1V\xD0\x8E{B\xA4\x05{\xAE%\x86\xA4\xC8T\xE04K\x85\x02yPg\xEDB2\xA4\xED\x05\xD7\xFB\xB3K\xAD0L_\xB7\xA3U\x1Dlh\x1B\x96[\xE0\xFC\xEE*X\xF0
>>> tlv_debug: Type 2 value (16 bytes): YA\xFC\x09*\xF0\xE6/\x1F\xE4\xF6\xC5W\xE7Si
>>> tlv_debug: Type 6 value (1 bytes): \x02
>>> client_send: [Client 55] 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\x13\x0F\xA3+\x1DW\x08[VG\xEAQ\xDF\xC3\x98\xED�U\xCE\x8BH&\x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6/\x1F\xE4\xF6\xC5W\xE7Si\x06\x01\x02
>>> homekit_client_process: [Client 55] Finished processing
>>> homekit_client_process: [Client 55] Got 592 incomming data
>>> homekit_server_on_pair_setup: Pair Setup
>>> homekit_server_on_pair_setup: Free heap: 44656
>>> tlv_debug: Got following TLV values:
>>> tlv_debug: Type 6 value (1 bytes): \x03
>>> tlv_debug: Type 3 value (384 bytes): \x0Fz'\xA9|yx\xC8\xC5~\xCF\xD3\xFD\xFD6?!\xE5\xC9?g\xB2\xC1e@\xD3?\xAD\x1A~]X\xE2\xF0\x88\x91\xDF\xBCg\x0124=M{\xF2\xC29\xDD\x83^\xA0\x94\x03\xF8;8(}^\xFA\x0E\xE5\xA4\xDD)\x96\xFD|V_})\x8CgWD\xB9+\xB7`{:\xAE\xE4\x8E\xF9\x8F\x0F\xC2?\xF5\x87\xC6\xFC\xF4\xE93 \x9C\xB0;39t\xEC\xE9\x96u\xE5\x8AK\x85\xE0+\xC3\xBFj\xD2\xD8\xA0\x07\xE6\xF0\x8D\xEE\xA1=t\xB4\xC7Z\xB1(\x1DR\x12&\x95\xE7\xF5~\x8EP\xC5\xF4\x90\x99\xA1\x86s\x94\xF6\x86r\xA8\x13\xBE\xE8\xEF\xD1\xA5\xFE\xFB\xE8\xE9k\xAF\xD9\xD6\xF8\xD0\x82\xD4\xE0W\x0F\xC12g\xCCer\x98a\x9D\xFDF\x84\xE3%\xB2\xA4\xEBf\xCD$\x0BHF\x81,U\xD9\x0F\xE9\xA26\x82\xF7\xED\x10K\xF5hzd\xF9\x08\x9B\xB7tl\x14\x98\xA3rO\xE6;p\xEDz\x18\xF6\xBA{:\x8A\xFE\xFD\x16�\x0A;\x1CJS*:\x9B~I\xBF\xA5\x08'v\x9B;\xAB<\x98\x8E\x06\x1C\xEF\xF3`\xE2\xECe!F\xD5\x82W:l\x8B\xD4I\xD2V\xB8\xE3\x93\xDF\x04\x8CD[\xB0g \xF4)=\xE9}\xD6\xCC\xB4\x18\x9B\x09'z\xE9\xD2\x94-\xF7\x9C#o\x8F$\x89\xAC\xC3\xA5\xCB\x10BH\xF7*t\x13E\xD9\xE1\xA5\x1E\x12\xA9\xD2\xDD\x9C:\x0C\xD4\xA5\xB7\x90N\x02TC\x0B2\xE3M\x0C\x98\xF0\xAD\x04Dj\x8F\xC3\xD91\x09l.�I>\xE6\x09=\xB7\xBA\x10\x8Dyg\xEDm\xAE\x0F
>>> tlv_debug: Type 4 value (64 bytes): \x87XkO\x87\xDF\x9D\x93\xE3\x99*\xDF\x1DC\xE1\xD4\xFFsB\xDA\x05\xFC\xAA\x0C\xDAEe\xB1\xCE\x9B\xCA\x90\x9D\xBA\xB4\xD3\xC8\x9D'\xF5\x08t\x0D\xF6\x8E\xA20\xAFp\xC1_{\xE7-s\x9Ey\xCBw\x11b\xDA\x1A\xF5
>>> HomeKit: [Client 55] Pair Setup Step 2/3
>>> homekit_server_on_pair_setup: Free heap: 44092
>>> homekit_server_on_pair_setup: [Client 55] Computing SRP shared secret
>>> homekit_server_on_pair_setup: Free heap: 44092
>>> homekit_server_on_pair_setup: [Client 55] Verifying peer's proof
>>> homekit_server_on_pair_setup: Free heap: 44412
>>> homekit_server_on_pair_setup: [Client 55] Generating own proof
>>> send_tlv_response: [Client 55] Sending TLV response
>>> tlv_debug: Got following TLV values:
>>> tlv_debug: Type 6 value (1 bytes): \x04
>>> tlv_debug: Type 4 value (64 bytes): \x8D\xA7\x06\xFC\xAEw\xCE\xC7QN\x9D\xE5~\x09\xDA\x06k\x13\x1F\xDF0\x10rX\xC7G\x19\xC5\x99\x8B[\xC3=\xD4X\x03t\xD9B\xDD1\xB0)o\xEE\xA4|\x98/\xBD\xD1\x10\xD1\xE3T\xED\x1D\xB9r\xFC\x17\x17\x04\xA2
>>> client_send: [Client 55] Sending payload: HTTP/1.1 200 OK\x0D\x0AContent-Type: application/pairing+tlv8\x0D\x0AContent-Length: 69\x0D\x0AConnection: keep-alive\x0D\x0A\x0D\x0A\x06\x01\x04\x04@\x8D\xA7\x06\xFC\xAEw\xCE\xC7QN\x9D\xE5~\x09\xDA\x06k\x13\x1F\xDF0\x10rX\xC7G\x19\xC5\x99\x8B[\xC3=\xD4X\x03t\xD9B\xDD1\xB0)o\xEE\xA4|\x98/\xBD\xD1\x10\xD1\xE3T\xED\x1D\xB9r\xFC\x17\x17\x04\xA2
>>> homekit_client_process: [Client 55] Finished processing
>>> homekit_client_process: [Client 55] Got 294 incomming data
>>> homekit_server_on_pair_setup: Pair Setup
>>> homekit_server_on_pair_setup: Free heap: 45276
>>> tlv_debug: Got following TLV values:
>>> tlv_debug: Type 5 value (154 bytes): \x15Z\xBB\xAF\xD3\x9E\xC4\xE3lB\xFDu\xDF\xA2m\x8D\xD6#=\x81C\x81/\xBF\xEA\xD3\xF0\xA1\xA1nA\xCA\xAE\xE3Z*\x18\x83\x06j\xE2\xA4b\x89\x9E\xB1\xFC\xD1\xA14\xB6\x06\x97U\xFFN\x0D!G\x07{\x19SE\xF2@&\x18\xE0_\xDC\xC5l\x86\x99\xA7E|D\xA6w\xB7Y\x88\xAB\xF9\xBD\xDC\xED\xBC\xA6H\xE7d\xE8'\xB5\x9Dm\x86\x92\x82\x82F\x9D\xE3\x9A\x9A\\b\xB1ry\x84\x8E\x83=\x95\x1C:\xCC\xA0\x1F\x93\xA1XS\xE5\xAA\xB3\xEA\x1C_M\xAB�O\xB0\xDE\xBE%\xB3\xC6N\x86z\x05F\x0D\xB6=\xCBx\xF2
>>> tlv_debug: Type 6 value (1 bytes): \x05
>>> HomeKit: [Client 55] Pair Setup Step 3/3
>>> homekit_server_on_pair_setup: Free heap: 45040
>>> homekit_server_on_pair_setup: [Client 55] Calculating shared secret
>>> homekit_server_on_pair_setup: [Client 55] Decrypting payload
>>> homekit_server_on_pair_setup: [Client 55] Importing device public key
>>> homekit_server_on_pair_setup: [Client 55] Calculating DeviceX
>>> homekit_server_on_pair_setup: [Client 55] Verifying device signature
>>> HomeKit: Added pairing with 0A4ABC84-BBFF-4D88-87FB-AF95180AF556
>>> homekit_server_on_pair_setup: [Client 55] Exporting accessory public key
>>> homekit_server_on_pair_setup: [Client 55] Calculating AccessoryX
>>> homekit_server_on_pair_setup: [Client 55] Generating accessory signature
>>> homekit_server_on_pair_setup: Free heap: 44908
>>> tlv_debug: Got following TLV values:
>>> tlv_debug: Type 1 value (17 bytes): 81:BE:83:DF:7F:9A
>>> tlv_debug: Type 3 value (32 bytes): \xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF
>>> tlv_debug: Type 10 value (64 bytes): T\xD2\xF6\x8F\xAE\x18\x1E\x10\xB7;>i\x8A\x06\xE7W\xE9\xB0\xC2\x0E[S\x9B<D\xCBDG\xFCY.\xFDY)\xB7\xB0\xC9\xE8\xA4!\xBC\x00bt\xA6Z\xF1\xFB|\xD2\xBD\xAE\x94\xA2\xAB\x88\xFB\xD5\xF2\xD2+ly\x0F
>>> homekit_server_on_pair_setup: [Client 55] Encrypting response
>>> send_tlv_response: [Client 55] Sending TLV response
>>> tlv_debug: Got following TLV values:
>>> tlv_debug: Type 6 value (1 bytes): \x06
>>> tlv_debug: Type 5 value (135 bytes): .\xFE\xE2NkB\xB7\xF9\x12\x00F\x05\xC6u\xB6\xF5s\xF3"\xB9OW\xF9\x0E\xD6\xB8_J\xE5\x8E\xF2|\x928\x05B\xF5\x14O\xBA=\xEDk\xCB\x97\x84\xD3\xC6`y�r=\xB5)\x06d\xFB\\\x9A\xEDY\xE3\xE2\xF7\x0D\xC4\x02�\x95\x8A\xE7\x9E\xD4\xCE8\xB8Q\xF4\xF2\xCC\xBE\xEB\xF1\xC7\x91\xB2{\x02\x15�\xBD|I\xEF\x8F\xBD\x19\x1A\x9B~\xE3\x17\xCD\x0Cdr\xB6=\xDAV6L�\xB5\xD9\xC6\x1B\xC9\xBF!\x9A\x8B\xB9Y\xF5\xC6j\xBD(\x9BJ@\x1E$
>>> client_send: [Client 55] Sending payload: HTTP/1.1 200 OK\x0D\x0AContent-Type: application/pairing+tlv8\x0D\x0AContent-Length: 140\x0D\x0AConnection: keep-alive\x0D\x0A\x0D\x0A\x06\x01\x06\x05\x87.\xFE\xE2NkB\xB7\xF9\x12\x00F\x05\xC6u\xB6\xF5s\xF3"\xB9OW\xF9\x0E\xD6\xB8_J\xE5\x8E\xF2|\x928\x05B\xF5\x14O\xBA=\xEDk\xCB\x97\x84\xD3\xC6`y�r=\xB5)\x06d\xFB\\\x9A\xEDY\xE3\xE2\xF7\x0D\xC4\x02�\x95\x8A\xE7\x9E\xD4\xCE8\xB8Q\xF4\xF2\xCC\xBE\xEB\xF1\xC7\x91\xB2{\x02\x15�\xBD|I\xEF\x8F\xBD\x19\x1A\x9B~\xE3\x17\xCD\x0Cdr\xB6=\xDAV6L�\xB5\xD9\xC6\x1B\xC9\xBF!\x9A\x8B\xB9Y\xF5\xC6j\xBD(\x9BJ@\x1E$
>>> HomeKit: Configuring mDNS
>>> HomeKit: [Client 55] Successfully paired
>>> homekit_client_process: [Client 55] Finished processing
>>> HomeKit: [Client 55] Closing client connection
@Kristian8606
Copy link

Kristian8606 commented Nov 24, 2020

I think my problem is the same maximkulkin/esp-homekit-demo#408

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants