HomeKit Accessory Protocol Step M4

I'm not sure if anyone has been developing with the HomeKit Accessory Protocol (https://developer.apple.com/homekit/specification/) or without the documentation, but I'm running into an issue with step M4.

I've computed M2 (the server proof) and returned it with the following TLV data format (0601040440[serverproof]). I've written a HomeKit client that returns that M2 is valid. I ran this same client against HAP-NodeJS (https://github.com/KhaosT/HAP-NodeJS/) and an accessory using the HomeKit Accessory Simulator, and they both also return that the M2 is valid. If I return invalid data, the client correctly reports that M2 is invalid.

When connecting with an iOS device, the server closes the connection after I return the M4 response. This is what happens if I modify HAP-NodeJS to return an invalid M2. I've also filed a radar #33200334 because at this point, an invalid M2 should report an error to the user, but the Home app simply closes the connection to the accessory and hangs.

Has anybody done any work with HAP and shed some light on this issue?

Upvotes: 1

Views: 507

Answers (1)

Marvin
Marvin

Reputation: 13

My mistake was in the TXT-Record "ff" of the Bonjour service. After I remove this entry from the records, has the iOS Device my ServerProof accepted and is going to step M5.

PS: I have tried to set the value to 0x01 (not as string) and the pairing process works also.

Upvotes: 1

Related Questions