Skip to content

Tradfri doesn't respond to encrypted messages #13

Closed

Description

@mjg59

After monkey patching http.client to avoid #12 I can successfully pair my Tradfri, but any packet sent after switching to SecureHttp never receives a response.

Activity

  1. jlusiardi commented on Mar 12, 2018

    @jlusiardi
    Owner

    can you attach the dump? afair the stuff was pretty picky about keeping the connection open...

  2. mjg59 commented on Mar 17, 2018

    @mjg59
    ContributorAuthor

    get_accessories.zip

    Interesting - there does seem to be a response, but we're never doing anything with it. I'll dig further.

  3. mjg59 commented on Mar 17, 2018

    @mjg59
    ContributorAuthor

    Oh right the response is just the ack, ignore me. I've also tried adding a Host: header to the request, since that seemed to be the only difference to what an iOS device seems to be sending at this point.

  4. jlusiardi commented on Mar 17, 2018

    @jlusiardi
    Owner

    The get_accessories dump seems odd. This should contain 0x06 for kTLVType_State somewhere?

  5. mjg59 commented on Mar 17, 2018

    @mjg59
    ContributorAuthor

    It looks like there's an 0x06 TLV at the end of each POST to pair-verify, and one at the end of each response?

  6. mjg59 commented on Mar 17, 2018

    @mjg59
    ContributorAuthor

    Ah - SecureHttp isn't changing \n to \r\n

  7. mjg59 commented on Mar 17, 2018

    @mjg59
    ContributorAuthor

    Yes, adding
    data = data.replace("\n", "\r\n")
    to the top of _handle_request() makes this work

  8. mjg59 commented on Mar 17, 2018

    @mjg59
    ContributorAuthor
  9. jlusiardi commented on Mar 18, 2018

    @jlusiardi
    Owner

    so you get progress on the tradfri, any success in switching it on and off?

  10. mjg59 commented on Mar 18, 2018

    @mjg59
    ContributorAuthor

    I'm using Hue bulbs, and it turns out that the Tradfri will only expose Ikea bulbs over Homekit :( I suspect it'd work fine now, I'm able to read the accessory-info characteristics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions