# Patent

## Title
Communicating arbitrary attributes using a predefined characteristic

## Abstract

An electronic device that communicates input messages and output messages with another electronic device using a Bluetooth Low Energy communication protocol is described. In particular, the electronic device receives input messages using a predefined characteristic to convey input information associated with a set of input attribute types. A given input message includes one or more input-command characters specifying a given input attribute type in the set of input attribute types and, optionally, an input delimiter and an input value in an input argument associated with the given input attribute type. Moreover, the electronic device provides output messages using the predefined characteristic to convey output information associated with a set of output attribute types. A given output message includes one or more output-command characters specifying a given output attribute type in the set of output attribute types. In this way, the predefined characteristic can be repurposed to convey other attribute types.

## Background
BACKGROUND
1. Field
The described embodiments relate to techniques for communicating information in a wireless network. In particular, the described embodiments relate to techniques for communicating an arbitrary attribute type using a predefined characteristic having a numerical identifier.
2. Related Art
Wireless communication is an increasingly popular technology for communicating information between electronic devices. In particular, these electronic devices may include networking subsystem that implement a network interface for a wireless local area network such as: a wireless network described in the Institute of Electrical and Electronics Engineers (IEEE) 802.11 standard, Bluetooth® (from the Bluetooth Special Interest Group of Kirkland, Wash.), and/or another type of wireless network.
However, while these specifications facilitate communication between electronic devices, they are often inflexible. This can make it difficult for electronic devices to communicate with each other.
Using Bluetooth Low Energy as an illustration, characteristics (which are sometimes referred to as ‘attribute types’) can be defined to allow associated logical values to be communicated between electronic devices. Thus, a heart-rate monitor may have predefined characteristics for the heart rate of a user or the remaining battery life. When one of these predefined characteristics is invoked in message received by the heart-rate monitor, the heart-rate monitor may return a corresponding message with a current value of the heart rate or the remaining battery life. However, if the desired attributes types are not known in advance, it can be difficult to use characteristics to communicate information between electronic devices. This inflexibility may make it difficult for users to perform basic tasks, which may reduce user satisfaction.
SUMMARY
The described embodiments relate to an electronic device. This electronic device includes: an antenna; and an interface circuit, coupled to the antenna, which communicates with another electronic device using a Bluetooth Low Energy (BTLE) communication protocol. During operation the electronic device receives input messages using a predefined characteristic having a numerical identifier to convey input information associated with a set of input attribute types. A given input message includes one or more input-command characters specifying a given input attribute type in the set of input attribute types and, when the given input message includes an input value in an input argument associated with the given input attribute type, the given input message includes an input delimiter between the one or more input-command characters and the input argument. Moreover, the electronic device provides output messages using the predefined characteristic to convey output information associated with a set of output attribute types. A given output message includes one or more output-command characters specifying a given output attribute type in the set of output attribute types and, when the given output message includes an output value in an output argument associated with the given output attribute type, the given output message includes an output delimiter between the one or more output-command characters and the output argument.
Note that the input delimiter may include: a tab, and an ASCII delimiter. Moreover, the input delimiter may include an invalid character for a Service Set Identifier. Furthermore, the output delimiter may include a space or a comma.
Additionally, a maximum length of the given output message may be less than a maximum length of the given input message. For example, the maximum length of the given output message may be less than or equal to 22 characters, while the maximum length of the given input message may be much larger.
In some embodiments, when the electronic device receives an input message with an information request, the electronic device asynchronously provides one or more output messages with the requested information. In particular, the one or more output messages may be provided over time without the electronic device receiving further input messages related to the information request from the other electronic device.
Moreover, when the electronic device receives an input message with an information request and the requested information exceeds a maximum length of the given output message, the electronic device may provide the requested information in a set of output messages. A first output message in the set of output messages may specify a number of output messages in the set of output messages. Furthermore, output messages between the first output message and a final output message in the set of output messages may specify its position in the set of output messages and may include a portion of the requested information. Additionally, the final output message in the set of output messages may indicate that the set of output messages is complete.
Another embodiment provides a computer-program product for use in conjunction with the electronic device. This computer-program product may include instructions for at least some of the aforementioned operations performed by the electronic device.
Another embodiment provides a method for communicating the input messages and the output messages with the other electronic device using the BTLE communication protocol. This method may include at least some of the aforementioned operations performed by the electronic device.
The preceding summary is provided as an overview of some exemplary embodiments and to provide a basic understanding of aspects of the subject matter described herein. Accordingly, the above-described features are merely examples and should not be construed as narrowing the scope or spirit of the subject matter described herein in any way. Other features, aspects, and advantages of the subject matter described herein will become apparent from the following Detailed Description, Figures, and Claims.



BRIEF DESCRIPTION OF THE FIGURES
FIG. 1 is a block diagram illustrating electronic devices communicating in accordance with an embodiment of the present disclosure.
FIG. 2 is a flow diagram illustrating a method for communicating input messages and output messages among at least some of the electronic devices of FIG. 1 using a Bluetooth Low Energy (BTLE) communication protocol in accordance with an embodiment of the present disclosure.
FIG. 3 is a block diagram illustrating an input message associated with a predefined characteristic and an output message associated with the predefined characteristic communicated among at least some of the electronic devices of FIG. 1 in accordance with an embodiment of the present disclosure.
FIG. 4 is a drawing illustrating communication among at least some of the electronic devices of FIG. 1 in accordance with an embodiment of the present disclosure.
FIG. 5 is a block diagram illustrating one of the electronic devices in FIG. 1 in accordance with an embodiment of the present disclosure.



Table 1 provides input messages communicated among at least some of the electronic devices of FIG. 1 in accordance with an embodiment of the present disclosure.
Table 2 provides output messages communicated among at least some of the electronic devices of FIG. 1 in accordance with an embodiment of the present disclosure.
Note that like reference numerals refer to corresponding parts throughout the drawings. Moreover, multiple instances of the same part are designated by a common prefix separated from an instance number by a dash.
DETAILED DESCRIPTION
An electronic device that communicates input messages and output messages with another electronic device using a Bluetooth Low Energy (BTLE) communication protocol is described. In particular, the electronic device receives input messages using a predefined characteristic having a numerical identifier to convey input information associated with a set of input attribute types. A given input message includes one or more input-command characters specifying a given input attribute type in the set of input attribute types and, optionally, an input delimiter and an input value in an input argument associated with the given input attribute type. Moreover, the electronic device provides output messages using the predefined characteristic to convey output information associated with a set of output attribute types. A given output message includes one or more output-command characters specifying a given output attribute type in the set of output attribute types and, optionally, an output delimiter and an output value in an output argument associated with the given output attribute type.
In this way, the electronic device may repurpose the predefined characteristic to allow information associated with an arbitrary attribute type (or command) to be communicated between the electronic device and the other electronic device. This flexibility may allow the BTLE communication protocol to be used even when the desired attributes types are not known in advance. Consequently, this communication protocol may allow users of the electronic device to perform basic tasks and a wide range of applications, which may increase user satisfaction with the electronic device.
In the discussion that follows the input packets and the output packets may be transmitted and received by electronic devices using radios that communicate packets in accordance with a wireless-local-area-network (WLAN) communication protocol, such as: an Institute of Electrical and Electronics Engineers (IEEE) 802.11 standard (which is sometimes referred to as ‘Wi-Fi®,’ from the Wi-Fi® Alliance of Austin, Tex.), Bluetooth® (from the Bluetooth Special Interest Group of Kirkland, Wash.), and/or another type of wireless interface. In the discussion that follows, BTLE is used as an illustrative example. However, a wide variety of communication protocols may be used.
Communication among electronic devices is shown in FIG. 1, which presents a block diagram illustrating, which presents a block diagram illustrating communication among electronic device 110, electronic device 112 and electronic device 114 (either of which may be another instance of electronic device 110, a legacy electronic device that does not communicate wirelessly or electrically with electronic device 110, an access point, or a portable electronic device, e.g., a cellular telephone), and with optional computer 122 via optional network 120 (such as the Internet, a wireless local area network, an Ethernet network, an intra-net, an optical network, etc.). In particular, electronic devices 110, 112 and/or 114 may wirelessly communicate while: transmitting advertising frames on wireless channels, detecting one another by scanning wireless channels, establishing connections (for example, by transmitting association requests), and/or transmitting and receiving packets (which may include the association requests and/or additional information as payloads).
As described further below with reference to FIG. 5, electronic devices 110, 112 and/or 114 may include subsystems, such as: a networking subsystem, a memory subsystem and a processor subsystem. In addition, electronic devices 110, 112 and/or 114 may include radios 116 in the networking subsystems. More generally, electronic devices 110, 112 and/or 114 can include (or can be included within) any electronic devices with the networking subsystems that enable these electronic devices to wirelessly communicate with each other. This wireless communication can comprise transmitting advertisements on wireless channels to enable electronic devices to make initial contact or detect each other, followed by exchanging subsequent data/management frames (such as association requests and responses) to establish a connection, configure security options (e.g., Internet Protocol Security), transmit and receive packets or frames via the connection, etc.
As can be seen in FIG. 1, wireless signals 118 (represented by a jagged line) are transmitted from a radio 114-1 in electronic device 110. These wireless signals are received by at least one of electronic devices 112 and/or 114 (such as electronic device 112). In particular, electronic device 110 may transmit messages or packets. In turn, these packets may be received by radio 116-2 in electronic device 112. This may allow electronic device 110 to communicate information to electronic device 112. While FIG. 1 illustrates electronic device 110 transmitting packets, note that electronic device 110 may also receive packets from electronic devices 112 and/or 114.
In the described embodiments, processing of a packet or frame in electronic devices 110, 112 and/or 114 includes: receiving wireless signals 118 with the packet or frame; decoding/extracting the packet or frame from received wireless signals 118 to acquire the packet or frame; and processing the packet or frame to determine information contained in the packet or frame (such as the information included in the payload). For example, the information may include an output message from electronic device 112. Note that the communication between electronic device 110 and a given one of electronic devices 112 and 114 (such as electronic device 112) may be characterized by a variety of performance metrics, such as: a data rate, a data rate for successful communication (which is sometimes referred to as a ‘throughput’), an error rate (such as a retry or resend rate), a mean-square error of equalized signals relative to an equalization target, intersymbol interference, multipath interference, a signal-to-noise ratio, a width of an eye pattern, a ratio of number of bytes successfully communicated during a time interval (such as 1-10 s) to an estimated maximum number of bytes that can be communicated in the time interval (the latter of which is sometimes referred to as the ‘capacity’ of a channel or link), and/or a ratio of an actual data rate to an estimated data rate (which is sometimes referred to as ‘utilization’).
Electronic device 110 may use predefined characteristics (or attributes types) having associated numerical identifiers to communicate information, such as commands and/or associated values of arguments with electronic devices 112 and/or 114. However, when the desired characteristics are not known in advance or need to be modified, the communication technique may be used to dynamically repurpose a predefined characteristic. As described further below with reference to FIGS. 2-4, in order to address this challenge electronic device 110 (as well as electronic devices 112 and/or 114) may receive input messages using a predefined characteristic having a numerical identifier (such as a universally unique identifier) to convey input information associated with a set of input attribute types. A given input message may include one or more input-command characters specifying a given input attribute type in the set of input attribute types and, when the given input message includes an input value in an input argument associated with the given input attribute type, the given input message may include an input delimiter between the one or more input-command characters and the input argument. Note that the input delimiter may include: a tab, and an ASCII delimiter (such as: ASCII number 28, 29, 30 or 31). Moreover, the input delimiter may include an invalid character for a Wi-Fi Service Set Identifier. Thus, by using key-value pairs (i.e., the command characters and the optional arguments) electronic device 110 may communicate an arbitrary attribute type using the predefined characteristic.
Moreover, electronic device 110 may provide output messages using the predefined characteristic to convey output information associated with a set of output attribute types. A given output message may include one or more output-command characters specifying a given output attribute type in the set of output attribute types and, when the given output message includes an output value in an output argument associated with the given output attribute type, the given output message may include an output delimiter (such as a space or a comma) between the one or more output-command characters and the output argument.
In general, there may be constraints on the length of the output messages. Consequently, a maximum length of the given output message may be less than a maximum length of the given input message. For example, the maximum length of the given output message may be less than or equal to 22 characters, while the maximum length of the given input message may be much larger.
In some embodiments, when electronic device 110 receives an input message with an information request, electronic device 110 asynchronously provides one or more output messages with the requested information. In particular, the one or more output messages may be provided over time without electronic device 110 receiving further input messages related to the information request from electronic device 112. Thus, electronic device 112 may subscribe to a channel associated with electronic device 110. Then, after providing the information request, electronic device 112 may receive the one or more output messages from electronic device 110 as the requested information becomes available and/or when values in the attributes change. Consequently, the communication technique may allow electronic device 110 to implement a wireless serial port to electronic device 112.
Furthermore, with certain operating systems (such as Android from Google, Inc. of Mountain View, Calif.) the maximum length of the output messages may be addressed by transmitting multiple output messages to communicate the requested information while still being compliant with a BTLE specification or standard. For example, when electronic device 110 receives an input message with an information request and the requested information exceeds a maximum length of the given output message, electronic device 110 may provide the requested information in a set of output messages. A first output message in the set of output messages may specify a number of output messages in the set of output messages. Furthermore, output messages between the first output message and a final output message in the set of output messages may specify its position in the set of output messages and may include a portion of the requested information. Additionally, the final output message in the set of output messages may indicate that the set of output messages is complete. This information may allow electronic device 112 to process the set of output messages to extract the requested information.
Although we describe the network environment shown in FIG. 1 as an example, in alternative embodiments, different numbers or types of electronic devices may be present. For example, some embodiments comprise more or fewer electronic devices. As another example, in another embodiment different electronic devices are transmitting and/or receiving packets or frames.
We now further describe the communication technique. FIG. 2 presents embodiments of a flow diagram illustrating method 200 for communicating input messages and output messages with another electronic device using a BTLE communication protocol, which may be performed by an electronic device, such as one of electronic devices 110, 112 and 114 (FIG. 1). During operation, the electronic device receives the input messages using a predefined characteristic (operation 210) having a numerical identifier to convey input information associated with a set of input attribute types. A given input message includes one or more input-command characters specifying a given input attribute type in the set of input attribute types and, when the given input message includes an input value in an input argument associated with the given input attribute type, the given input message includes an input delimiter between the one or more input-command characters and the input argument.
Moreover, the electronic device provides the output messages using the predefined characteristic (operation 212) to convey output information associated with a set of output attribute types. A given output message includes one or more output-command characters specifying a given output attribute type in the set of output attribute types and, when the given output message includes an output value in an output argument associated with the given output attribute type, the given output message includes an output delimiter between the one or more output-command characters and the output argument.
Note that the electronic device may asynchronously provide (operation 212), in response to receiving an input message with an information request, one or more output messages with the requested information. These one or more output messages may be provided over time without the electronic device receiving further input messages related to the information request from the other electronic device.
Furthermore, when the electronic device receives an input message with an information request and the requested information exceeds a maximum length of the given output message, the electronic device may provide the requested information in a set of output messages. A first output message in the set of output messages may specify a number of output messages in the set of output messages. Output messages between the first output message and a final output message in the set of output messages may specify its position in the set of output messages and may include a portion of the requested information. Additionally, the final output message in the set of output messages may indicate that the set of output messages is complete.
In these ways, the electronic device (for example, an interface circuit, a driver and/or software executed in an environment of the transmitting electronic device) may facilitate communication with the other electronic device. In particular, the electronic device may dynamically repurpose a predefined BTLE characteristic so an arbitrary attribute type (and, optionally, a value of an argument associated with the arbitrary attribute type) can be received or transmitted to one of electronic devices 12 and/or 114 using the predefined BTLE characteristic. This capability may allow additional tasks, services and applications to be flexibly implemented using electronic device 110. For example, services may be offered to: users associated with electronic devices 110, 112 and/or 114 (such as owners or renters of these electronic devices), suppliers of components or spare parts, maintenance personnel, security personnel, emergency service personnel, insurance companies, insurance brokers, realtors, leasing agents, apartment renters, hotel guests, hotels, restaurants, businesses, organizations, governments, potential buyers of physical objects, a shipping or transportation company, etc. In particular, the input messages and the output messages may allow electronic device 110 to monitor an environmental condition in an environment that includes electronic device 110. This monitoring may allow electronic device 110 to adapt or change the function or operation of one or more electronic devices in FIG. 1 (such as a legacy electronic device and/or a regulator device, which may not directly communicate information with electronic device 110) based on the needs or preferences of a user associated with electronic device 110, who is, therefore, in proximity. In this way, an environmental condition (such as the temperature, humidity, an illumination pattern, etc.) in the environment may be dynamically modified. In addition, once the information associated with electronic device 110 is known, the service(s) may include maintenance notifications about electronic devices 110, 112 and/or 114. For example, electronic device 110 may include one or more sensors that monitor the environmental condition in the environment (such as an acoustic signal from a fire or carbon-monoxide detector that indicates a failing battery). Based on the environmental condition, electronic device 110 may provide a maintenance notification to a user's cellular telephone to replace the battery or to perform another remedial action (such as a repair or service to be performed on electronic device 112). Consequently, the improved functionality and services facilitated by the communication technique may promote sales of electronic device 110 (and, more generally, commercial activity) and may enhance customer satisfaction with electronic device 110.
In some embodiments of method 200 (FIG. 2), there may be additional or fewer operations. Moreover, the order of the operations may be changed, and/or two or more operations may be combined into a single operation.
In an exemplary embodiment, as shown in FIG. 3, which presents a drawing illustrating an input message 310 using a predefined characteristic having a numerical identifier and an output message 318 using the predefined characteristic communicated among electronic devices 110, 112 and/or 114 (FIG. 1). In particular, input message 310 may include one or more input-command characters 312 specifying a given input attribute type in a set of input attribute types (which are sometimes referred to as ‘commands’ or ‘input commands’). Moreover, when input message 310 includes an input value in an optional input argument 316 associated with the given input attribute type, input message 310 includes an optional input delimiter 314 between the one or more input-command characters 312 and the optional input argument 316 (such as a tab or an ASCII delimiter). This information allows the predefined characteristic to be repurposed to convey any of the set of input attribute types. Table 1 presents examples of input messages communicated among at least some of electronic devices 110, 112 and/or 114 of FIG. 1. Note that the quotation marks are included for clarity. They are not included in the input messages.










TABLE 1





Input Command
Command
Argument
Example







Set the Service Set
S
SSID
“S family_wireless_net”


Identifier (SSID)





Set the password
P
Password
“P johnsons”


Set Wi-Fi secure
X
Yes or No
“X Yes”


Tell the electronic
NetworkConfigCompleted
None
“NetworkConfigCompleted”


device that the





network configuration





is complete. This also





causes network





services to be restarted





Tells the electronic
ConfigCompleted
None
“ConfigCompleted”


device that everything





is done





Request serial number
ReqSerialNumber
None
“ReqSerial Number”


Request Wi-Fi
ReqWifiStatus
None
“ReqWifiStatus”


connection status





Request version
ReqBLEAPIVersion
None
“ReqBLEAPIVersion”


number





Request a scan of
ReqWiFiScan
None
“ReqWiFiScan”


Wi-Fi electronic





devices





Set PubNub channel
B
Pubnub
“B <pubnub channel>”




channel



Set the electronic
T
Device
“T <device token>”


device token

token



Request the electronic
ReqDeviceType
None
“ReqDevType”


device type





Send pubnub channel
PK
Pubnub
“PK <pubnub publish key>”


key

publish key



Send pubnub
SK
Pubnub
“SK <pubnub subscriber


subscriber key

subscriber
key>”




key



Tell the electronic
ConfigCompleted
None
“ConfigCompleted”


device the





configuration is





completed





Set timezone
TZ
Hours
“TZ-6”




offset from





Coordinated





Universal





time



Set the electronic
DN
Electronic
“TZ 3”


device number

device





number









Furthermore, output message 318 may include one or more output-command characters 320 specifying a given output attribute type in a set of output attribute types (which are sometimes referred to as ‘commands’ or ‘output commands’). Additionally, when output message 318 includes an output value in an optional output argument 324 associated with the given output attribute type, output message 318 includes an optional output delimiter 322 between the one or more output-command characters 320 and the optional output argument 324 (such as a space or a comma). This information allows the predefined characteristic to be repurposed to convey any of the set of output attribute types. Table 2 presents examples of output messages communicated among at least some of electronic devices 110, 112 and/or 114 of FIG. 1. Note that the quotation marks are included for clarity. They are not included in the output messages. Because of constraints of the maximum length of the output message, requested information may be split into multiple messages. For example, in response to a request for a scan of Wi-Fi devices, the electronic device may respond with “AP 165,11,” i.e., the first detected Wi-Fi electronic device is 165 and 11 more output messages will follow. Subsequent output messages may indicate the message number and another detected Wi-Fi electronic device, such as “L02 ATT808.” Finally, the last output message in this set of output messages may indicate that the set is complete, such as “EAP.”










TABLE 2





Output Command
Command
Argument
Example







Serial number
N
Serial
“N <serial number>”




number



Wi-Fi Connection
WS
Connected
“WS connected”


Status

or Not





connected



BTLE Application
BLEAPIER
1
“BLEAPIVER 1”


Programming





Interface Version





Begin sending APs
AP
AP value,
“AP 165, 11”




number of





messages



AP message
L<message number>
AP value
“L02 ATT808”




or





identifier



End sending AP
EAP
None
“EAP”


Electronic device type
DT
Electronic
“DT <device type>”




device





type









In an exemplary embodiment, a service associated with the electronic device (to which the other electronic device can subscribe) has a universally unique identifier such as 0000000000001000800000805F9B0000, and includes or is associated with the predefined characteristic that has a numerical identifier such as a universally unique identifier of 0000000000001000800000805F9B0001. This service allows this predefined characteristic to emulate a serial port between the electronic device and the other electronic device, such as a user's cellular telephone. In order to receive output messages from the electronic device, the other electronic device may subscribe to be notified when a value of one of the output attribute types changes. This allows the other electronic device to request information from the electronic device and to have the requested information sent back asynchronously by the electronic device without the other electronic device having to poll the electronic device. Note that, by default, when the predefined characteristic is read, the value return in the output argument may be the serial number of the electronic device.
As shown in FIG. 3, the general format of an input message to the electronic device may be:

    
    
        <Command><Tab><Argument>.

A tab may be used as optional input delimiter 314 because it is not a valid character for a Service Set Identifier. Note that all the data sent to the electronic devices in input messages and received from the electronic device in output messages may be ASCII encoded. Moreover, while the number of characters that may be allowed to be sent to the electronic device from the other electronic device may be relatively large, the maximum size or length of an output message sent from the electronic device to the other electronic device may be 22 characters.

    
    


