-
Notifications
You must be signed in to change notification settings - Fork 60
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
Cannot connect to accessory from iphone #80
Comments
Another pairing try, restarted esp, this time "/pair.dat" exists, as it has been created at the first run:
|
Hi I will check, but this is see first time.., hundred devices works without that
…Sent from my iPhone
On 21 Mar 2021, at 18:44, Viktr ***@***.***> wrote:
Another pairing try, restarted esp, this time "/pair.dat" exists, as it has been created at the first run:
.........
IP address:
172.16.5.249
Free heap: 31984
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: Free heap: 30240
>>> HomeKit: Starting server
>>> HomeKit: storage init 0
>>> HomeKit: Using existing accessory ID: CC:53:3D:E8:D6:85
>>> HomeKit: find pairings
>>> HomeKit: Preinit pairing context
>>> HomeKit: Using user-specified password: 111-11-111
>>> HomeKit: Free heap: 23896
>>> HomeKit: Calculating public key len=384
>>> HomeKit: Calculating public key result 0
>>> HomeKit: arduino_homekit_preinit success
>>> HomeKit: Configuring mDNS
>>> HomeKit: Wifi Sleep type:2
>>> HomeKit: Set Wifi Sleep type :0
>>> HomeKit: MDNS.begin: ES-CC53, IP: 172.16.5.249
>>> HomeKit: Init server over
>>> HomeKit: WiFiServer receives a new client (current 0, max 8)
>>> HomeKit: Got new client connection: local 172.16.5.249:5556, remote 172.16.5.134:61140
>>> HomeKit: [Client 1073701396] Got client content from the cache 0
>>> HomeKit: [Client 1073701396] new client accepted
>>> HomeKit: [Client 1073701396] Pair Setup Step 1/3
>>> HomeKit: [Client 1073701396] Disconnected!
>>> HomeKit: [Client 1073701396] Closing client connection
>>> HomeKit: Free saved_preinit_pairing_context
>>> HomeKit: [Client 0] Clear the pairing context
>>> HomeKit: [Client 0] client content free
>>> HomeKit: Preinit pairing context
>>> HomeKit: Using user-specified password: 111-11-111
>>> HomeKit: Free heap: 22144
>>> HomeKit: Calculating public key len=384
>>> HomeKit: Calculating public key result 0
>>> HomeKit: arduino_homekit_preinit success
>>> HomeKit: WiFi connected, ip: 172.16.5.249, mask: 255.255.0.0, gw: 172.16.1.1
>>> HomeKit: WiFiServer receives a new client (current 0, max 8)
>>> HomeKit: Got new client connection: local 172.16.5.249:5556, remote 172.16.5.134:61141
>>> HomeKit: [Client 1073703244] Got client content from the cache 0
>>> HomeKit: [Client 1073703244] new client accepted
>>> HomeKit: [Client 1073703244] Pair Setup Step 1/3
>>> HomeKit: [Client 1073703244] Pair Setup Step 2/3
>>> HomeKit: [Client 1073703244] Computing SRP shared secret
>>> HomeKit: [Client 1073703244] Verifying peer's proof
>>> HomeKit: [Client 1073703244] Generating own proof
>>> HomeKit: [Client 1073703244] Socket not available to write size:172,available:0
>>> HomeKit: [Client 1073703244] Attempt :0, available:0
>>> HomeKit: [Client 1073703244] Attempt :1, available:0
>>> HomeKit: [Client 1073703244] Attempt :2, available:0
>>> HomeKit: [Client 1073703244] Attempt :3, available:0
>>> HomeKit: [Client 1073703244] Attempt :4, available:0
!!! HomeKit: [Client 1073703244] socket.write, data_size=172, write_size=0
>>> HomeKit: [Client 1073703244] Disconnected!
>>> HomeKit: WiFi connected, ip: 172.16.5.249, mask: 255.255.0.0, gw: 172.16.1.1
>>> HomeKit: WiFiServer receives a new client (current 1, max 8)
>>> HomeKit: Got new client connection: local 172.16.5.249:5556, remote 172.16.5.134:61142
>>> HomeKit: [Client 1073700788] Got client content from the cache 1
>>> HomeKit: [Client 1073700788] new client accepted
>>> HomeKit: [Client 1073700788] Pair Setup Step 1/3
>>> HomeKit: [Client 1073700788] Refusing to pair: another pairing in progress
>>> HomeKit: [Client 1073700788] Disconnected!
>>> HomeKit: [Client 1073703244] Closing client connection
>>> HomeKit: Free saved_preinit_pairing_context
>>> HomeKit: [Client 0] Clear the pairing context
>>> HomeKit: [Client 0] client content free
>>> HomeKit: Preinit pairing context
>>> HomeKit: Using user-specified password: 111-11-111
>>> HomeKit: Free heap: 22464
>>> HomeKit: Calculating public key len=384
>>> HomeKit: Calculating public key result 0
>>> HomeKit: arduino_homekit_preinit success
>>> HomeKit: [Client 1073700788] Closing client connection
>>> HomeKit: [Client 0] client content free
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Maybe I did something wrong, but I just copied an example, downloaded lib and followed instructions. Could you advice me please any steps to check/fix? have no idea where to start tbh |
Here, as my first try was using PIO, I made another try with freshly installed Arduino 1.8.13:
|
Looks like I found the reason:
Looks like ESP12 Wifi disconnects on heavy load. Is it possible to fix, either on my side or in the lib, like adding "delay" to make wifi stack working, or something? |
Is not possible to do something wrong, usually it works fine immediately , analyzing your log I remember that met one time with that, problem solved after restarting router, this is definitely strange and not usual
…Sent from my iPhone
On 21 Mar 2021, at 19:48, Viktr ***@***.***> wrote:
Here, as my first try was using PIO, I made another one with freshly installed Arduino 1.8.13:
..ip:172.16.5.249,mask:255.255.0.0,gw:172.16.1.1
..
IP address:
172.16.5.249
Free heap: 34040
init_hap_storageFailed to read pair.dat
>>> Home Integration: hap_services added chararacteristic 0: 23
>>> Home Integration: hap_services added chararacteristic 1: 25
>>> Home Integration: homekit_is_paired 0
>>> HomeKit: Free heap: 32056
>>> HomeKit: Starting server
>>> HomeKit: Formatting flash at 0x200000
>>> HomeKit: storage init 1
>>> HomeKit: if r
>>> HomeKit: generating id
>>> HomeKit: Generated new accessory ID: 01:57:E3:E4:30:5E
>>> HomeKit: Generated new accessory ID: 1073697436
>>> HomeKit: key generated
>>> HomeKit: key saved
>>> HomeKit: Generated new accessory key
>>> HomeKit: find pairings
>>> HomeKit: Preinit pairing context
>>> HomeKit: Using user-specified password: 111-11-111
>>> HomeKit: Free heap: 25376
>>> HomeKit: Calculating public key len=384
>>> HomeKit: Calculating public key result 0
pm open,type:2 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: ES-0516, IP: 172.16.5.249
>>> HomeKit: Init server over
>>> HomeKit: WiFiServer receives a new client (current 0, max 8)
>>> HomeKit: Got new client connection: local 172.16.5.249:5556, remote 172.16.5.134:61245
>>> HomeKit: [Client 1073700012] Got client content from the cache 0
>>> HomeKit: [Client 1073700012] new client accepted
>>> HomeKit: [Client 1073700012] Pair Setup Step 1/3
>>> HomeKit: [Client 1073700012] Connection: close received, client will be disconnected
>>> HomeKit: [Client 1073700012] Closing client connection
>>> HomeKit: Free saved_preinit_pairing_context
>>> HomeKit: [Client 0] Clear the pairing context
>>> HomeKit: [Client 0] client content free
>>> HomeKit: Preinit pairing context
>>> HomeKit: Using user-specified password: 111-11-111
>>> HomeKit: Free heap: 22696
>>> HomeKit: Calculating public key len=384
>>> HomeKit: Calculating public key result 0
>>> HomeKit: arduino_homekit_preinit success
>>> HomeKit: WiFiServer receives a new client (current 0, max 8)
>>> HomeKit: Got new client connection: local 172.16.5.249:5556, remote 172.16.5.134:61246
>>> HomeKit: [Client 1073701508] Got client content from the cache 0
>>> HomeKit: [Client 1073701508] new client accepted
>>> HomeKit: [Client 1073701508] Pair Setup Step 1/3
>>> HomeKit: [Client 1073701508] Connection: close received, client will be disconnected
>>> HomeKit: [Client 1073701508] Closing client connection
>>> HomeKit: Free saved_preinit_pairing_context
>>> HomeKit: [Client 0] Clear the pairing context
>>> HomeKit: [Client 0] client content free
>>> HomeKit: Preinit pairing context
>>> HomeKit: Using user-specified password: 111-11-111
>>> HomeKit: Free heap: 22424
>>> HomeKit: Calculating public key len=384
>>> HomeKit: Calculating public key result 0
>>> HomeKit: arduino_homekit_preinit success
>>> HomeKit: WiFiServer receives a new client (current 0, max 8)
>>> HomeKit: Got new client connection: local 172.16.5.249:5556, remote 172.16.5.134:61247
>>> HomeKit: [Client 1073697588] Got client content from the cache 0
>>> HomeKit: [Client 1073697588] new client accepted
>>> HomeKit: [Client 1073697588] Pair Setup Step 1/3
>>> HomeKit: [Client 1073697588] Connection: close received, client will be disconnected
>>> HomeKit: [Client 1073697588] Closing client connection
>>> HomeKit: Free saved_preinit_pairing_context
>>> HomeKit: [Client 0] Clear the pairing context
>>> HomeKit: [Client 0] client content free
>>> HomeKit: Preinit pairing context
>>> HomeKit: Using user-specified password: 111-11-111
>>> HomeKit: Free heap: 22136
>>> HomeKit: Calculating public key len=384
>>> HomeKit: Calculating public key result 0
>>> HomeKit: arduino_homekit_preinit success
>>> HomeKit: WiFiServer receives a new client (current 0, max 8)
>>> HomeKit: Got new client connection: local 172.16.5.249:5556, remote 172.16.5.134:61248
>>> HomeKit: [Client 1073699204] Got client content from the cache 0
>>> HomeKit: [Client 1073699204] new client accepted
>>> HomeKit: [Client 1073699204] Pair Setup Step 1/3
>>> HomeKit: [Client 1073699204] Connection: close received, client will be disconnected
>>> HomeKit: [Client 1073699204] Closing client connection
>>> HomeKit: Free saved_preinit_pairing_context
>>> HomeKit: [Client 0] Clear the pairing context
>>> HomeKit: [Client 0] client content free
>>> HomeKit: Preinit pairing context
>>> HomeKit: Using user-specified password: 111-11-111
>>> HomeKit: Free heap: 21904
>>> HomeKit: Calculating public key len=384
>>> HomeKit: Calculating public key result 0
>>> HomeKit: arduino_homekit_preinit success
>>> HomeKit: WiFiServer receives a new client (current 0, max 8)
>>> HomeKit: Got new client connection: local 172.16.5.249:5556, remote 172.16.5.134:61249
>>> HomeKit: [Client 1073698428] Got client content from the cache 0
>>> HomeKit: [Client 1073698428] new client accepted
>>> HomeKit: [Client 1073698428] Pair Setup Step 1/3
>>> HomeKit: [Client 1073698428] Connection: close received, client will be disconnected
>>> HomeKit: [Client 1073698428] Closing client connection
>>> HomeKit: Free saved_preinit_pairing_context
>>> HomeKit: [Client 0] Clear the pairing context
>>> HomeKit: [Client 0] client content free
>>> HomeKit: Preinit pairing context
>>> HomeKit: Using user-specified password: 111-11-111
>>> HomeKit: Free heap: 21720
>>> HomeKit: Calculating public key len=384
>>> HomeKit: Calculating public key result 0
>>> HomeKit: arduino_homekit_preinit success
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I've got Unifi APs setup, did restart for AP that has this ESP connected to. The same ESP12 works fine with Espressif RTOS Homekit example right now. |
I will check, as mentioned I met this second time from thousands
…Sent from my iPhone
On 21 Mar 2021, at 20:16, Viktr ***@***.***> wrote:
I've got Unifi APs setup, did restart for AP that has this ESP connected to. The same ESP12 works fine with Espressif RTOS Homekit example right now.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Thank you! Please tell me, if you'd need any assistance, like testing and so on. |
Found it. Типа.
And everything works so far. Every single connect works fine, I tried it about 20+ times. I cannot make a PR as wolfSSL is not in the repo. Maybe it will be a good idea to wrap it in the some Можно ли добавить такой пачь в репу? Спасибо огромное! |
Ok, thanks for investigation, I defintelly not met with that before. |
|
Ok, but I need to check. I have checked previous and it works....
…Sent from my iPhone
On 22 Mar 2021, at 17:30, Viktr ***@***.***> wrote:
if (yieldNow - yieldTime > 500) is too much, change to if (yieldNow - yieldTime > 20) please
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Конечно. Я проверил - иногда работает, иногда нет. Чаще работает, но иногда сбоит, наверное от ключа зависит. Я подумал и вообще убрал проверку времени, показалось, что от нее вреда больше, поскольку каждый раз millis() вызывается, создавая ненужную нагрузку. Оставил только if(cnt++>20), пока что "полет нормальный" (ну, не считая протечек из соседней проблемы) |
Hello, where can do a change? I'm experiencing the same problem. the line I'm currently using latest version of the library
|
I'll probably open a new issue for that |
Hi,
Found your library today and cannot get example working. Using EspHapLed8266.ino with esp12f, have following error when connecting from ios14.4.1:
It lasts for a few minutes, then home.app on iphone says "Unable to Add Accessory Accessory is not reachable". What am I doing wrong?
Btw, is it ok that
Repeats each time?
The text was updated successfully, but these errors were encountered: