HMErrorDomain Code=55 or 4 when pairing

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

I started working with WICED homekit sample and a demo app on ios. Every thing was fine. Just out of the blue I start getting following

(This is in both HAT app on Mac and on iOS)

Message: Failed to complete pair-verify - error: Error Domain=HMErrorDomain Code=55 "Failed with OSStatus code -6754 (kAuthenticationErr)" UserInfo=0x608000c7cdc0 {NSLocalizedDescription=Failed with OSStatus code -6754 (kAuthenticationErr)}


I almost had a prototype prepared in a day and now it is all gone



0 Likes
6 Replies
Anonymous
Not applicable

Hi hatim,

You may need to reflash your board.

What may have happened is that when you paired with the controller(HAT or iOS) you reset the device without removing the pairing first through HAT (or iOS).

The pairing is stored to the DCT, and the HomeKit Specification allows only one controller to go through the pairing process at one time. If you want to add others you need to do it though add/remove pairing.

So if your accessory's pairing is not cleared through the controller, the accessory will reject being paired to again.

Just for development you can use the API wiced_homekit_clear_all_pairings as well (from apple_homekit_developer.h)

Note: To remove pairing using HAT please perform a 'discover' before using 'remove pairing'.

Thanks,

Milan

0 Likes
Anonymous
Not applicable

I have reflashed the board many times by build clean and build again from WICED IDE. Do you mean some other form of reflashing other than just building the project and putting it again?

0 Likes
Anonymous
Not applicable

The reflashing you have done is fine, it seems that's not the problem.

You mentioned you almost completed the prototype. Perhaps with your modifications, you are running into memory issues, which during pairing can corrupt the session key generation (pairing uses dynamic memory).

Do you see the same problem on the stock (unmodified) HomeKit snippet?  If that seems to work ok, and your application isn't pairing, then its likely to be memory problem. In that case a quick way to drop it, just for testing purposes, is to reduce the tx/rx packet pool size to 3 in the HomeKit makefile. See if the extra memory you gained fixes your problem.

P.S

Can I ask which hardware platform you are using, and how much static ram your application is using?

0 Likes
Anonymous
Not applicable

Well actually one thing I did after which things kind of broke. I had two iphone6 with iOS 8.1 that I was using. Then I upgraded one of them to iOS 8.2 beta after which pairing would always break.

I have actually re-flashed the device many times with various firmwares, even the stock one. Infact the firmware that I was working with had less memory foot print than a bridge firmware (since it was a single peripheral)

Is there a way to factory reset the whole thing.

The hardware that I have is BCM943362WCD4 surface mounted on an eval board (don't remember which one) but they are known as BCM943362WCD4_EVB on Avenet site.

Is there a way to factory reset the board, wipe every thing.

I have an extra unmounted BCM943362WCD4 that I can continue to work with, but eval board is rather convenient.

0 Likes
Anonymous
Not applicable

By downloading the firmware on to the SDK you are factory resetting it ( it overwrites DCT sections as well ).

You mentioned you started seeing this issue after updating to iOS8.2 Beta. Can you still pair when running iOS8.1?

In addition can you please confirm:

* HAT version and SDK version

* Pairing Password mode (are you using the wiced_configure_accessory_password_for_device_with_display/wiced_configure_accessory_password_for_device_with_no_display - If using the latter please make sure its a valid password as per HomeKit spec (ie: cant be 123-45-678 or 111-11-111 etc).

*Total static ram used by your application (should be visible in console after compile)

0 Likes
Anonymous
Not applicable

Discussion is being locked. If you have any follow-up questions, please start a new discussion.

0 Likes