Embodiments of the communication technique are further illustrated in FIG. 4, which presents a drawing illustrating communication between electronic device 110 and electronic device 112 (FIG. 1). In particular, interface circuit 410 receives an input message 412 using a predefined characteristic having a numerical identifier from electronic device 112. This input message may include one or more input-command characters specifying a given input attribute type in a set of input attribute types. Moreover, when electronic device 112 writes information to electronic device 110 (i.e., when the given input message includes an input value in an input argument associated with the given input attribute type), the given input message includes an input delimiter (such as a tab) between the one or more input-command characters and the input argument. For example, the one or more input-command characters may request that electronic device 110 characterize a wireless-network environment, such as information about other electronic devices in a wireless network that includes electronic device 110.
In response, interface circuit 410 may characterize the other electronic devices in a wireless network by scanning 414 for advertisements (such as advertisement 416) from the other electronic devices in a wireless network. As other electronic devices (such as electronic device 114) are detected, interface circuit 410 may asynchronously provide an output message 418 using the predefined characteristic to electronic device 112. This output message may include one or more output-command characters specifying a given output attribute type in a set of output attribute types. Furthermore, when the given output message includes an output value in an output argument associated with the given output attribute type, the given output message may include an output delimiter (such as a comma) between the one or more output-command characters and the output argument.
For example, if the requested information associated with the one or more input-command characters in input message 420 exceeds a maximum length of the given output message, interface circuit 410 may provide the requested information in a set of output messages 422. As noted previously, the output messages in the set of output messages 422 may specify: a start of the set of output messages 422, a relative or absolute position of a given output message in the set of output messages 422, and the end of the set of output messages 422.
We now describe embodiments of the electronic device. FIG. 5 presents a block diagram illustrating an electronic device 500, such as one of electronic devices 110, 112 and/or 114. This electronic device includes processing subsystem 510 (and, more generally, an integrated circuit or a control mechanism), memory subsystem 512, networking subsystem 514, power subsystem 516, switching subsystem 520 and optional sensor subsystem 524 (i.e., a data-collection subsystem and, more generally, a sensor mechanism). Processing subsystem 510 includes one or more devices configured to perform computational operations and to execute techniques to process sensor data. For example, processing subsystem 510 can include one or more microprocessors, application-specific integrated circuits (ASICs), microcontrollers, programmable-logic devices, and/or one or more digital signal processors (DSPs).
Memory subsystem 512 includes one or more devices for storing data and/or instructions for processing subsystem 510, networking subsystem 514 and/or optional sensor subsystem 524. For example, memory subsystem 512 can include dynamic random access memory (DRAM), static random access memory (SRAM), and/or other types of memory. In some embodiments, instructions for processing subsystem 510 in memory subsystem 512 include: one or more program modules or sets of instructions (such as one or more program modules 532), which may be executed in an operating environment (such as operating system 534) by processing subsystem 510. Note that the one or more computer programs may constitute a computer-program mechanism. Moreover, instructions in the various modules in memory subsystem 512 may be implemented in: a high-level procedural language, an object-oriented programming language, and/or in an assembly or machine language. Furthermore, the programming language may be compiled or interpreted, e.g., configurable or configured (which may be used interchangeably in this discussion), to be executed by processing subsystem 510.
In addition, memory subsystem 512 can include mechanisms for controlling access to the memory. In some embodiments, memory subsystem 512 includes a memory hierarchy that comprises one or more caches coupled to a memory in electronic device 500. In some of these embodiments, one or more of the caches is located in processing subsystem 510.
In some embodiments, memory subsystem 512 is coupled to one or more high-capacity mass-storage devices (not shown). For example, memory subsystem 512 can be coupled to a magnetic or optical drive, a solid-state drive, or another type of mass-storage device. In these embodiments, memory subsystem 512 can be used by electronic device 500 as fast-access storage for often-used data, while the mass-storage device is used to store less frequently used data.
Networking subsystem 514 includes one or more devices configured to couple to and communicate on a wired and/or wireless network (i.e., to perform network operations and, more generally, communication), including: interface circuit 528 (such as a BTLE communication circuit) and one or more associated antennas 530. (While FIG. 5 includes one or more antennas 530, in some embodiments electronic device 500 includes one or more nodes on interface circuit 528, e.g., pads, which can be coupled to one or more antennas 530. Thus, electronic device 500 may or may not include one or more antennas 530.) For example, networking subsystem 514 can include: a ZigBee® networking subsystem, a Bluetooth networking system (such as BTLE), a cellular networking system (e.g., a 3G/4G network such as UMTS, LTE, etc.), a universal serial bus (USB) networking system, a networking system based on the standards described in IEEE 802.11 (e.g., a Wi-Fi networking system), an Ethernet networking system, an infra-red communication system, a power-line communication system and/or another communication system (such as a near-field-communication system or an ad-hoc-network networking system). Note that the combination of interface circuit 528 and at least one of one or more antennas 530 may constitute a radio.
Moreover, networking subsystem 514 includes processors, controllers, radios/antennas, sockets/plugs, and/or other devices used for coupling to, communicating on, and handling data and events for each supported networking system. Note that mechanisms used for coupling to, communicating on, and handling data and events on the network for each network system are sometimes collectively referred to as a ‘network interface’ for the network system. In some embodiments, a ‘network’ between the electronic devices does not yet exist. Therefore, electronic device 500 may use the mechanisms in networking subsystem 514 for performing simple wireless communication between the electronic devices, e.g., transmitting advertising or beacon frames and/or scanning for advertising frames transmitted by other electronic devices.
Furthermore, electronic device 500 may include power subsystem 516 with one or more power sources 518. Each of these power sources may include: a battery (such as a rechargeable or a non-rechargeable battery), a DC: power supply, a transformer, and/or a switched-mode power supply. Moreover, the one or more power sources 518 may operate in a voltage-limited mode or a current-limited mode. Furthermore, these power sources may be mechanically and electrically coupled by a male or female adaptor to: a wall or electrical-outlet socket or plug (such as a two or three-pronged electrical-outlet plug, which may be collapsible or retractable), a light socket (or light-bulb socket), electrical wiring (such as a multi-wire electrical terminal), a generator, a USB port or connector, a DC-power plug or socket, a cellular-telephone charger cable, a photodiode, a photovoltaic cell, etc. This mechanical and electrical coupling may be rigid or may be remateable. Note that the one or more power sources 518 may be mechanically and electrically coupled to an external power source or another electronic device by one of the electrical-connection nodes in switch 522 in switching subsystem 520.
In some embodiments, power subsystem 516 includes or functions as a pass-through power supply for one or more electrical connectors to an external electronic device (such as an appliance or a regulator device) that can be plugged into the one or more electrical connectors. Power to the one or more electrical connectors (and, thus, the external electronic device) may be controlled locally by processing subsystem 510, switching subsystem 520 (such as by switch 522), and/or remotely via networking subsystem 514.
Furthermore, optional sensor subsystem 524 may include one or more sensor devices 526 (or a sensor array), which may include one or more processors and memory. For example, the one or more sensor devices 526 may include: a thermal sensor (such as a thermometer), a humidity sensor, a barometer, a camera or video recorder (such as a CCD or CMOS imaging sensor), one or more microphones (which may be able to record acoustic information, including acoustic information in an audio band of frequencies, in mono or stereo), a load-monitoring sensor or an electrical-characteristic detector (and, more generally, a sensor that monitors one or more electrical characteristics), an infrared sensor (which may be active or passive), a microscope, a particle detector (such as a detector of dander, pollen, dust, exhaust, etc.), an air-quality sensor, a particle sensor, an optical particle sensor, an ionization particle sensor, a smoke detector (such as an optical smoke detector or an ionizing smoke detector), a fire-detection sensor, a radon detector, a carbon-monoxide detector, a chemical sensor or detector, a volatile-organic-compound sensor, a combustible gas sensor, a chemical-analysis device, a mass spectrometer, a microanalysis device, a nano-plasmonic sensor, a genetic sensor (such as a micro-array), an accelerometer, a position or a location sensor (such as a location sensor based on the Global Positioning System or GPS), a gyroscope, a motion sensor (such as a light-beam sensor), a contact sensor, a strain sensor (such as a strain gauge), a proximity sensor, a microwave/radar sensor (which may be active or passive), an ultrasound sensor, a vibration sensor, a fluid flow sensor, a photo-detector, a Geiger counter, a radio-frequency radiation detector, and/or another device that measures a physical effect or that characterizes an environmental factor or physical phenomenon (either directly or indirectly). Note that the one or more sensor devices 526 may include redundancy (such as multiple instances of a type of sensor device) to address sensor failure or erroneous readings, to provide improved accuracy and/or to provide improved precision.
During operation of electronic device 500, processing subsystem 510 may execute one or more program modules 532, such as an environmental-monitoring application that uses one or more sensor devices 526 to monitor one or more environmental conditions in an environment that includes electronic device 500. The resulting sensor data may be used by the environmental-monitoring application to modify operation of electronic device 500 and/or the external electronic device, and/or to provide information about the environment to another (separate) electronic device (e.g., via networking subsystem 514) using the communication technique.
Within electronic device 500, processing subsystem 510, memory subsystem 512, and networking subsystem 514, power subsystem 516, switching subsystem 520 and/or optional sensor subsystem 524 may be coupled using one or more interconnects, such as bus 536. These interconnects may include an electrical, optical, and/or electro-optical connection that the subsystems can use to communicate commands and data among one another. Although only one bus 536 is shown for clarity, different embodiments can include a different number or configuration of electrical, optical, and/or electro-optical connections among the subsystems.
Electronic device 500 can be (or can be included in) a wide variety of electronic devices, such as an electronic device with at least one network interface. For example, electronic device 500 can be (or can be included in): a sensor (such as a smart sensor), a tablet computer, a smartphone, a cellular telephone, an appliance, a regulator device, a consumer-electronic device (such as a baby monitor), a portable computing device, an access point, a router, a switch, communication equipment, test equipment, a digital signal processor, a controller, a personal digital assistant, a laser printer (or other office equipment such as a photocopier), a personal organizer, a toy, a set-top box, a computing device (such as a laptop computer, a desktop computer, a server, and/or a subnotebook/netbook), a light (such as a nightlight), a space heater, an alarm, a smoke detector, a carbon-monoxide detector, an environmental monitoring device (which monitors an environmental condition in the environment that includes electronic device 500), and/or another electronic device, and/or another electronic device.
Although specific components are used to describe electronic device 500, in alternative embodiments, different components and/or subsystems may be present in electronic device 500. For example, electronic device 500 may include one or more additional processing subsystems, memory subsystems, networking subsystems, power subsystems, switching subsystems, and/or sensor subsystems. Moreover, one or more of the subsystems may not be present in electronic device 500. Furthermore, in some embodiments, electronic device 500 may include one or more additional subsystems that are not shown in FIG. 5 such as a user-interface subsystem, a display subsystem, and/or a feedback subsystem (which may include speakers and/or an optical source).
Although separate subsystems are shown in FIG. 5, in some embodiments, some or all of a given subsystem or component can be integrated into one or more of the other subsystems or component(s) in electronic device 500. For example, in some embodiments program module 522 is included in operating system 534. In some embodiments, a component in a given subsystem is included in a different subsystem.
Moreover, the circuits and components in electronic device 500 may be implemented using any combination of analog and/or digital circuitry, including: bipolar, PMOS and/or NMOS gates or transistors. Furthermore, signals in these embodiments may include digital signals that have approximately discrete values and/or analog signals that have continuous values. Additionally, components and circuits may be single-ended or differential, and power supplies may be unipolar or bipolar.
An integrated circuit may implement some or all of the functionality of networking subsystem 514, such as one or more radios. Moreover, the integrated circuit may include hardware and/or software mechanisms that are used for transmitting wireless signals from electronic device 500 and receiving signals at electronic device 500 from other electronic devices. Aside from the mechanisms herein described, radios are generally known in the art and hence are not described in detail. In general, networking subsystem 514 and/or the integrated circuit can include any number of radios. Note that the radios in multiple-radio embodiments function in a similar way to the radios described in single-radio embodiments.
In some embodiments, networking subsystem 514 and/or the integrated circuit include a configuration mechanism (such as one or more hardware and/or software mechanisms) that configures the radios to transmit and/or receive on a given channel (e.g., at a given carrier frequency). For example, in some embodiments, the configuration mechanism can be used to switch the radio from monitoring and/or transmitting on a given channel to monitoring and/or transmitting on a different channel. (Note that ‘monitoring’ as used herein comprises receiving signals from other electronic devices and possibly performing one or more processing operations on the received signals, e.g., determining if the received signal comprises an advertising frame, calculating a performance metric, etc.)
While a communication protocol compatible with BTLE was used as an illustrative example, the described embodiments of the communication technique may be used in a variety of network interfaces. Furthermore, while some of the operations in the preceding embodiments were implemented in hardware or software, in general the operations in the preceding embodiments can be implemented in a wide variety of configurations and architectures. Therefore, some or all of the operations in the preceding embodiments may be performed in hardware, in software or both. For example, at least some of the operations in the communication technique may be implemented using program module 522, operating system 534 (such as drivers for interface circuit 528) and/or in firmware in interface circuit 528. Alternatively or additionally, at least some of the operations in the communication technique may be implemented in a physical layer, such as hardware in interface circuit 528.
In the preceding description, we refer to ‘some embodiments.’ Note that ‘some embodiments’ describes a subset of all of the possible embodiments, but does not always specify the same subset of embodiments.
The foregoing description is intended to enable any person skilled in the art to make and use the disclosure, and is provided in the context of a particular application and its requirements. Moreover, the foregoing descriptions of embodiments of the present disclosure have been presented for purposes of illustration and description only. They are not intended to be exhaustive or to limit the present disclosure to the forms disclosed. Accordingly, many modifications and variations will be apparent to practitioners skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present disclosure. Additionally, the discussion of the preceding embodiments is not intended to limit the present disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.

