-
Notifications
You must be signed in to change notification settings - Fork 41
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
Pairing Issues: Eve Energy 1EC0 / LG C9 stuck at #5 ios -> accessory: send SRP exchange request #170
Comments
Is there any updates on this? If I can help test anything please let me know. |
There are some other pairing variants in the latest spec, maybe this doesn't support the original pairing variant for some reason. @niemyjski bit of an ask but are you able to get a pcap dump of traffic flowing between an iOS device and your TV whilst pairing? |
If you can tell me exactly what I'd need to do I'd be more than happy to do
it.
Thanks
-Blake Niemyjski
…On Thu, Oct 3, 2019 at 11:20 AM Jc2k ***@***.***> wrote:
There are some other pairing variants in the latest spec, maybe this
doesn't support the original pairing variant for some reason.
@niemyjski <https://github.com/niemyjski> bit of an ask but are you able
to get a pcap dump of traffic flowing between an iOS device and your TV
whilst pairing?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#170?email_source=notifications&email_token=AAHZFI3MPN2RH7IS72CZ4PDQMYLVNA5CNFSM4ISK7IA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAIX74Y#issuecomment-538017779>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHZFI4H5IGVMYFHTUSV7KDQMYLVNANCNFSM4ISK7IAQ>
.
|
It really depends on your network setup, hardware and is. If you have a desktop or laptop that can run wireshark you might just be able to run your wlan card in monitor mode and tell it to look for traffic between your iOS ip and your tv ip. This can be very OS and hardware dependent and I haven’t done it in a good long time. As your iOS device will be WiFi based this should work even if the tv is Ethernet. I don’t know how well this works on Windows, but I’ve definitely had success with it on Linux. Not sure about Mac - think I’ve seen it work there but could be misremembering. If your tv is connected by Ethernet and you have a switch which supports mirroring or you have a dumb hub then you can watch traffic flowing to and from the tv by running wire shark on a physical Ethernet port. You should start by installing wireshark and seeing if you can see your local WiFi traffic. |
I'm running all on ubiquity and the tv and Apple TV are hard wired. I'm on
Mac and can run Wireshark on the same network. Last time I tried to sniff
HomeKit traffic I didn't have much luck so pointers welcomed.
Thanks
-Blake Niemyjski
…On Fri, Oct 4, 2019 at 8:05 AM Jc2k ***@***.***> wrote:
It really depends on your network setup, hardware and is.
If you have a desktop or laptop that can run wireshark you might just be
able to run your wlan card in monitor mode and tell it to look for traffic
between your iOS ip and your tv ip. This can be very OS and hardware
dependent and I haven’t done it in a good long time. As your iOS device
will be WiFi based this should work even if the tv is Ethernet. I don’t
know how well this works on Windows, but I’ve definitely had success with
it on Linux. Not sure about Mac - think I’ve seen it work there but could
be misremembering.
If your tv is connected by Ethernet and you have a switch which supports
mirroring or you have a dumb hub then you can watch traffic flowing to and
from the tv by running wire shark on a physical Ethernet port.
You should start by installing wireshark and seeing if you can see your
local WiFi traffic.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#170?email_source=notifications&email_token=AAHZFI3E5UEEKXA52AG5U5DQM45P5A5CNFSM4ISK7IA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEALSNWI#issuecomment-538388185>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHZFI5GVYLHMXFHTOSYAHDQM45P5ANCNFSM4ISK7IAQ>
.
|
Hey,
Perhaps https://wiki.wireshark.org/CaptureSetup/Ethernet#Switched_Ethernet will explain further and can help solve this issue. -Joachim Lusiardi |
I have HA running on a pi, I'm guessing a tcpdump file from the pi while trying to pair the TV is what you're looking for ? You can open that up in wireshark to look at the packets. I'm attaching the pcap file, it was running from the moment I clicked "configure" in HA to after the error. |
We could do with a capture between a iOS device and the tv ideally so we can see if it is using one of the new pairing handshakes. |
I don't have any iOS devices so I can't help with that, sorry
…On Mon 7 Oct 2019, 09:14 Jc2k, ***@***.***> wrote:
We could do with a capture between a iOS device and the tv ideally so we
can see if it is using one of the new pairing handshakes.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#170?email_source=notifications&email_token=AAGVHT7JSUDKDHIVTBOK3NDQNLVVZA5CNFSM4ISK7IA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAPMPBI#issuecomment-538888069>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGVHT3DT6QGU37M3YNSJ7DQNLVVZANCNFSM4ISK7IAQ>
.
|
Just remembered my girlfriend does have a mac laptop. Googling it looks like that won't do though, is that correct ? No way to use a macos laptop to initiate pairing and capture what you'd need ? |
Hi, I found https://appleinsider.com/articles/18/06/05/hands-on-controlling-your-smart-home-with-homekit-on-macos-mojave which states from MacOS Mojave onwards this should be possible. But adding new devices is not possible in Mojave. Perhaps this was improved in MacOS Catalina. @netmanchris, I saw your cool analysis from https://www.youtube.com/watch?v=y5L21gjEyC4 do you have a Catalina enabled Mac? Does it support pairing? Regards |
Facing the exact same symptoms and logs on an LG TV and looked for the latest protocol spec. It appears Apple gives out R2 to non-commercial users. I'm not sure what you @Jc2k have been working with but here's an implementation against R14 uploaded a few days ago. Can you spot anything obvious in the handling of M4? (start at line 445) |
Our pairing code was written against R1, and one thing i've been meaning to dig into was whether the Transient and Split pairing modes that are lightly touched on in R2 of the spec could be at play. In a transient pairing there is no M5 or M6, but that only happens if we set kTLVType_Flags. In addition, if you trigger split pairing then you can reuse an SRP code. I think you can create a secure transient session and then do additional auth over the transient session to finish the pairing? Can you paste the discovery output for your device? I'm interested in whether the affected devices have an ff flag set to Suggests there are 2 possible flags for
However i'm sure an earlier bug report was showing an '8' in the ff field which i'm struggling to match to the R14 code. Some other relevant bits here: Also we need to figure out |
I don't think we currently do any of that. Or this: |
There seems to be a new way to pair HomeKit accessories present in R2 of Let's do some comparing of R1 vs. R2. For easier navigation use the next table:
There seems to be a difference in the values of the methods relevant for
Our code still sends a value of So I am not sure on how to proceed to be compatible with devices that Is one of the owners (@jzee, @Ulrar, @niemyjski) willing to try to witch
|
Did that, modified the constant straight in the installation. Here's the log output. If you DM me the instructions of how to get to a debugging setup so I can run
|
Something just happened, it worked! Without having a lot of information how to debug the install properly, I went into The TV shows as paired now and reads out the firmware version properly. I have yet to find out what more I can do with it now but it is definitely paired. |
ok, great! can you execute
I guess we must find a way to get the version of the protocol before starting a pairing... |
doesn't find
|
I'm guessing you are using Home Assistant's web front end to pair rather than the homekit_python projects CLI? (HA doesn't use a pairing.json and wont understand category 31 yet) |
that's correct, I'm unaware of how to use the homekit's CLI. I can have a look at a clean install of it, any pointers are appreciated. |
There's a file in I can try and tell you how to get the pairing data out of HA when i get back home tonight/tomorrow. |
that should be it |
I just ran the discover from the CLI client after walking through the installation and it coughs at cat 31 as well, with an identical traceback. I checked out |
This is not backed by any documentation or specification but by #170
from homekit_controller-entity-map-cleansed.txt:
which states a version of @jzee: I just pushed a new commit with an added category 31 (as TV). Can you pull and try again? |
I just got home and haven't paired my TV at all, happy to help if I can. |
I can confirm that switching the PairSetup to 0 and then restarting home assistant makes pairing work. |
Off topic for here, but @Ulrar can you share your |
There it is. Not sure what I should or shouldn't edit out so I just removed the mac, serial number and what I assume must be the key. https://gist.github.com/Ulrar/30a9fe78e962895cce65413982e2ceaf |
@jlusiardi this commit fixed it. Here's the discovery output
|
So Both the hue and Eve Extend have Looking at all the working IP devices in tested_devices, they are a mixture of protocol 1.0 and 1.1 and all have From reading the code @jzee posted, So maybe:
|
@Jc2k sadly there is not much information about the |
Yes its weird that there is a table in R2 but its empty. In the official ADK the bonjour data for I think it makes sense that I suppose we could make a mock accessory that set |
Another user from HA reported issues pairing. They have a VOCOlinc L3 bulb. Instead of this exception in their case the pairing process hung after M3 but before the asset / IndexError. This device has an This is another case where |
Trying to find something we can use in lieu of spec... This is part of the official Apple HAP ADK for PairSetupWithAuth: My reading of this code is that an accessory made with that spec would return an In other words, if we tried to pair with an accessory written with the ADK we would have to have logic that did:
I.e. we should only attempt PairSetupWithAuth if we detect a security chip, because we know that ADK devices fail otherwise. |
@Jc2k building a mock accessory is actually what the ADK repo comes with out of the box (try “make Target=Linux Apps” on a Linux VM) - so doing that exercise is fairly easy. I spent the better part of Sunday fiddling with it and getting it on the network showing up as a node on iOS is trivial. I still failed on getting it to use a setup code so I could get further down the auth process - out of the box the example accessories fail since they aren’t automatically provided with a setup code. If someone can shed some light on how that could work, I can dig down a little further. |
I think we should collect a table of devices here... Perhaps different (firmware)versions of the same device have different behaviors? Feel free to add devices: |
I used demoaccessory and twiddled the Results:
An official client will use PairSetup = 0 if Annoyingly though |
In #125 and #158 there are reports that Eve Energy 1EC0 and LG C9 are both stuck at the same problem. This seems to influence both transports.
Citing @Jc2k:
The text was updated successfully, but these errors were encountered: