-
Notifications
You must be signed in to change notification settings - Fork 277
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
Disconnect/WiFi reset on step 2/3 #124
Comments
Yeah same here |
I suppose i know why lol ) will check and make a pr today or tomorrow |
well I have tried different board and it works well .. but anyway please get back if you have more info |
Tried 5 or 6 of my 12e/f with no success. The problem is, that wifi disconnects on the key calculations on nonos 8266. Need to add yield in the exptmod and maybe other wolf foos as we discussed it here Yurik72/ESPHap#80 |
Btw, what boards did you use for testing? Just wonder why it works with your esps, as i see, it just could not. But maybe it depends on wifi ap settings, dunno. Searched mine and found nothing special |
Hey Viktor, well, they are all ultra cheap chinese development boards, looks like a NodeMCU v1 but I recommend trying this one, looks like it is alive and in active development: https://github.com/Yurik72/ESPHap |
Tested the same as well, with the same result. Esp32 is good but i still have a bunch of 12f )) I am aware of esphap, fixed the same problem in it yesterday, now faced memory leak. It is not related to this lib anyway, so we’d better stay focused on this pairing problem ;) |
Try 8a8fd7b The idea is from BbIKTOP-issues80 |
Oh, thank you, man! Still have no time for researches, sorry, it's good that you did it! |
Btw, as you're much more familiar with the code, wouln't you mind to replace wolfssl with bearssl, which is bundled with arduino core/esp8266? It would save a lot of resources. |
@Mixiaoxiao @BbIKTOP I did what was proposed, but still didnt work, please note, that I let only homekit code, but still it has problems |
Tested it again and everything works fine. What exact problem do you have? |
I have the same issue, cannot pair my ESP6288. I added yield() however it does not solve the disconnect behavior … |
..............................
|
Any ideas... how to proceed after pair setup step 2/3? |
I made this PR and its been rock-solid for me. Although I only scoped it to LOWMEM, it may be worth putting it in the main code path. |
Ok, re-did everything and I could pair with another iOS device successfully (not iOS15!). Thanks for your support! |
Just tried another board and got same problem. 'yield()' already added and the network should be stable because I tried two positions showing strong wireless connection but still disconnect after step 2/3 for 'The socket is null! (or is closed)'. There must be some trouble during data transfer and I can't find it. Still looking for solution, and thanks for such a wonderful project! Here's my situation after tried two boards (NodeMCU) several times:
|
This trouble shown in iOS 15. But when it turns to iOS 14, the trouble solved, it's probably Apple's fault. |
My yield() patch is only relevant for boards compiled w/ the low_mem option. Maybe modify the patch so it runs on the default options as well?
Look at the time different between the two. I wonder if Apple shortened the timeout time on iOS 15. |
It seems to be an iOS 15 problem indeed. No problem pairing with iPadOS 14.2 but iOS 15.0 on iPhone does not work. Logs Attached: iOS 15>>> [ 246078] HomeKit: Got new client: local 192.168.2.64:5556, remote 192.168.2.77:60801 >>> [ 246087] HomeKit: [Client 1073691116] Pair Setup Step 1/3 >>> [ 248175] HomeKit: [Client 1073691116] Pair Setup Step 2/3 >>> [ 248185] HomeKit: Call s_mp_exptmod in integer.c, original winsize 6 >>> [ 256913] HomeKit: Call s_mp_exptmod in integer.c, original winsize 5 !!! [ 261362] HomeKit: [Client 1073691116] The socket is null! (or is closed) >>> [ 261377] HomeKit: [Client 1073691116] Disconnected! >>> [ 261382] HomeKit: [Client 1073691116] Closing client connection >>> [ 261388] HomeKit: Free saved_preinit_pairing_context >>> [ 261393] HomeKit: [Client 0] Clear the pairing context >>> [ 261399] HomeKit: Preiniting pairing context >>> [ 261404] HomeKit: Using user-specified password: 111-11-111 >>> [ 261424] HomeKit: Call s_mp_exptmod in integer.c, original winsize 6 >>> [ 267515] HomeKit: Call s_mp_exptmod in integer.c, original winsize 5 >>> [ 270639] HomeKit: Preinit pairing context success >>> [ 280793] HomeKit: Got new client: local 192.168.2.64:5556, remote 192.168.2.77:60802 >>> [ 280803] HomeKit: [Client 1073691116] Pair Setup Step 1/3 >>> [ 281015] HomeKit: [Client 1073691116] Pair Setup Step 2/3 >>> [ 281026] HomeKit: Call s_mp_exptmod in integer.c, original winsize 6 >>> [ 289963] HomeKit: Call s_mp_exptmod in integer.c, original winsize 5 !!! [ 294430] HomeKit: [Client 1073691116] The socket is null! (or is closed) >>> [ 294444] HomeKit: [Client 1073691116] Disconnected! >>> [ 294449] HomeKit: [Client 1073691116] Closing client connection >>> [ 294455] HomeKit: Free saved_preinit_pairing_context >>> [ 294460] HomeKit: [Client 0] Clear the pairing context >>> [ 294466] HomeKit: Preiniting pairing context >>> [ 294471] HomeKit: Using user-specified password: 111-11-111 >>> [ 294491] HomeKit: Call s_mp_exptmod in integer.c, original winsize 6 >>> [ 300576] HomeKit: Call s_mp_exptmod in integer.c, original winsize 5 >>> [ 303712] HomeKit: Preinit pairing context successThen it takes about 20 Seconds before the Home App says "Unable to Add Accessory" iOS 14.2 on iPad>>> [ 496733] HomeKit: Got new client: local 192.168.2.64:5556, remote 192.168.2.79:52722 >>> [ 496743] HomeKit: [Client 1073691140] Pair Setup Step 1/3 >>> [ 499891] HomeKit: [Client 1073691140] Pair Setup Step 2/3 >>> [ 499901] HomeKit: Call s_mp_exptmod in integer.c, original winsize 6 >>> [ 508785] HomeKit: Call s_mp_exptmod in integer.c, original winsize 5 >>> [ 513397] HomeKit: [Client 1073691140] Pair Setup Step 3/3 >>> [ 513425] HomeKit: Call ge_double_scalarmult_vartime_lowmem in ge_low_mem.c >>> [ 514178] HomeKit: Added pairing with AB628F93-BD6C-498C-8518-F779231F8650 >>> [ 514242] HomeKit: Free saved_preinit_pairing_context >>> [ 514247] HomeKit: [Client 1073691140] Successfully paired >>> [ 514290] HomeKit: [Client 1073691140] Disconnected! >>> [ 514295] HomeKit: [Client 1073691140] Closing client connection >>> [ 514309] HomeKit: Got new client: local 192.168.2.64:5556, remote 192.168.2.79:52723 >>> [ 514319] HomeKit: [Client 1073684876] Pair Verify Step 1/2 >>> [ 514632] HomeKit: Free heap: 35344 >>> [ 514657] HomeKit: [Client 1073684876] Pair Verify Step 2/2 >>> [ 514664] HomeKit: [Client 1073684876] Found pairing with AB628F93-BD6C-498C-8518-F779231F8650 >>> [ 514685] HomeKit: Call ge_double_scalarmult_vartime_lowmem in ge_low_mem.c >>> [ 515447] HomeKit: [Client 1073684876] Verification successful, secure session established >>> [ 515456] HomeKit: Free heap: 36312 >>> [ 515518] HomeKit: [Client 1073684876] Get Accessories >>> [ 515694] HomeKit: [Client 1073684876] Update Characteristics >>> [ 515708] HomeKit: [Client 1073684876] Update Characteristics >>> [ 515722] HomeKit: [Client 1073684876] Update Characteristics >>> [ 515737] HomeKit: [Client 1073684876] Get Characteristics >>> [ 517009] HomeKit: Got new client: local 192.168.2.64:5556, remote 192.168.2.77:60807 >>> [ 517019] HomeKit: [Client 1073687148] Pair Verify Step 1/2 >>> [ 517332] HomeKit: Free heap: 33744 >>> [ 517344] HomeKit: [Client 1073687148] Pair Verify Step 2/2 >>> [ 517351] HomeKit: [Client 1073687148] Found pairing with AB628F93-BD6C-498C-8518-F779231F8650 >>> [ 517372] HomeKit: Call ge_double_scalarmult_vartime_lowmem in ge_low_mem.c >>> [ 518135] HomeKit: [Client 1073687148] Verification successful, secure session established |
Am I doing something wrong? It connects sometimes, but mostly does not. This is the switch example:
The text was updated successfully, but these errors were encountered: