Closed yfre closed 4 years ago
so does discoverable never get set to false now?
so does discoverable never get set to false now? yes, it get to false only after restart. i have not found any good place to make it to false.
if we do it before response ("return response"), ios stop the pairing. after "return response" java hap not active anymore.
probably we need to attach to event like "response" delivered and connection is closed. not sure though how to catch this even.. maybe "channelInactive".
@ccutrer Can you please accept this fix, or instead fix it otherwise? No one can discover the openhab bridge anymore... this is very annoying...
Openhab uses a customized build which includes this fix.
I'm facing pairing problems with ios13 as well. And I can confirm that the pull request is fixing the problem. At least in my environment. So why is the pull request not merged to master? Currently pairing is not possible at all. The fix is really fundamental.
@ccutrer - any objection to me merging this?
I have no objections. @yfre added two new commits since my last comment that should turn off discoverability (hopefully properly), and I was just waiting for more confirmation that that worked.
It is working, but only partially. Now the bridge does appear in the Home app every time, but after I enter the pairing code it’s just loading and after a little while it throws back a message that it cannot be added. Is this a new issue or is it related to this same issue?
@scothi: Are you sure, it is the same problem? Does your code/setup work with older ios versions? What is the output of the device?
Unfortunatelly I cannot test with an older ios version, I don’t have another device. I’m trying with 13.3 ios and the sample project (https://github.com/hap-java/HAP-Java/tree/sample).
Same problem here, iOS 13.3.1. After third pairing phase, createUser is called and then it fails. It seems the the accessories request is received before the service gets recreated, is that good? I would imageine it's not... Isn't there maybe a way to update the service instead of re-creating it? Or re-create it immediately after sending the response to the third pairing phase (and not when receiving the next request)?
you should see on the log when the accessories request is received and what is the response to it.
Yes, I do. And it looks ok (at least the same as in the log someone posted in the issue). It just doesn't work. As I wrote in the issue, if I remove the MockSwitch light bulb and just advertise the bridge, I can add it successfully. Any idea what might be causing that?
ios13 evaluate sdiscoverability (sf flag) differently than older ios and stop pairing process if this flag changes (see issue #93). this PR fix it by keeping discoverability true