## Claims

1. An electronic device, comprising:
an antenna; and
an interface circuit, coupled to the antenna, configured to communicate with another electronic device using a Bluetooth Low Energy (BTLE) communication protocol, wherein the electronic device is configured to:
receive input messages using a predefined characteristic having a numerical identifier to convey input information associated with a set of input attribute types including multiple input attribute types, wherein a given input message includes one or more input-command characters specifying a given input attribute type in the set of input attribute types, an input value in an input argument associated with the given input attribute type, and an input delimiter between the one or more input-command characters and the input argument, and
wherein the one or more input-command characters, the input delimiter and the input value dynamically repurpose the predefined characteristic to convey any of the set of input attribute types, including an input attribute that is not known in advance; and
provide output messages using the predefined characteristic to convey output information associated with a set of output attribute types having multiple output attribute types, wherein a given output message includes one or more output-command characters specifying a given output attribute type in the set of output attribute types, an output value in an output argument associated with the given output attribute type, and an output delimiter between the one or more output-command characters and the output argument, and
wherein the one or more output-command characters, the output delimiter and the output value dynamically repurpose the predefined characteristic to convey any of the set of output attribute types.

2. The electronic device of claim 1, wherein the input delimiter includes one of: a tab, and an ASCII delimiter.

3. The electronic device of claim 1, wherein the input delimiter includes an invalid character for a Service Set Identifier.

