14. Bluetooth Advertising
•An accessory (‘peripheral’)
‘advertises’ by broadcasting basic
device info regular intervals. It can
also provide available services.
•Master devices (‘centrals’) must see
advertising data to discover devices
nearby as well as to connect to a
known device.
15. Communication Protocol
•40 specific frequency channels
around 2.4 GHZ.
•Host device (‘central’) learns of
interference and marks bad channels
as busy.
• 4 channels are reserved for the
advertising and initiating the
connection. Remainder are used for
data communication.
18. Pairing
HomeKit accessories generate their own Ed25519 key pair
for use in communicating with iOS devices. If the accessory
is restored to factory settings, a new key pair is generated.
Ed25519 = Edwards-curve Digital Signature Algorithm
(EdDSA)
https://www.apple.com/business/docs/iOS_Security_Guide.pdf
19. - Add HomeKit Framework
- Enable Capabilities
Getting Started With HomeKit
35. Triggers a HMScene when a combination of characteristic and location events
occur.
+ (NSPredicate
*)predicateForEvaluatingTriggerOccurringAfterSignificantEvent
:(NSString *)significantEvent
applyingOffset:(NSDateComponents *)offset;
+ (NSPredicate
*)predicateForEvaluatingTriggerOccurringBeforeSignificantEven
t:(NSString *)significantEvent
applyingOffset:(NSDateComponents *)offset;
HMEventTrigger
36. Development Tips
Allocating
HMHomeManager initiates permission request to user
Surface HomeKit error messages to user.
error.localizedDescription
HMCatalogApp Source Code
Service name = Siri name
Often HomeKit header files have more details than
documentation.
39. Making a HomeKit
Accessory
• Apply to Apple’s Mfi program
• Most major hardware vendors have chips solutions
that come with a HomeKit SDK, and encryption
built in.
• Accessory must be certified by Apple to ship
• Some devices are not exclusively for HomeKit
platform.