Accessory communication control
By adopting a communication protocol and broadcast notification mechanism between network-connected devices that do not rely on handshakes or secure sessions, the problem of inter-device delay is solved, response speed and operability are improved, and power is saved.
Patent Information
- Application Number
- CN202210136256.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2017-09-21
- Filing Date
- 2018-03-29
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2038-03-29
AI Technical Summary
Latency between network-connected devices leads to poor user experience, especially when communicating information between devices. High latency may cause devices to lose connection or respond too slowly, reducing the operability of network-connected devices.
Adopt an attachment communication control protocol that does not rely on handshakes or establishing secure sessions, transmits state changes through broadcast notifications, and uses a simple and extensible framework to define attachments as a collection of services, each service consisting of a set of characteristics Composition, supports both passive and active notification mechanisms, allowing accessories to selectively notify the controller when characteristics change.
Dramatically improves response time between devices, reduces latency, improves operability of network-connected devices and saves battery power on low-power accessories, avoiding entire round-trip session generation, such as handshakes and pairing verification.
Smart Images

Figure CN114374567B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is a divisional application of the invention patent application with international application number PCT / US2018 / 025084, international application date March 29, 2018, date of entry into the Chinese national phase November 6, 2019, Chinese national application number 201880030148.6, and invention name “Attachment Communication Control”.
[0003] This application claims priority to U.S. Non-Provisional Patent Application No. 15 / 711,931, filed on September 21, 2017, which claims the benefit of and priority to U.S. Provisional Patent Application No. 62 / 514,699, filed on June 2, 2017, the entire contents of which are incorporated herein by reference for all purposes.
[0004] This application is related to U.S. Non-Provisional Application No. 15 / 274,437, filed on September 23, 2016, entitled “Dynamic Connection Path Detection and Selection for Wireless Controllers and Accessories,” which claims priority to U.S. Provisional Application No. 62 / 276,810, filed on January 8, 2016, and is also related to International Application No. PCT / US2015 / 014639, filed on February 5, 2015, entitled “Uniform Communication Protocols for Communication Between Controllers and Accessories,” which is a subsidiary of International Application No. PCT / US2015 / 014639, filed on February 5, 2015, entitled “Uniform Communication Protocols for Communication between Controllers and Accessories,” which is a subsidiary of International Application No. PCT / US2015 / 014639, filed on February 5, 2015, entitled “Uniform Communication Protocols for Communication between Controllers and Accessories” which claims priority to U.S. Provisional Application No. 61 / 935,967 filed on February 5, 2014, the disclosures of which are incorporated herein by reference in their entirety. Technical Field
[0005] The present application relates to accessory communication control. Background Art
[0006] In buildings, network-connected electronic devices are becoming more and more popular in a variety of applications. Network-connected devices can be used to control and / or sense devices and / or activities that occur in buildings. Examples of such devices include wireless light switches and / or bulbs, remotely controllable thermostats, doors that can sense when they are opened or closed, etc. Each of these devices is usually connected to a local network in the building, which may or may not be connected to the Internet. The local network enables each device to be controlled by some other device, or at least enables the device to report its status to some other device. For example, a network-connected door sensor can be programmed to report to a controller or central hub when the door has been opened. The controller or central hub can be programmed to perform some action when a report is received. After opening the door, the user can program the controller to turn on the network-connected lights in the building (e.g., lights in the entrance or living room of a house).
[0007] However, latency between these network-connected devices can become an issue. For example, latency can become an issue when the devices are configured to handshake with each other and / or are configured to protect data being transmitted. In some cases, a user may activate a light switch and must wait three to four seconds for the light to turn on. Summary of the invention
[0008] As discussed, latency between network-connected devices can become a real problem, causing frustration and dissatisfaction among consumers. In some cases, latency (e.g., no response or slow response) is often an indicator of response time, e.g., the time it takes for a device to respond or perform an action in response to a request. High latency indicates a long response time (or at least longer than expected), while low latency indicates a fast (or at least faster) response. For network-connected devices, users expect very low latency when requesting the device to perform an operation. For example, if a user selects a button or switch to turn on a light, the latency should be low enough (e.g., less than 1 second) so that the user does not have to wait for the light to turn on. Therefore, latency (more specifically) can be an indicator of the amount of time it takes between the time when the accessory provides a notification and the time when the controller recognizes the information included in the notification. In some examples, the button / switch can be user-programmable so that the user can define an action to be performed by the controller. When the user activates the button, the button can send an event to the controller, which in turn can trigger an action (e.g., turn on a light or other electronic device). The action can include the controller sending an instruction to the light to indicate that the light is turned on.
[0009] Due to the nature of network-connected devices, data is sent from one device to another to implement the requested action (e.g., automation based on information in a notification). Thus, in the light switch example, the switch and another device (e.g., a controller) will share information (e.g., information sent to the controller will indicate that the switch has been activated), and the controller will ultimately send instructions to the light bulb to instruct the light bulb to turn on (or power may be sent to the light bulb to turn it on). In this example, low latency would indicate that the controller was able to quickly (e.g., very short milliseconds) recognize information from the accessory indicating that the switch has been activated. However, if a handshake operation is to be performed and / or a secure session is to be established, high latency associated with the communication of information between devices may cause the device to lose connection or respond too slowly. In some cases, if one connected device does not receive confirmation or other information from another connected device within a certain period of time, it may indicate that the waiting device is disconnected or attempting to establish a new connection. In these cases, when latency is high, the operability of the network-connected device may be severely reduced.
[0010] Certain embodiments of the present disclosure relate to an accessory communication control protocol that will mitigate high latency issues by establishing a communication workflow that may not rely on handshaking or establishing a secure session, while still protecting the data to be transmitted. For example, a network-connected device with a sensor may be able to transmit a state change (or heartbeat) to a controller device or a network hub (e.g., a base station) without first establishing a connection with the controller device. In this way, a single broadcast may be used to report a state change as long as the two devices are instructed about the communication workflow.
[0011] In some examples, a controller device (or "controller") may communicate with any number of other electronic devices to be controlled (referred to herein as "accessory devices" or simply "accessories"). For example, by providing a general-purpose computing device with suitable executable program code, a controller may be implemented on a general-purpose computing device such as a desktop computer, a laptop computer, a tablet computer, a mobile phone, a smart television (TV) device, other handheld or wearable computing devices; or, the controller may be a dedicated computing device. Accessories may include any device that can be controlled by a controller. Examples of accessories include lamps, thermostats, door locks, automatic door openers (e.g., garage door openers), cameras or camcorders, and the like. Other examples of accessories include door sensors, motion sensors, buttons (e.g., network connection switches or other contact sensors), and the like. Accessories and controllers may communicate with each other via wired or wireless channels using standard transmission protocols such as Wi-Fi, Bluetooth, Bluetooth LE, and the like.
[0012] In some embodiments, the accessory communication control protocol may define a simple and extensible framework for defining accessories as a collection of services, where each service is defined as a set of features, each of which has a defined value at any given time. These features may represent various atomic aspects of the state of the accessory. For example, in the case of a thermostat, features may include power (whether the thermostat unit is on or off), current temperature (the actual temperature measured by the thermostat), and target temperature (the settable temperature that the thermostat attempts to maintain). In some cases, a heartbeat (e.g., a status notification indicating that the device sending the heartbeat is active) is a feature. The protocol may further define a message format that can be used by the controller to send command and control messages (requests) to the accessory, and may define a message format for the accessory to send a response message. These requests may allow the controller to interrogate (e.g., read) accessory features, and in some cases modify (e.g., write) accessory features; for example, the controller may read a power feature to determine whether the accessory is on or off, and may write a power feature to close or open the accessory. Thus, regardless of the functionality, any type of accessory may be controlled by sending appropriate requests. The accessory may provide an accessory definition record to the controller. The attachment definition record may include complete information about all accessible features of the attachment. The controller may use the attachment definition record to determine how to interact with the attachment. For example, the controller may use information from the attachment definition record to construct a user interface for operating the attachment and to construct a request message for the attachment. In some cases, the attachment definition record may be provided to the controller when the attachment registers with the controller and / or the network.
[0013] In some embodiments, the protocol may further define a notification mechanism that the accessory can use to notify the controller when a feature changes. Examples include: a passive notification mechanism, in which the controller can query the accessory whether any features have changed; and an active or event-based notification mechanism, in which the accessory can selectively generate messages to one or more controllers when specific features change. Multiple notification mechanisms can be supported simultaneously, and the controller can select the notification mechanism to use for a specific accessory, service, or feature. In addition, multiple active notification mechanisms can be supported simultaneously, so that (for example, when the accessory does not know which mechanism the controller will support) the accessory can use a first active notification mechanism and a second active notification mechanism.
[0014] The following detailed description together with the accompanying drawings will provide a better understanding of the nature and advantages of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A home environment according to an embodiment of the present disclosure is shown.
[0016] Figure 2 is a simplified block diagram of a broadcast notification according to an embodiment of the present disclosure.
[0017] Figure 3 is a flow diagram of a process for implementing an accessory communication control protocol according to an embodiment of the present disclosure.
[0018] Figure 4 is another flow diagram of a process for implementing an accessory communication control protocol according to an embodiment of the present disclosure.
[0019] Figure 5 is yet another flow chart of a process for implementing an accessory communication control protocol according to an embodiment of the present disclosure.
[0020] Figure 6 is a simplified block diagram of a controller according to an embodiment of the present disclosure.
[0021] Figure 7 is a simplified block diagram of an accessory according to an embodiment of the present disclosure.
[0022] Figure 8 is a simplified block diagram of an accessory architecture according to an embodiment of the present disclosure.
[0023] Fig. 9 is a simplified block diagram of a controller architecture according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] In some examples, a controller device (or "controller") may communicate with any number of other electronic devices to be controlled (referred to herein as "accessory devices" or simply "accessories"). For example, a controller may be implemented on a general-purpose computing device such as a desktop computer, laptop computer, tablet computer, mobile phone, other handheld or wearable computing device by providing a general-purpose computing device with suitable executable program code; alternatively, the controller may be a dedicated computing device. Accessories may include any device that can be controlled by a controller. Examples of accessories include lamps, thermostats, door locks, automatic door openers (e.g., garage door openers), cameras or camcorders, and the like. Other examples of accessories include door sensors, motion sensors, buttons (e.g., network connection switches), and the like. Accessories and controllers may communicate with each other via wired or wireless channels using standard transmission protocols (such as Wi-Fi, Bluetooth, Bluetooth LE, Ethernet, 3GPP LTE, etc.) or versions or evolutions thereof.
[0025] Example Environment
[0026] Figure 1A home environment 100 according to an embodiment of the present disclosure is shown. The home environment 100 includes a controller 102, which can communicate with various accessory devices (also referred to as "accessories") located in the environment 100. Controllers 102 and 103 can be, for example, desktop computers, laptop computers, tablet computers, smart phones, smart speakers, wearable computing devices, personal digital assistants, TV set-top boxes, or any other computing device or device group capable of transmitting command and control messages to accessories as described herein and presenting a user interface to allow a user to indicate the desired operation of the accessories (e.g., using a TV or other display when the controller is a set-top box). In some embodiments, controllers 102, 103 can be implemented using multiple discrete devices. For example, there can be a base station (e.g., a smart TV or other device acting as a network hub) such as a controller 103 that communicates with the accessories, and one or more mobile remote control stations (e.g., handheld or wearable devices such as mobile phones, tablet computers, smart watches, glasses, etc.) such as controller 102, wherein the base station can be installed at a fixed position in the environment 100, and these mobile remote control stations provide a user interface and communicate with the base station to achieve control of the accessories. In some examples, as noted, controller 103 can be a base station that facilitates communication between other controllers (eg, controller 102 or other controllers) and accessories via a WiFi network or the like.
[0027] Any type of accessory device can be controlled. Examples of accessory devices include door locks 104, garage door systems 106, lamps 108, switches (e.g., buttons) 110, and thermostats 112. In some cases, controllers 102, 103 can communicate directly with accessories; for example, controller 102 is shown as communicating directly with door locks 104 and garage door systems 106, and controller 103 is shown as communicating directly with switch 110. In other cases, controllers 102, 103 can communicate via an intermediary. For example, the figure shows that controllers 102, 103 communicate via a wireless network access point 114 with accessories 108, 112 located on a wireless network provided by access point 114. For example, access point 114 can be a WiFi router or other network interface, or the access point can be another device that can act as a WiFi router (e.g., a hotspot), receive WiFi signals from a router, and connect one or more other devices to the router by transmitting its own WiFi signals and / or short-range signals (e.g., Bluetooth, etc.). As described above, in some embodiments, controller 103 may act as a base station; however, base station functionality may be integrated into any controller (e.g., controller 102); for example, when a home is not equipped with a device such as controller 103.
[0028] Various communication transmission means and combinations of transmission means may be used, and different transmission means may be used for different devices. An example of a communication transmission may be in accordance with the Bluetooth SIG defined and promulgated by the Bluetooth SIG, Inc. (http: / / www.bluetooth.com). Communication standards and protocols for transmission; as used herein, the term "Bluetooth" generally refers to communication standards and protocols, and the term "Bluetooth LE" as used herein refers to Smart communication standards and protocols. The Bluetooth protocol can support direct point-to-point communication between devices within a limited range. Another example of communication transmission can be compliant with Wi-Fi (http: / / www.wi-fi.org) Communication standards and protocols for transmission; as used herein, "Wi-Fi" generally refers to Standards and Protocols. The Wi-Fi protocol may define a wireless network with a central access point that routes communications between different devices on the network. The network may support the standard Internet Protocol (IP) suite, including, for example, the Transmission Control Protocol (TCP) and the Hypertext Transfer Protocol (HTTP). It should be understood that Bluetooth and Wi-Fi are used as examples of communication transports and protocols; other transports and protocols may also be used. In addition, although wireless communication transmission means are shown, wired transmission means may also be provided for some or all accessories. For example, the light bulb 108 may be connected to the access point 114 via a wired connection, and the controller 102 may communicate with the light bulb 108 by wirelessly sending messages to the access point 114, which may act as a bridge to deliver the message to the light bulb 108 via the wired connection. Other combinations of wired and wireless communications are also possible.
[0029] Furthermore, although two controllers 102, 103 are shown, the home environment 100 may have multiple controller devices. For example, each person living in the home may have one or more personal devices (e.g., mobile phones, tablets, laptops, wearable devices) that may act as controllers for some or all of the accessories 104-112. Different controller devices may be configured to communicate with different subsets of accessories; for example, a child's controller may be prevented from modifying the settings on the thermostat 112, while a parent's controller device may be allowed to modify the settings. Such permissions may be configured through the settings of the controller devices.
[0030] Certain embodiments of the present disclosure relate to an accessory communication control protocol that facilitates communication by an accessory, such as any of accessories 104 to 112, with one or more controllers, such as controllers 102, 103. The protocol can provide a simple and extensible framework that can model an accessory as a collection of services, where each service is defined as a set of features, each feature having a defined value at any given time. These features can represent atomic aspects of the state of the accessory. For example, in the case of thermostat 112, features can include power (whether the thermostat is on or off), the current temperature measured by thermostat 112, and the target temperature set by thermostat 112. An example of an accessory model using services and features is described below.
[0031] The protocol may further define a message format that can be used by an accessory (e.g., thermostat 112) to send updates to feature states as part of a broadcast notification or other packet to be sent to a controller (e.g., controllers 102, 103). In some examples, a broadcast notification may be provided instead of a handshake and / or before a handshake is performed between a reporting accessory and a receiving controller. Thus, the protocol enables a logical broadcast session prior to any actual connection between the devices. The broadcast notification may include updated state information and other data that can be used by the controller to authenticate and / or verify that the data is accurate and / or for a registered accessory. The broadcast notification may also be provided instead of establishing a secure connection with the controller or before establishing a secure connection with the controller. Additional details regarding the broadcast notification will be described below.
[0032] In some examples, command and control messages may be sent by the controller to allow the controller to query (e.g., read) the current state of the accessory features, and in some cases modify (e.g., write) the accessory features. For example, modifying the power features of thermostat 112 can cause thermostat 112 to turn off or on. Therefore, any type of accessory can be controlled by sending appropriate messages, regardless of the function or manufacturer of the accessory. In addition, in some embodiments, the accessory may provide an accessory definition record to the controller. The accessory definition record may include complete information about all accessible features of the accessory. The controller may use the accessory definition record to determine how to interact with the accessory. For example, the controller may use information from the accessory definition record to construct a user interface for operating the accessory and to construct a request message for the accessory. The accessory definition record may be received at the controller during the registration phase of the accessory device, rather than during the establishment of a secure session or during a handshake between the accessory and the controller.
[0033] The protocol may further define a notification mechanism that allows the accessory 112 (or other accessory) to selectively notify the controller 102, 103 when a state change occurs. Examples include: a passive notification mechanism, in which the controller 102, 103 can query the accessory (e.g., accessory 112) to discover whether any characteristics have changed; and an active, notification, or event-based notification mechanism, in which the accessory 112 (or other accessory) can selectively generate messages (e.g., broadcast notifications) and / or broadcast notifications to one or more controllers when a specific characteristic changes or when providing a state update (e.g., some state updates do not identify any characteristic or state changes). Multiple notification mechanisms can be supported simultaneously, and the controller can select the notification mechanism to be used for a specific accessory, service, or feature. In addition, the accessory can select the notification mechanism to be used, or can indicate which notification mechanism the accessory is to use. Examples are described below.
[0034] In some embodiments, communication with a given accessory may be limited to authorized controllers. The protocol may specify one or more mechanisms for establishing a "pairing" between controllers 102, 103 and a given accessory (e.g., a door lock accessory 104), providing a high degree of confidence that the user expects controllers 102, 103 to be able to control accessory 104 and that a controller that has established a pairing with a particular accessory may be considered to have authorized the given accessory. Pairing can be established, for example, by establishing a secure encryption framework using short-term keys and out-of-band shared secrets. Long-term public keys of the accessory and controller can be exchanged within the framework, and the accessory and controller can persistently store the exchanged keys to establish pairing. After pairing is established, accessory 104 is able to verify whether the received communication is from a paired controller 102, 103 or from another device, and accessory 104 can reject any communication that is not from a paired controller 102, 103 (and vice versa). For example, when a previously paired accessory and controller reconnect, they can verify the previous pairing (e.g., by proving that each pair possesses the other's long-term public key) and generate a session-specific encryption key for communicating within a pairing verification session (e.g., a secure session). In some embodiments, multiple controllers can be paired with the same accessory, and the accessory can accept and respond to communications from any of its paired controllers while rejecting or ignoring communications from unpaired controllers.
[0035] In some examples, each of the accessories 104 to 112 may be configured to register with one of the controllers 102, 103. Registration may be a one-time process in which the accessory provides some information about its features and the controller provides some information about the features or feature types that the controller will register. Registering features and / or types may include providing a list of identifiers that identify the specific features or feature types that the controller is requesting updates to. For example, accessory 112 is a thermostat, which means that it may include more than one feature. Among other things, the thermostat may sense the current temperature in a room, it may turn on a heater or air conditioner, and it may sense when a user requests (e.g., by selecting a button on the thermostat 112) to adjust the temperature in the room. Each of these features may correspond to a specific instance identifier, and each of these instance identifiers may have a state (e.g., on or off) or a value (e.g., a temperature reading or brightness value in the case of light 108). The heartbeat may have its own instance ID because the heartbeat is modeled as a feature of the accessories 104 to 112.
[0036] In some examples, the controllers 102, 103 may be configured only to receive status updates corresponding to the temperature in the room becoming above or below a threshold. The controllers 102, 103 may then be able to perform actions based at least in part on receiving the status updates (e.g., turning on a heater or air conditioner, presenting the room temperature to a user on a user interface (UI), etc.). Therefore, in this example, the controllers 102, 103 may register the feature or type by providing an instance identifier corresponding to that feature or type. Registration of types rather than features enables the controllers 102, 103 to register multiple features classified under a certain type. For example, a temperature threshold may be a type of feature that will cover both an upper threshold feature (e.g., when the temperature exceeds a certain value) and a lower threshold feature (e.g., when the temperature is below a certain value). This information may also be provided during registration when the controllers 102, 103 are configured to perform operations in response to receiving a status update in a broadcast notification. For example, if the controller 102, 103 is configured to turn on a light (e.g., accessory 108) once a user activates a switch (e.g., switch accessory 110), this is considered automation (e.g., controller 102, 103). In some cases, when the controller 102, 103 is configured with automation, the controller 102, 103 may instruct the appropriate accessory (in this example, switch accessory 110) during registration to always report changes in the state of the feature (e.g., "on" or "off"). Here, the switch accessory 110 will immediately generate a broadcast notification upon detecting a change in state and provide the broadcast notification to either or both of the controllers 102, 103. In some cases, only the controller 103 (e.g., home hub) will perform automation. In this case, if automation is configured, but the controller 102, not the controller 103, receives the broadcast notification, the controller 102 may be configured to send the broadcast notification to the controller 103 via WiFi (e.g., via access point 114) or via Bluetooth (etc.). However, when there is no automation, the accessory may not immediately transmit the broadcast notification. Instead, accessories 108 to 112 may randomly report only status updates or only report status updates to identify low battery, or only report that the accessory is still active, based at least in part on a schedule (e.g., every few seconds, etc.). In some examples, accessories 108 to 112 may be configured to report status updates every 1.28 seconds or every 2.5 seconds, depending on the type of device (e.g., a low-power device), the remaining battery power available, the type of feature (e.g., an unimportant feature or a feature that changes frequently), etc. When accessories 104 to 112 register with controllers 102 and 103, controllers 102 and 103 may indicate the frequency with which each accessory requires status updates for each feature. This information may also be transmitted to accessories 104 to 112 after each new key is generated (see below for more details on key generation).Therefore, the timing of reporting each feature update can be changed.In addition, this information can be configured by the user of the device 102 to 112.
[0037] In certain embodiments, once the accessory has been registered with the controller, the accessory may be configured to implement the features of the accessory communication control protocol described herein. Based on the protocol, the accessory may bypass or otherwise avoid implementing a pairing verification session or any secure session including a handshake or other established connection. In other words, when the accessory determines that a state update is to be reported (e.g., a feature change registered with the controller), the accessory may generate a broadcast notification including the state update instead of first announcing that the update is available. This can significantly improve the latency of the system (e.g., the time taken between the time when the state change is identified and the time when the controller can act on the system), and can enable low-power and ultra-low-power accessories to save a lot of battery power. By implementing the accessory communication control protocol, the entire round-trip session generation (e.g., handshake and / or pairing verification) can be avoided, and the low-power accessory can sleep for a long time without using the battery to maintain the connection during the time when there is nothing to report. In addition, to ensure backward compatibility, the accessory may be configured to implement the accessory communication control protocol, and then after transmitting the broadcast notification, the accessory may implement a potential previously used method: transmitting a notification, establishing a secure session (e.g., a pairing verification session), and then transmitting a payload (e.g., state update information) via the secure session. Additional details of the accessory communications control protocol are described below.
[0038] It should be understood that home environment 100 is illustrative, and variations and modifications are possible. Embodiments of the present disclosure may be implemented in any environment where a user wishes to use a controller device to control one or more accessory devices, including but not limited to a home, a car or other vehicle, an office building, a campus with multiple buildings (e.g., a university campus or a corporate campus), etc. A controller may be any device for controlling one or more other devices (accessories), or an accessory may be any device that allows some or all of its operations to be controlled by a controller or provides sensory information (e.g., indicating some information that a sensor has sensed) to a controller. Controller 102 may implement or include any or all of the features described herein as being implemented or included in the controller, and accessories such as accessories 104 to 112 may implement or include any or all of the features described herein as being implemented or included in the accessories.
[0039] In some embodiments, the controller 102 can communicate with an accessory (e.g., accessory 108) from a remote location (e.g., anywhere in the world). For example, when located in a remote environment, the controller 102 can communicate with a server that can relay messages to the accessory 108 via a wide area network (e.g., the Internet) (e.g., the controller 102 can communicate with the accessory 108 locally by communicating with the access point 114 and / or the controller (base station) 103 located in the environment 100). The content of the communication between the controller 102 and the accessory 108 can be opaque to the server, and the server can simply pass encrypted data while remaining agnostic to its content. Therefore, the accessory can be operated locally (e.g., by a controller that can establish a direct communication path to the accessory) or remotely (e.g., by a controller that communicates indirectly via a relay server, etc.).
[0040] Example Broadcast Notification
[0041] As described above, implementing the accessory communication control protocol includes configuring the accessory to include a payload within an initial broadcast notification. The broadcast notification will be provided before and / or in place of a secure session established between the accessory and the controller. However, the broadcast notification may need to provide status updates securely in a manner that prevents malicious intent and simultaneously notify the controller that an update is available. Previously, updates would be notified to the controller via a notification that did not include a payload. However, this can result in excessive delays and use excessive battery power of the accessory.
[0042] Figure 2 An exemplary environment 200 is shown in which an accessory 202 can provide a broadcast notification 204 to a controller 206. In some embodiments, the accessory 202 can include a memory 208 configured to store computer executable instructions for operation and security keys and global counter values for constructing the broadcast notification 204. Additionally, the controller 206 can include a memory 210 configured to store computer executable instructions for operation and security keys and global counter values for the accessory 202. If the controller 206 is configured to control multiple different accessories, the controller can store multiple sets of key / counter pairs (e.g., one set for each accessory). Figure 2In the example shown, the key and the global counter are the same, at least because the key / counter pair stored in the memory 210 is associated with the accessory 202 and because the two devices are currently synchronized (e.g., the keys have been generated using matching security protocols and the counters have been incremented in a consistent manner). In some examples, the broadcast notification 204 will include a device identifier that uniquely identifies the accessory and the encrypted payload 212. The device identifier may be provided to the accessory 202 by the controller 206 during the registration phase or at any time. For security purposes, the device identifier may be randomly generated by the controller 206. The controller 206 may store (e.g., in a lookup table or other type of data structure) an association between the actual accessory identifier (e.g., a media access control (MAC) address) and the device identifier randomly generated by the controller 206. When the controller 206 receives the broadcast notification 204, the controller 206 may use the device identifier to initially identify which accessory is providing the broadcast. In addition, the encrypted payload 212 may include some elements. For example, encrypted payload 212 may include a state number or counter value (eg, a global state counter), a list of instance identifiers and associated values (eg, an identifier for each feature that has changed and what each new value is), and an authorization tag.
[0043] In some examples, the key is used to encrypt the payload. When the payload is encrypted, an authorization tag can be generated to sign the message. In some cases, the authentication tag is a hash value generated to authenticate the message. For example, an authentication tag can be generated and attached to the encrypted payload 212 so that the authentication tag becomes part of the broadcast notification 204. Once the controller 206 receives the broadcast notification 204 and decrypts it, the controller 206 can use the hash as the hash of the attachment 202 to generate its own version of the authentication tag. If the authentication tag generated by the controller 206 matches the authentication tag attached to the encrypted payload 212 (for example, the authentication tag generated by the attachment 202 using the hash), the controller 206 will know that nothing in the encrypted payload 212 has been changed.
[0044] The state number included in the encrypted payload 212 is a global state counter maintained by both the accessory 202 and the controller 204. Each time an update is provided, both devices can increment the counter. In addition, the state counter is used together with the key to encrypt and decrypt the payload. However, the counter / key combination will never repeat. Because the state counter is maintained by both devices, it can be included in the encrypted payload without being shared separately. The use of the state counter prevents playback attacks. If the broadcast notification 204 is played back by a third party, the controller 206 will know because the state counter will not be incremented. The encrypted payload 212 also includes a list of instance identifiers and associated values. Examples of instance identifiers and values include identifying features and new states of the accessory (e.g., open, closed, or some non-binary values such as temperature values or brightness values). Multiple different identifier / value pairs can be provided in a single broadcast notification so that the accessory 202 can provide more than one update at the same time. An authorization tag (e.g., a key) is also included in the encrypted payload 212. Much like the counter value, the key is generated and maintained individually by each device. In some examples, when the accessory 202 registers with the controller 206, the controller 206 may provide information identifying a hash algorithm for generating a key. Both devices may use a public / private pair key generation mechanism. Information about specific algorithms and mechanisms may be provided by the controller 206 to the accessory 202 so that they both use the same mechanism to generate matching keys. As noted, the accessory 202, together with a state counter (e.g., a random number), will use a key together to encrypt the payload when generating a broadcast notification 204. When generating a broadcast notification 204, the accessory 202 may transmit the broadcast notification 204 to the controller 206 and increment the counter. In some cases, the controller 206 may confirm receipt of the broadcast notification 204 by transmitting a reception confirmation indicator (e.g., "ack") to the accessory 202. In some cases, the controller 206 confirms receipt by attempting to initiate a secure connection with the accessory 202. Even if the two devices are not intended to be "connected", the pseudo confirmation may also serve as an indicator of the accessory 202, indicating that the controller 206 has received the broadcast notification 204. In some cases, when accessory 202 receives an "ack" or "pseudo-ack" (e.g., a connection initiation / request), accessory 202 can be configured to end communication with controller 206 (e.g., the accessory may not perform the fallback process described below, e.g., in Figure 4 414 and 418). This can save significant power for accessory 202. For example, it can skip some calculation steps and data transmission, thereby reducing battery consumption. For each different accessory, a specific controller may need to track corresponding information (e.g., device ID, counter, key, instance ID, etc.). Each corresponding information can be stored in a table on each controller, hub, or server.
[0045] Exemplary Accessory Communication Control Flow
[0046] Figure 3 is a flow chart of a process 300 for implementing the accessory communication control protocol described herein. In process 300, accessory 302 can communicate with controller 304 via one or more network connections. Accessory 302 can be, for example, Figure 1 104 to 112, and the controller 304 may be, for example, Figure 1 Controller 102. Controller 304 and accessory 302 may be physically located in the same home or building.
[0047] At block 306, accessory 302 can receive key generation information. As noted, the key generation information can identify a hash algorithm (e.g., HKDF-SHA-512 or other scheme) used to generate a shared key that will be used to encrypt and / or decrypt the payload of the broadcast notification. The key generation information can be received when a device (e.g., accessory 302) is added to the system, when a user decides to configure automation, or when accessory 302 is updated with new firmware that is capable of using the broadcast notification protocol.
[0048] At block 308, accessory 302 can utilize the key generation information to generate key 310. As noted, key 310 can be used to encrypt a payload that includes a state counter, state update information (e.g., instance identifier / value pairs), and key 310. The same key generation information can also be used by controller 304 to generate a key.
[0049] At box 311, controller 302 may transmit information identifying one or more features of interest (e.g., registration or subscription features). In some cases, this step is performed after key 310 is generated at box 308 so that features can be dynamically updated. In other words, a user may request to be notified of certain features once, then change their mind and cancel these features later. This information may also be received when a device (e.g., accessory 302) is added to the system, when a user decides to configure automation, or when a new firmware update accessory 302 is used to use the broadcast notification protocol. The received information identifies which features or feature types of accessory 302 will be included in the broadcast notification. The identification may be in the form of one or more instance identifiers. In addition, the information received at box 308 may also include timing information indicating the frequency at which accessory 302 provides broadcast notifications to controller 304. For example, controller 304 may configure accessory 302 to provide status updates at certain times only after a specific amount of time and / or at least in part based on other timing factors.
[0050] At block 312, accessory 302 can detect that a notification is about to be provided to controller 304. The notification can indicate a change in state; however, in some cases, the notification can include remaining battery life information or an indication that accessory 302 is still active. Figure 3 The user is shown selecting a button or UI element of accessory 302, but any state change or information notification may be detected at this stage. For example, if an external sensor of accessory 302 identifies an increase or decrease in temperature, the change in temperature will trigger a notification. Alternatively, different notifications may be triggered for other devices. For example, a door sensor may identify when a door has been opened or has been in an open position for a certain amount of time. In addition, a notification may be triggered by accessory 302 determining that it is time to indicate that it is still active. Once a notification is triggered at box 312, accessory 302 may determine whether to broadcast the notification. As noted, in some examples, accessory 302 may not broadcast a notification (e.g., if the notification corresponds to a change in a feature or type that is not registered by controller 304).
[0051] At block 314, accessory 302 can generate broadcast notification 316. The broadcast notification can include a device ID and a payload (e.g., a list of instance identifiers and associated values (e.g., state updates) and a state counter). Additionally, as part of generating broadcast notification 316, accessory 302 can encrypt the payload (e.g., notification and / or state update) using the state counter and a shared key.
[0052] At box 318, accessory 302 can transmit broadcast notification 316 to controller 304. Controller 304 can then decrypt the payload using the shared key and state counter, decompress the payload by extracting the instance ID and value, and store these values in a table corresponding to the device ID. Controller 304 can also perform one or more operations based at least in part on the data decompressed from the payload and / or transmit one or more instructions to other devices. For example, if a door is opened, controller 304 can be configured to turn on a set of lights. The user can configure controller 304 using instructions that, when executed, instruct controller 304 to perform operations.
[0053] In some cases, the controller 304 may be a mobile user device (e.g., a mobile phone) that may receive the broadcast notification 316 via a Bluetooth (or the like) connection or alternatively via a WiFi router or other access point. However, in other cases, the controller 304 may be a home hub (e.g., a smart TV device or other base station device), such as Figure 1Controller 103. If controller 304 acts as a home hub and other controllers in the home receive broadcast notification 316, the other controller may be able to decrypt broadcast notification 316 (e.g., the home hub may have provided keys and counters to all controllers in the home), and then relay broadcast notification 316 to the home hub and / or other controllers that can communicate with the other controller. In this way, when broadcast notification 316 is sent, each controller in the home (or each controller associated with the account of the user who configured the accessory) will eventually receive broadcast notification 316. However, in some examples, one or more controllers may completely miss broadcast notification 316. If the device that missed the notification is a home hub, one or more other controllers that did receive the notification may be configured to provide broadcast notification 316 to the home hub. The home hub can then act on the status update or heartbeat (e.g., by performing automation, notifying the user, recording that the accessory is still available, etc.). For example, a home hub can act as a central engine for determining which controllers are interested in the information contained in the broadcast notification 316 (e.g., if the broadcast notification 316 identifies an event), which automations will run based on the information, what other accessories will be controlled based on the information, etc.
[0054] Figure 4 4 is another flow chart, this time showing a process 400 for implementing the accessory communication control protocol described herein. In process 400, accessory 402 can communicate with controller 404 (e.g., the devices can be in close proximity to each other and communicate via Bluetooth or other short-range communication protocols), and can communicate with controller 404 via one or more network connections. Accessory 402 can be, for example, Figure 1 104 to 112, and the controller 404 may be, for example, Figure 1 102. Process 400 is similar to process 300, except that in process 400, controller 404 may not be configured and / or updated using the accessory communication control protocol. Thus, controller 404 may expect or otherwise listen for a notification on which it will respond to accessory 402 with handshake information or secure session information. Thus, if controller 404 is not updated using the accessory communication control protocol (e.g., controller 404 is still running an old operating system), controller 404 may respond to the broadcast notification (e.g., Figure 3316 of the broadcast notification). In this case, the controller 404 may ignore the broadcast notification and continue to wait for notifications as expected in the previously used method. Since the attachment 402 will continue to use the previously used method after sending the broadcast notification, if the controller 404 has not been updated, the controller may follow the previously used method after ignoring the broadcast notification. Alternatively, if the controller 404 has been updated using the protocol, the information received at the end of process 400 may be redundant and ignored. In other words, if the controller 404 has been updated and is therefore able and does decompress and utilize the information in the broadcast notification, the controller 404 will know to ignore subsequently received notifications. The updated controller may be configured to expect to see notifications after receiving the broadcast notification. Therefore, the controller can more actively ignore notifications (rather than receiving data that it cannot understand).
[0055] At block 406, accessory 402 can detect a status notification to be presented (e.g., detect a trigger). This is similar to how accessory 302 can Figure 3 Similarly, Figure 4 A user is shown selecting a button or UI element of accessory 402, at which point any status notifications may be detected. For example, if an external sensor of accessory 402 identifies an increase or decrease in temperature, the change in temperature will be the detected status notification. Alternatively, for other devices, different status notifications may be detected. For example, a door sensor may identify when a door has been opened or has been in an open position for a certain amount of time. Once a status notification is detected at box 406, accessory 402 may determine whether to broadcast the status notification. As noted, in some examples, accessory 402 may not broadcast a status (e.g., if the status corresponds to a feature or type that is not registered with controller 304).
[0056] At block 408, accessory 402 can generate broadcast notification 410. The broadcast notification can include a device ID and a payload (e.g., a list of instance identifiers and associated values (e.g., state updates) and a state counter). Additionally, as part of generating broadcast notification 410, accessory 402 can encrypt the payload (e.g., state notification) using the state counter and a shared key.
[0057] At box 412, accessory 402 can transmit broadcast notification 410 to controller 404. If controller 404 has been configured with the new protocol, the controller can decrypt the payload using a shared key and a state counter, decompress the payload by extracting the instance ID and the value, and store the values in a table corresponding to the device ID. Controller 304 can also perform one or more operations and / or transmit one or more instructions to other devices based at least in part on the data decompressed from the payload. For example, if a switch is activated and the payload indicates an update to a switch that changes from "off" to "on", controller 404 can be configured to turn on one or more lights. The user can configure controller 404 using instructions that, when executed, instruct controller 404 to implement operations. Alternatively, if controller 404 is not configured with the new protocol, controller 404 may not be equipped to handle broadcast notification 410. In other words, controller 404 may not know how to handle broadcast notification 410, so controller 404 may ignore the broadcast notification. In some examples, controller 404 may be out of range of accessory 402 when broadcast notification 410 is transmitted. However, another accessory may be in range and may receive broadcast notification 410. In this case, the other accessory may recognize broadcast notification 410 as intended for controller 404 (or some other device) and may rebroadcast broadcast notification 410 to controller 404 (or some other device). In this way, any accessory or group of accessories may act as a relay or group of relays to ultimately send broadcast notification 410 to its intended recipient (e.g., controller 404 in this case).
[0058] At block 414, accessory 402 can generate notification 416. Notification 416 is configured to indicate that accessory 402 has a status update; however, notification 416 does not include a payload. Instead, notification 416 is simply a notification letting controller 404 know that a status update is ready to be transmitted.
[0059] At block 418, accessory 402 can transmit notification 416 to controller 404. In some cases, notification 416 can be generated and / or transmitted regardless of whether the status update includes information about the features with which controller 404 is registered. Additionally, notification 416 can be generated and transmitted even if controller 404 is properly configured with the new protocol. In this case, controller 404 will understand that notification 416 is redundant, and controller 404 can ignore notification 416. However, generation and transmission of notification 416 enables backward compatibility with old, outdated, or otherwise non-updated controller devices when controller 404 has not yet been updated with the new protocol.
[0060] Figure 5is another flow chart, this time showing a process 500 for implementing the accessory communication control protocol described herein. In process 500, accessory 502 communicates with controller 504, and may communicate with controller 504 via one or more network connections. Accessory 502 may be, for example, Figure 1 104 to 112, and the controller 504 may be, for example, Figure 1 Controller 102. Process 500 is similar to process 300 and process 400. In this example, controller 404 has been updated with the protocol and is therefore configured to execute instructions to work with accessory 502 to implement the protocol (e.g., including decrypting broadcast notifications, etc.).
[0061] At box 506, the controller 504 can provide (e.g., transmit) configuration information, a device ID, and key generation information to the accessory 502. The configuration information may include information identifying which features of the accessory 502 the controller 504 is to be registered for. In addition, the configuration information may include timing rules for notifying the controller 504 of the frequency for specific features. For example, the controller 504 may request to register its first feature at a frequency of "every change" and / or register its second feature at a frequency of "once a day" or "once every x", where "x" is a certain time period. As noted, the device ID can be randomly generated by the controller 504 or some other device (e.g., a network hub or identity management server) and can be unique for each accessory that communicates with the controller 504. The key information can include key generation information (e.g., identifying what encryption algorithm to use, a private key paired with a known public key, etc.). In some examples, the key information may also include instructions for when to generate the key (e.g., after a certain number of uses (e.g., 355 times, etc.), after a certain amount of time (e.g., 8 days, etc.), after a malicious connection attempt is detected, once a status number needs to be rolled, etc.).
[0062] At block 508, accessory 502 can receive configuration information, device ID, and key information from controller 504. Accessory 502 can use this information to determine when to generate keys and / or how often to generate keys. Accessory 502 can also use this information to determine when to regenerate keys (e.g., generate new keys to replace old keys).
[0063] At block 510, accessory 502 can generate or regenerate a new key. As noted, the key information can be used to generate the key, and the generation can be based at least in part on one or more hashing algorithms utilizing a public / private pair encryption mechanism.
[0064] At block 512, controller 504 may also generate or regenerate a new key. The key generated by controller 504 will be the same as the key generated by accessory 502 at block 510 because they will use the same security protocol. In other words, the security protocol of accessory 502 and the security protocol of controller 504 will match.
[0065] At block 514, accessory 502 can identify a change in state of one or more of the features of accessory 502. For example, accessory 502 can detect that a user has selected a button or switch, that the temperature has increased or decreased above a certain threshold, that a door or window has been opened, that motion has been detected, etc.
[0066] At block 516, accessory 502 can examine the configuration information received from controller 504. By examining the configuration information, accessory 502 can be able to determine whether the change in state detected (e.g., identified) at block 514 matches one of the registered characteristics of controller 504. Based on this determination, accessory 502 will determine whether to report the detected change.
[0067] At block 518, accessory 502 will determine whether to report a status update. This determination may be based at least in part on whether to register the feature, type of feature, or a specific change of controller 504. Additionally, this determination may be based at least in part on a timeline or amount of time that has passed since the last status update. If accessory 502 determines not to report a status update, accessory device 502 may return to block 514 to continue waiting for the next status change. Otherwise, accessory 502 may proceed to block 520.
[0068] At block 520, accessory 502 that has determined to report a state change at block 518 may encrypt the state information (along with the rest of the payload) into an encrypted payload. As described, the encryption process may include using a hash algorithm with the key and a global state counter (e.g., a random number) generated at block 510. Additionally, the state update or updates, the random number, and the key (e.g., a public key of a public / private key pair) are encrypted together as a payload.
[0069] At block 522, accessory 502 can generate a broadcast notification. The broadcast notification will include the state information (and the random number) encrypted at block 520. In addition, the broadcast notification will include the key generated at block 510 and the device ID received from controller 504.
[0070] At block 524, accessory 502 can transmit a broadcast notification to controller 504. In some examples, the broadcast notification can be a one-time notification via a Bluetooth connection or via a WiFi connection. However, in other examples, there is no persistent connection, and the broadcast notification will need to be repeatedly transmitted over a period of time. For example, accessory 502 can broadcast a notification beacon (e.g., repeatedly transmit to any and all devices within range) for a period of time (e.g., 30 milliseconds (ms), etc.).
[0071] At block 526, accessory 502 will increment the counter after transmitting the broadcast notification. This enables detection of replay attacks and ensures that controller 504 can confirm that the broadcast notification it just received is the most recent broadcast notification.
[0072] At block 528, controller 504 receives the broadcast notification transmitted by accessory 502 at block 524. In some examples, controller 504 is configured to listen or scan for messages from any accessory device or other controller device. Scanning can be performed at certain intervals for a certain amount of time. For example, controller 504 can scan for messages every 300ms, 30ms each time. In other words, controller 504 can scan for messages for 30ms continuously, then wait 300ms, and then scan again for 30ms. This operation can be repeated at these or other time intervals until a broadcast notification is received, or this operation can be repeated at these or other time intervals regardless of whether any message is received.
[0073] At box 530, the controller 504 can confirm that the broadcast notification is the appropriate next broadcast notification. This can be confirmed by: a) checking the device ID; and b) using the state counter and key to attempt to decrypt the encrypted payload. The controller 504 will know that the key is accurate because the controller's key and the accessory 502's key are generated using a matching algorithm and because the controller's key is included in the broadcast notification. Therefore, if the payload is not decrypted correctly, the state counter maintained at the controller 504 and the state counter maintained at the accessory 502 (e.g., the state counter used to encrypt the payload) do not match. This may mean that the controller 504 has lost some broadcast notifications transmitted by the accessory 502, or is attempting a replay attack. In addition, in some examples, authentication of the broadcast notification can be performed by generating an authentication tag and comparing it to the authentication tag that is part of the encrypted payload. If the broadcast notification is confirmed by the controller 504, the confirmation (e.g., a dummy connection request) can be sent back to the accessory 502. Additionally, the controller 504 may perform any operations it is configured to perform based at least in part on the state update extracted from the broadcast notification (e.g., once the broadcast notification is decrypted and decompressed). If a replay attack is detected, the controller 504 may generate a new key and instruct the accessory 502 to also generate a new key. In some cases, a replay attack may be detected by identifying that a counter value included in a broadcast notification is a counter value corresponding to a broadcast notification that the controller 504 has received.
[0074] At block 532, controller 504 can increment the counter to keep up with the counter incremented by accessory 502 at block 526. As noted, in some cases, the counter value will roll back to zero after a period of time. For example, if the key is 42 bits, there will be 356 different possible keys; and, since the key and counter combination will not repeat, the counter can roll back to zero after 355. Other scenarios can be used appropriately to roll back the counter to zero while avoiding repeating the same counter / key pair.
[0075] Although Figures 3 to 5The flow of an accessory providing a broadcast notification to a controller (e.g., a mobile device or a network connection hub) is shown, but it should be understood that the accessory communication control protocol can also be used in the opposite direction. In other words, the controller can use the protocol to send update instructions (e.g., in a broadcast notification) to one or more accessories (e.g., in a group or scene). An example of such a function includes a controller instructing a group of lights to turn on at the same time. In this example, the light accessories will be required to be in a listening state at all times, so the light accessories are best plugged into a power source (or have a very strong or durable battery). If the light accessories are always listening, the controller can send a broadcast notification to each light in the group in the manner described above, and the payload may include instructions instead of a status update. The instructions may indicate to the accessory which feature of the accessory will be changed. A scene can be configured with multiple different accessories and / or accessory types, so that a single broadcast notification can indicate several different accessories about feature changes. For example, when the front door is opened, the controller can use the above protocol to implement the scene: a) turn on the heater; b) turn on the lights; and c) play music on the audio player. The broadcast notification can include instructions for a), b) and c) in a single encrypted payload.
[0076] Exemplary Devices
[0077] The embodiments described herein can be implemented in electronic devices that can be of generally conventional design and adapted to conform to the accessory communication control protocol to support broadcast notifications (e.g., secure broadcast sessions) and / or command and control operations by which the accessory (first electronic device) can provide status updates to a controller (second device) and by which the controller (first electronic device) can control the operation of the accessory (second electronic device).
[0078] Figure 6 600 is a simplified block diagram of a controller 600 according to an embodiment of the present disclosure. The controller 600 can implement any or all of the controller functions, behaviors and capabilities described herein, as well as other functions, behaviors and capabilities that are not explicitly described. The controller 600 may include a processing subsystem 610, a storage device 612, a user interface 614, a communication interface 616, a security element 618 and a cryptographic logic module 620. The controller 600 may also include other components (not explicitly shown), such as batteries, power controllers and other components that can be operated to provide various enhanced capabilities. In various embodiments, the controller 600 can be implemented in a desktop computer, a laptop computer, a tablet computer, a smart phone, a wearable computing device or other systems with any desired form factor. In addition, as described above, the controller 600 can be partially implemented in a base station and partially implemented in a mobile unit that communicates with the base station and provides a user interface.
[0079] The storage device 612 may be implemented, for example, using a disk, a flash memory, or any other non-transitory storage medium or combination of media, and may include volatile and / or non-volatile media. In some embodiments, the storage device 612 may store one or more applications and / or operating system programs to be executed by the processing subsystem 610, including programs for implementing any or all operations performed by the controller described herein. For example, the storage device 612 may store a unified controller application that reads an accessory definition record and generates a graphical user interface for controlling the accessory based on the information therein. In some embodiments, some (or all) of the controller functions described herein may be implemented in an operating system program rather than an application. In some embodiments, the storage device 612 may also store applications designed for specific accessories or specific categories of accessories (e.g., an IP camera application for managing IP camera accessories or a security application for interacting with door lock accessories).
[0080] The user interface 614 may include input devices such as a touch pad, a touch screen, a scroll wheel, a click wheel, a dial, a button, a switch, a keypad, a microphone, etc.; and output devices such as a video screen, indicator lights, speakers, a headphone jack, etc., together with supporting electronic components (e.g., digital-to-analog converters or analog-to-digital converters, signal processors, etc.). The user can operate the input devices of the user interface 614 to invoke functions of the controller 600, and can view and / or listen to outputs from the controller 600 via the output devices of the user interface 614.
[0081] The processing subsystem 610 can be implemented as one or more integrated circuits, such as one or more single-core or multi-core microprocessors or microcontrollers, examples of which are known in the art. In operation, the processing system 610 can control the operation of the controller 600. In various embodiments, the processing subsystem 610 can execute various programs in response to program code, and can maintain multiple programs or processes that are executed simultaneously. At any given time, some or all of the program code to be executed may reside in the processing subsystem 610 and / or a storage medium such as a storage device 612.
[0082] Through appropriate programming, the processing subsystem 610 can provide various functions for the controller 600. For example, in some embodiments, the processing subsystem 610 can implement various processes (or portions thereof) described above as implemented by the controller. The processing subsystem 610 can also execute other programs (including programs that can be stored in the storage device 612) to control other functions of the controller 600. In some embodiments, these programs can interact with the accessory, for example, by generating messages to be sent to the accessory and / or by receiving messages from the accessory. Such messages can conform to the accessory communication control protocol as described above.
[0083] The communication interface 616 may provide voice and / or data communication capabilities for the controller 600. In some embodiments, the communication interface 616 may include: a radio frequency (RF) transceiver component for accessing a wireless voice and / or data network (e.g., using cellular phone technology, data network technology such as 4G, 5G / LTE, Wi-Fi (IEEE902.11 series standards) or other mobile communication technology, or any combination thereof), a component for short-range wireless communication (e.g., using Bluetooth standard and / or Bluetooth LE standard, NFC, etc.) and / or other components. In some embodiments, in addition to or instead of a wireless interface, the communication interface 616 may provide wired network connectivity (e.g., Ethernet). The communication interface 616 may be implemented using a combination of hardware components (e.g., drive circuits, antennas, modulators / demodulators, encoders / decoders, and other analog signal processing circuits and / or digital signal processing circuits) and software components. In some embodiments, the communication interface 616 may support multiple communication channels simultaneously using the same transmission means or different transmission means.
[0084] The secure storage module 618 may be an integrated circuit or the like that may securely store cryptographic information for the controller 600. Examples of information that may be stored within the secure storage module 618 include the controller's long-term public and private keys 622 (LTPKC, LTSKC as described above) and a list of accessories (e.g., a lookup table that maps accessory IDs to accessory long-term public keys LTPKA of accessories that have completed the pairing setup or pairing add process as described above). The lookup table may also be configured to map MAC addresses using randomly generated device IDs. The device ID may be rolled (e.g., changed to a new device ID) at random time intervals to avoid third-party detection of device IDs or detection of homes based on a list of detected IDs. The lookup table may also be configured to map each accessory using a counter, a securely generated key, and a list of instance IDs that identify which features of the accessory the controller wishes to track (e.g., listing which features of the controller are to be updated).
[0085] In some embodiments, cryptographic operations may be implemented in a cryptographic logic module 620 that communicates with the secure storage module 618. Physically, the cryptographic logic module 620 may be implemented in the same integrated circuit with the secure storage module 618 or in a different integrated circuit (e.g., a processor in the processing subsystem 610), as desired. The cryptographic logic module 620 may include various logic circuits (fixed or programmable, as desired) that implement or support the cryptographic operations of the controller 600 (including any or all of the cryptographic operations described above). The secure storage module 618 and / or the cryptographic logic module 620 may appear as a "black box" to the rest of the controller 600. Thus, for example, the communication interface 616 may receive a message in encrypted form that it cannot decrypt, and may simply pass the message to the processing subsystem 610. The processing subsystem 610 may also not be able to decrypt the message, but it may recognize the message as encrypted and pass it to the cryptographic logic module 620. The cryptographic logic module 620 may decrypt the message (e.g., using information extracted from the secure storage module 618) and determine which information to return to the processing subsystem 610. Therefore, certain information may only be available within secure storage module 618 and cryptographic logic module 620. If secure storage module 618 and cryptographic logic module 620 are implemented on a single integrated circuit that only executes code from an internal secure repository, this may make information extraction very difficult, thereby providing a high degree of security. Other specific implementations are also possible.
[0086] Figure 7 700 according to an embodiment of the present disclosure. The accessory 700 may implement any or all of the accessory functions, behaviors, and capabilities described herein, as well as other functions, behaviors, and capabilities not explicitly described. The accessory 700 may include a storage device 728, a processing subsystem 730, a user interface 732, accessory-specific hardware 734, a communication interface 736, a security element 738, and a cryptographic logic module 740. The accessory 700 may also include other components (not explicitly shown), such as a battery, a power controller, and other components operable to provide various enhanced capabilities.
[0087] Accessory 700 represents a device that can be controlled by a controller such as Figure 6 The various accessories may include: Figure 7Components not explicitly shown in the drawings include, but are not limited to: storage devices with fixed or removable storage media (disks, flash memory, etc.); video screens, speakers, or ports for connecting to external audio / video devices; camera components, such as lenses, image sensors, and controls for camera components (e.g., aperture, zoom, exposure time, frame rate, etc.); microphones for recording audio (alone or in combination with video recording); switches or buttons for receiving input (e.g., to activate other accessories or otherwise provide instructions to other accessories), sensors for detecting conditions (e.g., temperature sensors for thermostats, contact sensors for doors or windows, etc.), etc.
[0088] The storage device 728 may be implemented, for example, using a disk, a flash memory, or any other non-transitory storage medium or a combination of media, and may include volatile and / or non-volatile media. In some embodiments, the storage device 728 may store one or more programs to be executed by the processing subsystem 730 and operations related to specific annex behaviors, wherein the one or more programs include programs for implementing the various operations described above as being executed by the annex. The storage device 728 may also store an annex object or an annex definition record (e.g., as described above), which may be provided to the controller device, for example, as described above. The storage device 728 may also store annex state information and any other data that may be used during the operation of the annex 700.
[0089] Processing subsystem 730 may include, for example, one or more single-core or multi-core microprocessors and / or microcontrollers that execute program code to perform various functions associated with accessory 700. For example, processing subsystem 730 may implement any or all of the operations described herein as being implemented by the accessory, such as by executing program code stored in storage device 728. Processing subsystem 730 may also execute other programs to control other functions of accessory 730. In some cases, the programs executed by processing subsystem 730 may interact with a controller (e.g., controller 600), such as by generating messages to be sent to the controller (e.g., broadcast notifications) and / or receiving messages from the controller. Such messages may conform to the accessory communication control protocol described above.
[0090] User interface 732 can include user-operable input devices such as a touchpad, touch screen, scroll wheel, click wheel, dial, button, switch, keypad, microphone, etc.; and output devices such as a video screen, indicator lights, speakers, headphone jack, etc., along with supporting electronic components (e.g., digital-to-analog converters or analog-to-digital converters, signal processors, etc.). Depending on the specific implementation of a particular accessory 700, a user can operate the input devices of user interface 732 to invoke functions of accessory 700, and can view and / or hear output from accessory 700 via the output devices of user interface 734. Some accessories may provide minimal or no user interface.
[0091] Accessory-specific hardware 734 can include any other components that may be present in accessory 700 to enable or support its functionality. For example, in various embodiments, accessory-specific hardware 734 can include one or more storage devices using fixed or removable storage media; a GPS receiver; a power source and / or power management circuitry; a camera; a microphone; one or more actuators; an environmental sensor (e.g., a temperature sensor, a pressure sensor, an accelerometer, a chemical sensor, etc.); and the like. It should be appreciated that any type of accessory functionality can be supported by providing appropriate accessory-specific hardware 734.
[0092] The communication interface 736 may provide voice and / or data communication capabilities for the accessory 700. In some embodiments, the communication interface 736 may include: a radio frequency (RF) transceiver component for accessing a wireless voice and / or data network (e.g., using cellular phone technology, data network technology such as 4G, 5G / LTE, Wi-Fi (IEEE 902.11 series standards) or other mobile communication technology, or any combination thereof), a component for short-range wireless communication (e.g., using the Bluetooth standard and / or Bluetooth LE standard, NFC, etc.), and / or other components. In some embodiments, in addition to or in place of a wireless interface, the communication interface 736 may provide wired network connectivity (e.g., Ethernet). The communication interface 736 may be implemented using a combination of hardware components (e.g., drive circuits, antennas, modulators / demodulators, encoders / decoders, and other analog signal processing circuits and / or digital signal processing circuits) and software components. In some embodiments, the communication interface 736 may support multiple communication channels simultaneously using the same transmission means or different transmission means.
[0093] Secure storage module 738 can be an integrated circuit or the like that can securely store cryptographic information for accessory 700. Examples of information that can be stored within secure storage module 738 include the accessory's long-term public and private keys 742 (LTPKA, LTSKA as described above) and a list of registered controllers 744 (e.g., a lookup table that maps controller IDs to controller long-term public keys LTPKC of controllers that have completed the pairing setup or pairing add process as described above).
[0094] In some embodiments, cryptographic operations may be implemented in a cryptographic logic module 740 that communicates with the secure storage module 738. Physically, the cryptographic logic module 740 may be implemented in the same integrated circuit or a different integrated circuit (e.g., a processor in the processing subsystem 730) with the secure storage module 738 as desired. The cryptographic logic module 740 may include various logic circuits (fixed or programmable as desired) that implement or support the cryptographic operations of the accessory 700, including any or all of the cryptographic operations described above. The secure storage module 738 and / or the cryptographic logic module 740 may appear as a "black box" to the rest of the accessory 700. Thus, for example, the communication interface 736 may receive a message in encrypted form that it cannot decrypt, and may simply deliver the message to the processing subsystem 730. The processing subsystem 730 may also be unable to decrypt the message, but it may recognize the message as encrypted and deliver it to the cryptographic logic module 740. The cryptographic logic module 740 may decrypt the message (e.g., using information extracted from the secure storage module 738) and determine which information to return to the processing subsystem 730. Therefore, certain information may only be available within secure storage module 738 and cryptographic logic module 740. If secure storage module 738 and cryptographic logic module 740 are implemented on a single integrated circuit that only executes code from an internal secure repository, this may make information extraction very difficult, thereby providing a high degree of security. Other specific implementations are also possible.
[0095] The accessory 700 may be a controller such as Figure 6 Any electronic device that can interact with the controller 600 of the accessory 700. In some embodiments, the controller 600 can provide remote control through the operation of the accessory 700 as described above. For example, the controller 600 can provide a remote user interface for the accessory 700, which can include both input controls and output controls (e.g., a display screen for displaying current status information obtained from the accessory 700 and input controls such as a touch screen overlay for allowing changes in status information). In various embodiments, the controller 600 can control any function of the accessory 700 and can also receive data from the accessory 700.
[0096] Figure 8An example of an accessory architecture of an accessory 800 according to an embodiment of the present disclosure is shown. The accessory architecture is shown as a set of interactive subsystems, each of which includes one or more modules. It should be understood that each module can be implemented using program code executed on one or more programmable processors and / or one or more fixed-function processors, and the processor may include output signaling for controlling other hardware devices (e.g., actuators, displays, etc.) and / or input signaling for receiving signals from other hardware devices (e.g., keyboards; touch screens; feedback or status signals from actuators, motors, or sensors, etc.). Some subsystems may include permanent data storage devices, which may be implemented using any type of non-volatile storage device (e.g., semiconductor flash memory, EEPROM, magnetic disk or optical disk, etc.). Although not shown, some or all of the subsystems may include additional hardware elements, such as displays, keyboards, touch screens, microphones, speakers, motors, actuators, sensors, etc.
[0097] The security subsystem 802 may include a secure storage element 804, a broadcast notification module 806, and a cryptographic logic module 814. The secure storage element 804 may be used with Figure 7 The secure storage element 738 or other secure storage elements described above are similar or identical. In some embodiments, the secure storage element 804 is used to securely store the long-term public key / key pair of the accessory 800 (e.g., LTPKA, LTSKA as described above) and the pairing record of each controller with which the accessory 800 is paired. In embodiments where the accessory 800 uses different long-term public keys in conjunction with different controllers, each pairing record may also include an indicator of the long-term public key to be used with the paired controller. Other information may be included if desired.
[0098] The broadcast notification module 806 can implement the attachment portion of the attachment communication control protocol described herein. In some examples, the broadcast notification module 806 can generate a broadcast notification in conjunction with the cryptographic logic 814, which can be sent to the controller to implement a secure broadcast session. In some examples, the broadcast notification module 806 is configured to provide a payload to the cryptographic logic module 814 and then encapsulate the encrypted payload into the broadcast notification before transmitting the encrypted payload to the controller. Additionally, in some examples, the broadcast notification module 806 is configured to generate a heartbeat.
[0099] From a security / privacy perspective, heartbeats are useful because they can randomly generate data that can be transmitted to the controller at random times. In some cases, a malicious third party may try to detect which devices are in the home. Therefore, even if the third party cannot access the data in the message, knowing what messages are being sent between devices in the home is a security risk. Malicious third parties can use the message itself to help tell them which devices exist, what operations these devices perform, and how to deceive these devices. By having the accessory provide a random heartbeat to the controller, this may confuse third parties and potentially prevent malicious attempts. Therefore, one function of the broadcast notification module 806 is to generate random heartbeat messages and send these messages at random times. Therefore, some broadcast notifications will contain encrypted payloads, while other broadcast notifications will contain heartbeats (e.g., empty payloads, or payloads with data that is meaningless to the controller). In some cases, the payload of the heartbeat may include information that identifies the broadcast notification as a heartbeat rather than a status update. The payload of the heartbeat may also indicate that the accessory still exists (e.g., the battery still has enough power to send the broadcast notification). The payload of the heartbeat may also be encrypted using a specific instance ID that identifies the heartbeat (eg, there may be an IID for the heartbeat that, when decrypted, indicates to the controller that the payload is for a heartbeat).
[0100] Heartbeats are also useful for low-power accessories. For example, some accessories may only run on button batteries (or other low-power batteries). The battery capacity of these accessories is limited, so broadcast notifications should not be reported too frequently. In addition, some of these low-power accessories are configured like this because these accessories do not need to report changes frequently (e.g., they sense things that do not happen often in nature). For example, a switch (e.g., a contact sensor) may only need to report when the user activates the switch. For some uses, the user may not access the switch frequently (e.g., once a day or twice a day, or even less). In some cases, low-power accessories may be configured to provide broadcast notifications without payloads (e.g., heartbeats) regularly (e.g., every two hours). The broadcast notification lets the controller know that the battery of the accessory is still running. In this way, the controller can let the user know when the battery is exhausted (e.g., if more than two hours have passed since the last broadcast notification (whether the broadcast notification includes a status update or a heartbeat)). However, as noted, the broadcast notification module 806 can also be configured to provide random heartbeats faster than scheduled heartbeats (e.g., in order to increase the security / privacy of the system).
[0101] Cryptographic logic module 814 can implement cryptographic algorithms that can be used by accessory 800. Examples include: key generation algorithms; algorithms and functions used in SRP; hash algorithms, such as HKDF-SHA-512; key-based encryption / decryption algorithms, such as ChaCha20-Poly1305, Curve25519, Ed25519, and / or other algorithms. In some embodiments, cryptographic logic module 814 can provide an API (application programming interface) that can be used by other modules of accessory 800 to call cryptographic algorithms and related services. Any number of cryptographic algorithms and related services and combinations thereof can be supported.
[0102] The accessory action subsystem 830 can manage various operations of hardware and / or software components of the accessory 800, for example, in response to requests received from the controller via the controller interaction subsystem 850. For example, the accessory 800 can incorporate (or communicate with) various operating components 832 that can take specific actions (e.g., open or close a door, operate a camera, etc.). The operating components 832 can include hardware and / or software components, and a given operating component 832 can respond to received control signals (e.g., electrical signals in digital or analog form) from the effector module 834 and / or generate feedback signals (e.g., electrical signals in digital or analog form) to the feedback module 836.
[0103] The effector module 834 may generate a control signal to the operating component 832, for example, to implement or perform an operation requested by a user. The specific signal may depend on the specific operating component 832 being addressed. By way of example, the operating component 832 may include a switch circuit that can turn on or off a power source, and the effector module 832 may generate a signal to the switch circuit to turn on or off the power source. For another example, the operating component 832 may include an electromechanical actuator that can generate a movement of a physical object (e.g., latching or unlocking a bolt, opening or closing a door) in response to an electrical control signal, and the effector module 832 may generate a signal to the actuator. For another example, the operating component 832 may include an API for controlling a digital camera (depending on the specific implementation, the camera itself may or may not be an operating component), and the effector module 832 may call an API call to control the digital camera. In various embodiments, the effector module 834 may operate in response to a request received from a controller via the controller interface subsystem 850 and / or an input received at the user interface of the accessory 800.
[0104] The feedback module 836 may receive feedback signals from the operating component 832. The specific signal may depend on the specific operating component 832. For example, a switch circuit may provide a feedback signal indicating the current state of the switch. An electromechanical actuator may provide a feedback signal indicating the current state (e.g., the position and / or movement of a physical object). The API may (e.g., when returning from an API call) provide an error code or a status code. As another example, the operating component 832 may include one or more sensors for various environmental conditions (e.g., motion sensors, position sensors, temperature sensors, obstacle sensors, etc.), and the feedback module 836 may receive sensor data signals from these sensors. In some embodiments, the feedback module 836 may provide feedback information to the controller interaction subsystem 850 based on the received feedback signal.
[0105] The controller interaction subsystem 850 can support the interaction between the accessory 800 and the controller. The accessory object storage element 852 can be implemented using a volatile storage medium or a non-volatile storage medium (e.g., a semiconductor flash memory, an EEPROM, a DRAM, an SRAM, a magnetic disk or an optical disk, etc.). In some embodiments, the accessory object storage element 852 can be used to store representations of one or more accessory objects that can be used by the controller to interact with the accessory 800. The stored accessory objects can be provided to the controller upon request (e.g., during registration or after performing a pairing verification process with the controller), and the stored accessory objects can be updated as the state of the accessory changes. For example, the feedback module 836 can update the stored accessory objects based on the feedback signal received from the operating component 832.
[0106] Discovery module 854 can perform operations related to making accessory 800 discoverable to a controller, such as broadcasting broadcast notifications and / or announcements, receiving a request to perform pairing setup from a controller with which pairing has not yet been established, and the like.
[0107] The request processing module 856 can receive and process request messages from the controller. For example, in response to a received request message (e.g., for writing a lock state feature as described above), the request processing module 856 can determine whether the request is allowed (e.g., whether the controller has a pairing verification state, whether the message is encrypted using a valid session key, and whether the controller has permission to perform the requested action). Assuming that the request is valid, the request processing module 856 can generate instructions to the effector module 834 (e.g., to actuate the locking mechanism). In some embodiments, determining whether to allow the request may include decrypting the message, and the request processing module 856 can call functions supported by the cryptographic logic module 814 in conjunction with processing the request. In some embodiments, the request processing module 856 can interact with the security subsystem 802 to receive and process requests received from the controller during pairing setup, pairing verification, pairing addition, or pairing removal operations.
[0108] The response generation module 858 may generate and send a response to the request message and send the response message to the controller. For example, if the request processing module 856 receives a request and determines that the request is not allowed, the request processing module 856 may notify the response generation module 9758 accordingly, and the response generation module 858 may generate an error response. On the other hand, if the request processing module 856 receives a request and determines that the request is allowed, the request processing module 856 may notify the response generation module 858 that the allowed request has been received and the request is being processed by the effector module 834. In some embodiments, the response module 858 may wait to receive feedback information from the feedback module 836 and then generate a response message incorporating the feedback information. For example, if the response generation module 858 receives a request to read a sensor or open a lock, the response generation module 858 may wait to receive a confirmation of the sensor reading or the lock opening from the feedback module 836 and then generate an appropriate response message. In some embodiments, the response message may be encrypted before being sent, and the response generation module 858 may call a function supported by the cryptographic logic module 814 in conjunction with encrypting the message. In some embodiments, the response generation module 858 can interact with the security subsystem 802 to generate a response during a pairing setup, pairing verification, pairing addition, or pairing removal operation and send the response to the controller.
[0109] The notification generation module 860 may receive information from the feedback module 836 (e.g., whenever the attachment object stored in the attachment object storage element 852 is updated), and may generate a notification message to the controller based on the information. As described above, various notification mechanisms may be supported, and the notification generation module 860 may support any one or all of these notification mechanisms. For example, in the case of passive notification, the notification processing module 860 may simply update the internal state counter maintained in the attachment object storage element 852. In the case of broadcast notification and / or notification notification, the notification generation module 860 may update the state counter and instruct the discovery module 854 to generate a broadcast notification or notification including the updated state counter value. In the case of event notification, the notification module 860 may instruct the response generation module 858 to generate an unsolicited response (e.g., EVENT message as described above) to be sent to the subscription controller as described above. In some embodiments, the notification module 860 may maintain a list of subscription controllers for various notification mechanisms and / or various features, and may initiate one or more mechanisms according to whether any controller has been subscribed. In some embodiments, subscription information may be maintained in the attachment object storage element 852.
[0110] The communication interface module 870 can provide services to support communication with other devices (including controllers). In some embodiments, the communication interface module 870 can implement a Bluetooth LE protocol stack 872 and / or an HTTP / IP protocol stack 874. The Bluetooth LE protocol stack 872 can provide formatting of output messages and interpretation of received messages according to the Bluetooth LE transmission protocol. The HTTP / IP protocol stack 874 can provide formatting of output messages and interpretation of received messages according to HTTP and IP transmission protocols. Although Bluetooth LE and HTTP / IP are used as examples, it should be understood that any combination of transmission protocols can be supported within the communication interface module 870, and a given instance of a controller can support one or more transmission protocols. As described above, the annex 800 can act as a server device in a client / server model of device interaction, and the Bluetooth LE protocol stack 872 and / or the HTTP / IP protocol stack 874 can be configured to support server behavior.
[0111] In some embodiments, the protocol stack within the communication interface module 870 may be modified to generate certain non-standard messages. For example, as described above, the HTTP / IP protocol stack 874 may be configured to generate unsolicited "event" messages from attachments.
[0112] In some embodiments, communication interface module 870 can provide an API that can be used by other modules to send and / or receive messages to external devices. The API can be designed to be transport agnostic, and the transport of a particular message can be selected within communication interface module 870, which is transparent to other modules within accessory 800. Messages received at the communication port of accessory 800 can be sent to Bluetooth LE stack 872 or HTTP / IP stack 874 based on the port configuration, and each of Bluetooth LE stack 872 and HTTP / IP stack 874 can send outgoing messages to the appropriately configured communication port.
[0113] Fig. 9 An example of a controller architecture of a controller 900 according to an embodiment of the present disclosure is shown. The controller architecture is shown as a set of interactive subsystems, each of which includes one or more modules. It should be understood that each module can be implemented using program code executed on one or more programmable processors and / or one or more fixed-function processors, and the processor may include output signaling for controlling other hardware devices (e.g., actuators, displays, etc.) and / or input signaling for receiving signals from other hardware devices (e.g., keyboards; touch screens; feedback or status signals from actuators, motors, or sensors, etc.). Some subsystems may include permanent data storage devices, which may be implemented using any type of non-volatile storage device (e.g., semiconductor flash memory, EEPROM, magnetic disks or optical disks, etc.). Although not shown, some or all of the subsystems may include additional hardware elements, such as displays, keyboards, touch screens, microphones, speakers, sensors, etc.
[0114] The security subsystem 902 may include a secure storage element 904, a registration module 906, an ID sharing module 908, a lost update module 910, and a cryptographic logic module 914. The secure storage element 904 may be connected to Figure 6The secure storage element 618 or other secure storage elements described above are similar or identical. In some embodiments, the secure storage element 904 is used to securely store key information, including a mapping that identifies which keys have been generated for which accessories. In addition, the secure storage element 904 can store the long-term public key / key pair of the controller 900 (e.g., LTPKC, LTSKC as described above) and the pairing record of each accessory, wherein the controller 900 establishes a pairing with each accessory. As described above, each pairing record may include an identifier of the paired accessory, a long-term public key of the paired accessory, and optionally other information such as the permission settings for the controller 900 to interact with the paired accessory (e.g., whether the controller 900 has administrator privileges). In an embodiment in which the controller 900 uses different long-term public keys in conjunction with different accessories, each pairing record may also include an indicator of the long-term public key to be used with the paired accessory. If necessary, other information may be included.
[0115] The registration module 906 can implement some controller parts of the accessory communication control protocol described herein. In some embodiments, the registration module 906 is configured to register with the accessory by providing information that enables a secure broadcast session. Such information includes a list of instance IDs corresponding to the features of the accessory, and the controller 900 is requesting status updates to these features. The list of instance IDs may also include timing information (e.g., the frequency at which the accessory should report each feature) and automation information that identifies whether the feature is associated with automation (e.g., whether the controller 900 is programmed to indicate another device based on the state or updates about the accessory). The registration module 906 may also provide a device ID for each accessory. In some embodiments, the device ID will be randomly generated and stored in the secure storage device 904. In addition, as a security / privacy feature, the device ID may be changed periodically (e.g., at least in part based on a schedule) or randomly. Randomly changing the device ID can help prevent malicious third parties from identifying how many devices and / or which devices are in the home. In other examples, whenever a new key is generated and / or if malicious activity is detected or suspected, the device ID may be rolled (e.g., changed). For example, a malicious attack pattern may be detected or predicted, and such detection or prediction may trigger a device ID update.
[0116] The key / ID sharing module 908 can implement some controller parts of the accessory communication control protocol described herein. In some embodiments, the key / ID sharing module 908 is configured to implement a scheme for sharing device IDs and corresponding keys with other devices (e.g., other accessories on the network or within range). This scheme is useful when the controller 900 is configured as a hub or base station. In this scenario, the key / ID sharing module 908 can transmit the accessory device ID and the associated encryption key to all other devices in the home. In some examples, the shared information can be provided to a server (e.g., a cloud service provider) that can update each device on the home network, or the key / ID sharing module 908 can directly transmit information (e.g., using a local area network (LAN), short-range communication for devices within the proximity range, and / or relays from other devices on the network). In any case, once the information (e.g., device ID and / or key) is shared with all devices, the input broadcast notification can also be shared. Using this key and device-specific counters (e.g., counters for each device on the network must be maintained by every other device on the network), all devices receiving the relayed broadcast notification will be able to decrypt the payload, update records about the state of the changed device (e.g., the accessory that sent the initial broadcast notification), and increment the device-specific counters for the changed device. Sharing the key / ID information by the key / ID sharing module 908 also enables other accessories that may be closer to the changed device (e.g., if the changed device moves out of range of the controller 900) to relay the broadcast notification to the controller 900 and / or decrypt the payload of the broadcast notification and transmit status updates to the controller 900.
[0117] The lost update module 910 can implement some controller parts of the attachment communication control protocol described herein. In some embodiments, the broadcast notification may be lost (or deceived / played back by a malicious third party). When the encrypted payload cannot be decrypted with the stored counter associated with the attachment (e.g., the attachment that initiated the broadcast notification), the lost (or false) broadcast notification can be identified. Once this point is identified, the lost update module 910 can be configured to synchronize the controller 900 and the originating attachment again. In order to do this, the lost update module 910 is configured to increment the counter and retry to decrypt the payload of the received broadcast notification. If this does not work, the lost update module 910 will continue to increment the counter and try to decrypt the payload in each round. This may occur in some specific number of attempts (e.g., five increments) or until the device is synchronized. Once the counter is synchronized, the lost update module 910 will be able to tell how many updates are lost. Using this information, the lost update module 910 can establish a secure session (e.g., a pairing verification session as described above) with the attachment and request a log of the lost status update. All appropriate automation, user notifications, and data table updates can be performed based at least in part on the log data, and then lost update module 910 can instruct controller 900 to revert to the standard accessory control protocol described herein. Additionally, in some examples, controller 900 will generate a new device ID and / or generate a new key for the accessory (and instruct the accessory to generate the same new key).
[0118] The cryptographic logic module 914 may implement cryptographic algorithms that may be used by the controller 900. Examples include: key generation algorithms; algorithms and functions used in SRP; hash algorithms, such as HKDF-SHA-512; key-based encryption / decryption algorithms, such as ChaCha20-Poly1305, Curve25519, Ed25519, and / or other algorithms. In some embodiments, the cryptographic logic module 914 may provide an API (application programming interface) that may be used by other modules of the controller 900 to call cryptographic algorithms and related services. Any number of cryptographic algorithms and related services and combinations thereof may be supported.
[0119] The user interaction subsystem 930 can manage the interaction with the user of the controller 900. For example, the user interface generation module 932 can generate a user interface to be presented to the user, for example, on a display device. The user interface may include control elements that can be operated by the user to interact with the attachment. For example, as described above, the controller 900 can present a graphical user interface based on the information provided in the attachment object. The user input receiver module 934 can receive input from the user interface and process the input to determine the action to be taken in response to the input (e.g., generate a message to be sent to the attachment). In some embodiments, the user input receiver module 934 can call the functions of other modules of the controller 900 in response to the user input.
[0120] The accessory interaction subsystem 950 can support interaction between the controller 900 and the accessory. The accessory object storage element 952 can be implemented using a volatile storage medium or a non-volatile storage medium (e.g., semiconductor flash memory, EEPROM, DRAM, SRAM, magnetic disk or optical disk, etc.). In some embodiments, the accessory object storage element 952 can be used to store a representation of each accessory for which the controller 900 has information. For example, as described above, during registration or after establishing a pairing with an accessory, a controller such as the controller 900 can obtain an accessory definition record from the accessory, which can include one or more accessory objects. The controller 900 can store the accessory objects thus obtained in the accessory object storage element 952. The stored accessory objects can be used in a variety of ways, including: generating a user interface (e.g., by the user interface generation module 932); interpreting user input (e.g., by the user input receiver module 934); generating a request for the accessory; and / or receiving a response or notification from the accessory.
[0121] The accessory discovery module 954 can perform operations related to discovering accessories, such as monitoring broadcasts, determining whether to pair with a discovered accessory, and the like.
[0122] The request generation module 956 may generate a request and send the request to the accessory. For example, in response to an instruction from the user input receiver module 934 (e.g., for unlocking a door), the request generation module 956 may generate an appropriate request message to the accessory (e.g., write a lock state feature as described above). Examples of request messages are described above. In some embodiments, generating the message may include encrypting the message, and the request generation module 956 may call a function supported by the cryptographic logic module 914 in conjunction with generating the request. In some embodiments, the request generation module 956 may interact with the security subsystem 902 to generate a request and send the request to the accessory during a pairing setup, pairing verification, pairing addition, or pairing removal operation.
[0123] The response processing module 958 can receive and process any response to the request message that can be received from the attachment. For example, after the request generation module 956 sends the request message (e.g., for writing the lock state feature as described above) to the attachment, the response processing module 958 can receive the response message from the attachment and can interpret the message. In some embodiments, the response message can be received in an encrypted form, and the response processing module 958 can be combined with the explanation of the response to call the function supported by the password logic module 914. The response processing module 958 can also provide information to the user interface subsystem 930 based on the response (e.g., status code, whether an error occurs, etc.), and the user interface subsystem 930 can generate feedback to the user based on the information. In some embodiments, the response processing module 958 can also update the attachment object storage element 952 based on the information included in the response message. In some embodiments, the response processing module 958 can interact with the security subsystem 902 to receive and process the response received from the attachment during the pairing setting, pairing verification, pairing addition or pairing removal operation.
[0124] The notification processing module 960 can receive and process the notification message that can be received from the attachment. As described above, various notification mechanisms can be supported, and the notification processing module 960 can support any one or all of these notification mechanisms. For example, in the case of passive notification, the notification processing module 960 can compare the state counter value reported by the attachment with the state counter value stored (for example, in the attachment object storage element 952) and can detect differences. In some embodiments, when a difference is detected, the notification processing module 960 can instruct the request generation module 956 to generate a request and send the request to the attachment to obtain additional state information (for example, an updated attachment definition record or part thereof). In the case of notification notification, the notification processing module 960 can process the notification received via the attachment discovery module 954 to detect known attachments with state changes (for example, based on the state counter of the attachment object stored in the attachment storage element 952). In the case of event notification, an unsolicited response message can be received by the response processing module 958, which can identify the message as an unsolicited response (for example, an EVENT message as described above), and can provide the message to the notification module 960 for further processing. Regardless of the particular notification mechanism, notification module 960 can determine the nature of the changed state information and provide appropriate information to user interaction subsystem 930. In some embodiments, notification module 960 can also update the attachment object stored in attachment object storage element 952.
[0125] The communication interface module 970 can provide services to support communication with other devices (including accessories). In some embodiments, the communication interface module 970 can implement a Bluetooth LE protocol stack 972 and / or an HTTP / IP protocol stack 974. The Bluetooth LE protocol stack 972 can provide formatting of output messages and interpretation of received messages according to the Bluetooth LE transmission protocol. The HTTP / IP protocol stack 974 can provide formatting of output messages and interpretation of received messages according to HTTP and IP transmission protocols. Although Bluetooth LE and HTTP / IP are used as examples, it should be understood that any combination of transmission protocols can be supported within the communication interface module 970, and a given instance of the controller 900 can support one or more transmission protocols. As described above, the controller 900 can act as a client device in a client / server model of device interaction, and the Bluetooth LE protocol stack 972 and / or the HTTP / IP protocol stack 974 can be configured to support client behavior.
[0126] In some embodiments, the protocol stack within the communication interface module 970 can be modified to recognize certain non-standard messages. For example, as described above, the HTTP / IP protocol stack 974 can be configured to recognize unsolicited "event" messages from attachments.
[0127] In some embodiments, the communication interface module 970 may provide an API that may be used by other modules to send and / or receive messages to external devices. The API may be designed to be transport agnostic, and the transport of a particular message may be selected within the communication interface module 970, which is transparent to other modules within the controller 900. Messages received at a communication port (not shown) of the controller 900 may be sent to the Bluetooth LE stack 972 or the HTTP / IP stack 974 based on the port configuration, and each of the Bluetooth LE stack 972 and the HTTP / IP stack 974 may send outgoing messages to the appropriately configured communication port.
[0128] It should be understood that the system configurations and components described herein are illustrative, and variations and modifications are possible. It should be understood that the specific implementation of controller 600 (controller 900) can perform any or all of the operations being performed by the controller, and the specific implementation of attachment 700 (attachment 800) can perform any or all of the operations being performed by the attachment; the use of different figure numbers in combination in different figures is not intended to imply other meanings. The controller and / or attachment may have other capabilities that are not explicitly described herein (e.g., mobile phones, global positioning systems (GPS), broadband data communications, Internet connections, etc.). Depending on the specific implementation, these devices can interoperate to provide any functionality supported by any (or both) devices or to provide functionality partially implemented in each device. In some embodiments, a specific attachment may have certain functions that cannot be accessed or called via a specific controller but can be accessed via another controller or by interacting directly with the attachment.
[0129] In addition, although controllers and accessories are described herein with reference to specific blocks, it should be understood that these blocks are defined for ease of description and are not intended to imply a specific physical arrangement of component parts. In addition, blocks do not necessarily correspond to physically different components. Blocks can be configured to perform various operations, such as by programming a processor or providing appropriate control circuits, and individual blocks may be reconfigurable or non-reconfigurable depending on how the initial configuration is obtained. Embodiments of the present disclosure may be implemented in various devices including electronic devices implemented using any combination of circuits and software.
[0130] In some embodiments, the attachment can notify any controller of changes in its state. For example, any combination of passive notification processes, broadcast notification processes, active notification processes, and / or event message notification processes can be supported. In some embodiments, a controller can send a request to the attachment to subscribe to a specific notification method (e.g., notification, active and / or event message) about a specific feature. The attachment can maintain subscription status information for various controllers and can generate notifications of specific types based on the current subscription status.
[0131] Other Implementations
[0132] Although the present disclosure has been described in conjunction with specific embodiments, those skilled in the art will recognize that many modifications are possible. A single controller can use the processes described herein to establish pairings with any number of accessories and selectively communicate with different accessories at different times. Similarly, a single accessory can be controlled by multiple controllers that have established pairings with it (e.g., using pairing settings and pairing additions as described above). Any function of an accessory can be controlled by modeling the function as a service with one or more characteristics and allowing the controller to interact with the service and / or its characteristics (e.g., read, modify, receive updates). Therefore, regardless of the accessory function or controller form factor or specific interface, the protocols and communication processes described herein can be "unified", meaning that they can be applied in any environment with one or more controllers and one or more accessories.
[0133] In addition, some of the examples above specifically refer to HTTP, which can be used on local and wide area networks that support standard Internet Protocol (IP) transport stacks (e.g., TCP / IP). However, other transport protocols may also be used. For example, the Bluetooth LE protocol stack includes a generic attribute (GATT) layer that allows one device to query and modify the attributes of another device. In some embodiments, instances of accessory features may be exposed to the controller as attributes based on the GATT model. Therefore, the controller may also use Bluetooth LE to query (e.g., read) and modify (e.g., write) accessory features. In some embodiments, a specific accessory may support either or both of IP and / or Bluetooth LE transport protocols, and the controller may interact with some accessories using IP and other accessories using Bluetooth LE based on the capabilities of the accessory and the preferences established by the controller.
[0134] Any combination of dedicated components and / or programmable processors and / or other programmable devices may be used to implement the various functions described herein, such as methods, apparatus, computer-readable media, etc. The various processes described herein may be implemented on the same processor or different processors in any combination. Where components are described as being configured to perform certain operations, such configurations may be implemented, for example, by designing electronic circuits to perform the operations, by programming programmable electronic circuits (such as microprocessors) to perform the operations, or any combination thereof. In addition, although the above embodiments may refer to specific hardware components and software components, it will be appreciated by those skilled in the art that different combinations of hardware components and / or software components may also be used, and specific operations described as being implemented in hardware may also be implemented in software, and vice versa.
[0135] Computer programs incorporating the various features described herein may be encoded and stored on a variety of computer-readable storage media; suitable media include disks or tapes, optical storage media such as compact disks (CDs) or DVDs (digital versatile disks), flash memory, and other non-transitory media. Computer-readable media encoded with program code may be packaged with a compatible electronic device, or the program code may be provided independently of the electronic device (e.g., via Internet download or as a separately packaged computer-readable storage medium).
[0136] Therefore, although the disclosure has been described with respect to particular embodiments, it should be understood that the disclosure is intended to cover all modifications and equivalents that come within the scope of the following claims.
Claims
1. A computer-readable storage medium having program instructions stored thereon, which, when executed by one or more processors of a computing device, cause the computing device to execute instructions comprising: transmitting information identifying characteristics of an accessory device to report status information about the accessory device; transmitting a device identifier to the accessory device; Maintain device counter values; receiving a broadcast notification from the accessory device, the broadcast notification including at least the device identifier, an accessory counter value, and the status information of the accessory device; decrypting the broadcast notification based at least in part on the device counter value; extracting the status information; as well as An operation is performed based at least in part on the state information.
2. The computer-readable storage medium of claim 1, wherein the broadcast notification is decrypted based also at least in part on a key.
3. The computer-readable storage medium of claim 2, wherein the key is shared with the accessory device.
4. The computer-readable storage medium of claim 2, wherein the instructions further comprise generating the key based at least in part on a hashing algorithm shared with the accessory device.
5. The computer-readable storage medium of claim 1, wherein the operations include directing control instructions to at least one second accessory device.
6. The computer-readable storage medium of claim 1, wherein the operation comprises incrementing the device counter value.
7. The computer-readable storage medium of claim 1, wherein the instructions further comprise confirming the accuracy of the broadcast notification based at least in part on the device identifier.
8. The computer-readable storage medium of claim 1, wherein the instructions further comprise generating the device identifier.
9. The computer-readable storage medium of claim 8, wherein the device identifier is randomly generated.
10. The computer-readable storage medium of claim 1, wherein the instructions further comprise: Detect replay attacks; Generate a new device key; as well as The accessory device is instructed to generate a new accessory key.
11. The computer-readable storage medium of claim 10, wherein the replay attack is detected based at least in part on determining that the attachment counter value received in the broadcast notification corresponds to a previous device counter value.
12. The computer-readable storage medium of claim 1, wherein the instructions further comprise storing an association between the device identifier and an accessory identifier corresponding to the accessory device.
13. The computer-readable storage medium of claim 12, wherein the accessory identifier comprises a media access control (MAC) address of the accessory device.
14. The computer-readable storage medium of claim 1, wherein the instructions further comprise authenticating the broadcast notification prior to extracting the status information.
15. The computer-readable storage medium of claim 14, wherein the broadcast notification further comprises an attachment authentication tag, and wherein authenticating the broadcast notification comprises: Generate device authentication labels; comparing the device authentication label to the accessory authentication label; as well as The broadcast notification is confirmed to have not been altered based at least in part on the device authentication tag matching the accessory authentication tag.
16. The computer-readable storage medium of claim 15, wherein the device authentication tag is generated using a hash shared with the accessory device.
17. The computer-readable storage medium of claim 1, wherein the instructions further comprise transmitting a confirmation of receipt to the accessory device in response to at least receiving the broadcast notification.
18. A method comprising: transmitting, by the computing device, information identifying characteristics of the accessory device to report status information about the accessory device; transmitting, by the computing device, a device identifier to the accessory device; maintaining, by the computing device, a device counter value; receiving a broadcast notification from the accessory device, the broadcast notification including at least the device identifier, an accessory counter value, and the status information of the accessory device; decrypting, by the computing device, the broadcast notification based at least in part on the device counter value; extracting, by the computing device, the state information; as well as An operation is performed by the computing device based at least in part on the state information.
19. The method of claim 18, wherein the broadcast notification is decrypted based also at least in part on a key.
20. The method of claim 19, wherein the key is shared with the accessory device.
21. The method of claim 19, further comprising generating the key based at least in part on a hashing algorithm shared with the accessory device.
22. A computing device comprising: a memory configured to store computer-executable instructions; as well as one or more processors coupled to a memory device and configured to execute the computer-executable instructions to at least: transmitting information identifying characteristics of an accessory device to report status information about the accessory device; transmitting a device identifier to the accessory device; Maintain device counter values; receiving a broadcast notification from the accessory device, the broadcast notification including at least the device identifier, an accessory counter value, and the status information of the accessory device; decrypting the broadcast notification based at least in part on the device counter value; extracting the status information; as well as An operation is performed based at least in part on the state information.