4. The electronic device of claim 1, wherein the output delimiter includes a comma.

5. The electronic device of claim 1, wherein a maximum length of the given output message is less than a maximum length of the given input message.

6. The electronic device of claim 1, wherein a maximum length of the given output message is less than or equal to 22 characters.

7. The electronic device of claim 1, wherein, when the electronic device receives an input message with an information request, the electronic device is configured to asynchronously provide one or more output messages with the requested information.

8. The electronic device of claim 7, wherein the one or more output messages are provided over time without the electronic device receiving further input messages related to the information request from the other electronic device.

9. The electronic device of claim 1, wherein, when the electronic device receives an input message with an information request and the requested information exceeds a maximum length of the given output message, the electronic device is configured to provide the requested information in a set of output messages;
wherein a first output message in the set of output messages specifies a number of output messages in the set of output messages;
wherein output messages between the first output message and a final output message in the set of output messages specifies its position in the set of output messages and includes a portion of the requested information; and
wherein the final output message in the set of output messages indicates that the set of output messages is complete.

10. A computer-program product for use in conjunction with an electronic device, the computer-program product comprising a non-transitory computer-readable storage medium and a computer-program mechanism embedded therein to communicate input messages and output messages with another electronic device using a Bluetooth Low Energy (BTLE) communication protocol, the computer-program mechanism including:
instructions for receiving the input messages using a predefined characteristic having a numerical identifier to convey input information associated with a set of input attribute types including multiple input attribute types, wherein a given input message includes one or more input-command characters specifying a given input attribute type in the set of input attribute types, an input value in an input argument associated with the given input attribute type, and an input delimiter between the one or more input-command characters and the input argument, and
wherein the one or more input-command characters, the input delimiter and the input value dynamically repurpose the predefined characteristic to convey any of the set of input attribute types, including an input attribute that is not known in advance; and
instructions providing the output messages using the predefined characteristic to convey output information associated with a set of output attribute types having multiple output attribute types, wherein a given output message includes one or more output-command characters specifying a given output attribute type in the set of output attribute types, an output value in an output argument associated with the given output attribute type, and an output delimiter between the one or more output-command characters and the output argument, and
wherein the one or more output-command characters, the output delimiter and the output value dynamically repurpose the predefined characteristic to convey any of the set of output attribute types.

11. The computer-program product of claim 10, wherein the input delimiter includes one of: a tab, and an ASCII delimiter.

12. The computer-program product of claim 10, wherein the input delimiter includes an invalid character for a Service Set Identifier.

13. The computer-program product of claim 10, wherein the output delimiter includes a comma.

14. The computer-program product of claim 10, wherein a maximum length of the given output message is less than a maximum length of the given input message.

15. The computer-program product of claim 10, wherein a maximum length of the given output message is less than or equal to 22 characters.

16. The computer-program product of claim 10, wherein the computer-program mechanism includes instructions for asynchronously providing, in response to receiving an input message with an information request, one or more output messages with the requested information.

17. The computer-program product of claim 16, wherein the one or more output messages are provided over time without the electronic device receiving further input messages related to the information request from the other electronic device.

18. The computer-program product of claim 10, wherein the computer-program mechanism includes instructions for providing, in response to receiving an input message with an information request and when the requested information exceeds a maximum length of the given output message, the requested information in a set of output messages;
wherein a first output message in the set of output messages specifies a number of output messages in the set of output messages;
wherein output messages between the first output message and a final output message in the set of output messages specifies its position in the set of output messages and includes a portion of the requested information; and
wherein the final output message in the set of output messages indicates that the set of output messages is complete.

19. An electronic-device-implemented method for communicating input messages and output messages with another electronic device using a Bluetooth Low Energy (BTLE) communication protocol, wherein the method comprises:
receiving the input messages using a predefined characteristic having a numerical identifier to convey input nformation associated with a set of input attribute types including multiple input attribute types, wherein a given input message includes one or more input-command characters specifying a given input attribute type in the set of input attribute types, an input value in an input argument associated with the given input attribute type, and an input delimiter between the one or more input-command characters and the input argument, and
wherein the one or more input-command characters, the input delimiter and the input value dynamically repurpose the predefined characteristic to convey any of the set of input attribute types, including an input attribute that is not known in advance; and
using a control mechanism in the electronic device, providing the output messages using the predefined characteristic to convey output information associated with a set of output attribute types having multiple output attribute types, wherein a given output message includes one or more output-command characters specifying a given output attribute type in the set of output attribute types, an output value in an output argument associated with the given output attribute type, and an output delimiter between the one or more output-command characters and the output argument, and
wherein the one or more output-command characters, the output delimiter and the output value dynamically repurpose the predefined characteristic to convey any of the set of output attribute types.

20. The method of claim 19, wherein the method further comprises:
asynchronously providing, in response to receiving an input message with an information request, one or more output messages with the requested information; and
wherein the one or more output messages are provided over time without the electronic device receiving further input messages related to the information request from the other electronic device.