WO2016169231A1 - 一种基于蓝牙组建稳态微微网的方法及其系统 - Google Patents

一种基于蓝牙组建稳态微微网的方法及其系统 Download PDF

Info

Publication number
WO2016169231A1
WO2016169231A1 PCT/CN2015/092113 CN2015092113W WO2016169231A1 WO 2016169231 A1 WO2016169231 A1 WO 2016169231A1 CN 2015092113 W CN2015092113 W CN 2015092113W WO 2016169231 A1 WO2016169231 A1 WO 2016169231A1
Authority
WO
WIPO (PCT)
Prior art keywords
peripheral device
central device
central
peripheral
piconet
Prior art date
Application number
PCT/CN2015/092113
Other languages
English (en)
French (fr)
Inventor
楼项辉
虞龙杰
Original Assignee
惠州Tcl移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 惠州Tcl移动通信有限公司 filed Critical 惠州Tcl移动通信有限公司
Priority to US15/100,790 priority Critical patent/US9872128B2/en
Priority to EP15853637.5A priority patent/EP3288296B1/en
Publication of WO2016169231A1 publication Critical patent/WO2016169231A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • H04W48/14Access restriction or access information delivery, e.g. discovery data delivery using user query or user detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/105PBS [Private Base Station] network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • H04W84/20Master-slave selection or change arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/681Types of network addresses using addresses for wireless personal area networks or wireless sensor networks, e.g. Zigbee addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Definitions

  • the present invention relates to the field of Bluetooth technology, and in particular, to a method and system for constructing a steady-state piconet based on Bluetooth.
  • the present invention is directed to the above-mentioned deficiencies of the prior art, and provides a method and system for constructing a steady-state piconet based on Bluetooth, and aims to solve the problem that a wireless connection service of an existing smart device needs to be set up between multiple devices before being connected. This leads to problems that are inconvenient for the user.
  • the present invention provides a method for building a steady-state piconet based on Bluetooth, the method comprising Next steps:
  • the central device acts as a slave and is in a discoverable role.
  • the peripheral device queries the host and initiates a connection to the central device to form a piconet or a scatternet.
  • the central device acquires the Bluetooth address of the peripheral device, and records that the peripheral device is connected.
  • the state of the center device ;
  • the central device When all peripheral devices are disconnected from the central device and enter the query range of the central device again, the central device performs automatic query and identification matching. Upon successful, it initiates a connection request to the peripheral device, and pulls in the peripheral device to establish a steady state pico network;
  • the central device and all peripheral devices back up a common operation type and operation result table locally; the central device controls the active state of the peripheral device.
  • the step of controlling the active state of the peripheral device by the central device comprises:
  • the mobile terminal transmits a customized control request information to the peripheral device through the Internet remote control center device, thereby controlling the peripheral device;
  • the peripheral device After receiving the message sent by the central device, the peripheral device parses the BT Address in the message and matches the local Bluetooth address. If the matching is successful, the corresponding operation is performed; otherwise, it is not executed.
  • the central device acts as a slave and is in a discoverable role, and the peripheral device queries as a host and initiates a connection to the central device to form a piconet or a scatternet. After the connection is successful, the central device acquires a Bluetooth address of the peripheral device, and The steps of recording the status of the peripheral device connected to the central device include:
  • the central device acts as a slave and is in a discoverable role.
  • the first peripheral device queries the host and initiates an L2CAP connection to the central device to form a piconet of the single slave. After the connection is successful, the center device acquires the Bluetooth address of the first peripheral device. And recording the state in which the first peripheral device has actively connected to the central device;
  • the central device acts as a slave and is in a discoverable role.
  • the second peripheral device queries the host and initiates an L2CAP connection to the central device to form a scatternet.
  • the central device acquires the Bluetooth address of the second peripheral device, and records the first Second peripheral device has actively connected to the central device status;
  • the central device When the first peripheral device and the second peripheral device are both disconnected from the central device and re-entered the query range of the central device, the central device performs automatic query and identification matching, and when successful, initiates L2CAP for the first peripheral device and the second peripheral device. Connecting the request and pulling in the first peripheral device and the second peripheral device to establish a steady state piconet with dual slaves;
  • the central device acts as a slave and is in a discoverable role, and one or more of the third peripheral device, the fourth peripheral device, the fifth peripheral device, the sixth peripheral device, and the seventh peripheral device are queried as a host and the central device Initiate an L2CAP connection and set up a scatternet.
  • the method further includes:
  • the peripheral device parses the Bluetooth object field of the message segment in the information packet, and when matched, the peripheral device Sending a second information data packet in a Payload format to the central device; wherein the second information data packet includes a byte length field of the message segment, a peripheral device's own Bluetooth address field, and an operation result field.
  • the invention also provides a method for constructing a steady-state piconet based on Bluetooth, wherein the method comprises the steps of:
  • the central device acts as a slave and is in a discoverable role.
  • Up to 7 peripheral devices act as hosts to query and initiate an L2CAP connection to the central device to form a piconet or a scatternet.
  • the central device obtains the Bluetooth address of the peripheral device and records The state in which the peripheral device has been connected to the central device;
  • the central device When all peripherals are disconnected from the central device network and re-entered the central device query During the encirclement, the central device performs automatic query and identification matching. Upon successful, it initiates an L2CAP connection request to the peripheral device and pulls in the peripheral device to establish a steady-state piconet.
  • the method for constructing a steady-state piconet based on Bluetooth wherein the central device acts as a slave and is in a discoverable role, and at most seven peripheral devices serve as a host query and initiates an L2CAP connection to the central device to form a piconet or a scatternet.
  • the central device acquires the Bluetooth address of the peripheral device, and records the state in which the peripheral device has been connected to the central device, including:
  • the central device acts as a slave and is in a discoverable role.
  • the first peripheral device queries the host and initiates an L2CAP connection to the central device to form a piconet of the single slave. After the connection is successful, the center device acquires the Bluetooth address of the first peripheral device. And recording the state in which the first peripheral device has actively connected to the central device;
  • the central device acts as a slave and is in a discoverable role.
  • the second peripheral device queries the host and initiates an L2CAP connection to the central device to form a scatternet.
  • the central device acquires the Bluetooth address of the second peripheral device, and records the first The state in which the peripheral device has actively connected to the central device;
  • the central device When the first peripheral device and the second peripheral device are both disconnected from the central device and re-entered the query range of the central device, the central device performs automatic query and identification matching, and when successful, initiates L2CAP for the first peripheral device and the second peripheral device. Connecting the request and pulling in the first peripheral device and the second peripheral device to establish a steady state piconet with dual slaves;
  • the central device acts as a slave and is in a discoverable role, and one or more of the third peripheral device, the fourth peripheral device, the fifth peripheral device, the sixth peripheral device, and the seventh peripheral device are queried as a host and the central device Initiate an L2CAP connection and set up a scatternet.
  • the method for establishing a steady-state piconet based on Bluetooth wherein after the step of establishing a steady-state piconet, the method further includes:
  • the method for building a steady-state piconet based on Bluetooth wherein all peripheral devices are After the network device is disconnected from the central device and re-entered the query range of the central device, the central device performs the steps of automatically querying and identifying the matching, and further includes: sending the first information data packet in the Payload format to the peripheral device;
  • An information data packet includes a byte length field of the message segment, a Bluetooth object field of the message segment, an operation type field of the message segment, and a delay duration field of the message segment.
  • the method for constructing a steady-state piconet based on Bluetooth wherein when the central device performs automatic query and identification matching, when the information packet of the Payload format is sent to the peripheral device, the peripheral device parses the sending of the message segment in the information packet a Bluetooth object field, when matched, the peripheral device sends a second information data packet in the Payload format to the central device; wherein the second information data packet includes a byte length field of the message segment, a peripheral device's own Bluetooth address field, and an operation result. Field.
  • the present invention also provides a system for building a steady-state piconet based on Bluetooth, wherein the system comprises:
  • connection record module is used as a slave device and is in a discoverable role. Up to 7 peripheral devices are used as host queries and initiates an L2CAP connection to the central device to form a piconet or a scatternet. When the connection is successful, the central device acquires the peripheral device. Bluetooth address and record the status of the peripheral device connected to the central device;
  • the networking module is used to automatically query and identify the matching when all the peripheral devices are disconnected from the central device and enter the query range of the central device again.
  • the central device initiates an L2CAP connection request to the peripheral device, and the peripheral device is Pull in and establish a steady-state piconet.
  • connection record module specifically includes:
  • the first recording unit is used as a slave device and is in a discoverable role.
  • the first peripheral device serves as a host query and initiates an L2CAP connection to the central device to form a piconet of a single slave. After the connection is successful, the central device obtains a Bluetooth address of the first peripheral device, and recording a state in which the first peripheral device has actively connected to the center device;
  • the second recording unit is used as a slave device and is in a discoverable role, and the second peripheral device serves as a host query and initiates an L2CAP connection to the central device to form a scatter network. After the connection is successful, the center device acquires the second peripheral device. Bluetooth address and record the state that the second peripheral device has actively connected to the central device;
  • the first piconet networking unit is configured to perform automatic query and identifier matching when the first peripheral device and the second peripheral device are disconnected from the central device and enter the query range of the central device again.
  • the first peripheral device and the second peripheral initiate an L2CAP connection request, and pull the first peripheral device and the second peripheral device to establish a steady state piconet with dual slaves;
  • a scatternet networking unit for the central device as a slave and in a discoverable role, one or more of the third peripheral device, the fourth peripheral device, the fifth peripheral device, the sixth peripheral device, and the seventh peripheral device As a host query and initiate an L2CAP connection to the central device, a scatternet is formed.
  • the system for building a steady-state piconet based on Bluetooth further comprising:
  • the backup module is used to back up a same operation type and operation result table locally when the steady state piconet is completed.
  • the system for constructing a steady-state piconet based on Bluetooth wherein the networking module is further configured to automatically query and identify the central device when all peripheral devices are disconnected from the central device and enter the query range of the central device again.
  • the first information data packet in the Payload format is sent to the peripheral device; wherein the first information data packet includes a byte length field of the message segment, a Bluetooth object field of the message segment, an operation type field of the message segment, and a message. The delay time field of the segment.
  • the system for constructing a steady-state piconet based on Bluetooth wherein when the central device performs automatic query and identification matching, when transmitting the information packet in the Payload format to the peripheral device, parsing the transmitting Bluetooth object of the message segment in the information packet a field, when matched, the peripheral device sends a second information data packet in the Payload format to the central device; wherein the second information data packet includes a byte length field of the message segment, a peripheral device's own Bluetooth address field, and an operation result field.
  • the invention provides a method for constructing a steady-state piconet based on Bluetooth and a system thereof, the method comprising the central device as a slave and being in a discoverable role, at most 7 peripheral devices as a host querying and initiating an L2CAP connection to the central device, forming The piconet or the scatternet, when the connection is successful, the central device acquires the Bluetooth address of the peripheral device, and records the state in which the peripheral device has been connected to the central device; when all the peripheral devices are disconnected from the central device and re-entered the query range of the central device again The central device performs automatic query and identification matching. Upon successful, it initiates an L2CAP connection request to the peripheral device, and pulls in the peripheral device to establish a steady-state piconet.
  • the peripheral device can be connected to the central device without setting, and the peripheral device can be controlled to perform services only through the central device, which is convenient for the user.
  • FIG. 1 is a schematic diagram of a network topology structure between multiple Bluetooth devices provided by the present invention.
  • FIG. 2 is a flow chart of a preferred embodiment of a method for building a steady-state piconet based on Bluetooth provided by the present invention.
  • FIG. 3 is a specific flowchart of recording a Bluetooth connection state in a method for building a steady-state piconet based on Bluetooth according to the present invention.
  • FIG. 4 is a structural block diagram of a preferred embodiment of a system for building a steady-state piconet based on Bluetooth provided by the present invention.
  • the advantage of traditional Bluetooth is that the amount of data transmitted is large, and the data transmission rate is also fast, which is suitable for various practical applications.
  • the development of the traditional Bluetooth protocol is mainly in the logical link control and adaptation protocol. (Logical Link Control and Adaptation Protocol, L2CAP), Generic Access Profile (GAP) and Application Profile, which will be introduced separately below.
  • L2CAP Logical Link Control and Adaptation Protocol
  • L2CAP Logical Link Control and Adaptation Protocol
  • Length indicates the byte length of Commands; Channel ID is fixed to 0x0001; Code in Commands indicates the type of command, such as Connection request, Connection response, as shown in Table 2; Identifier in Commands Used to match requests and replies; Length in Commands represents the byte length of Data in Commands; Data in Commands represents information that can be carried by commands.
  • the Commands format of the connection request is shown in Table 3.
  • PSM stands for protocol/service multiplexing and is divided into two parts. The first part is fixed by the Bluetooth Alliance and used as the protocol. The second part is the department.
  • the system dynamic allocation is used as a service, which is at least 2 bytes in length; the Source CID (Source Channel ID) represents the channel ID of the Bluetooth device that sent the connection request.
  • Source CID Source Channel ID
  • the Destination CID indicates the channel ID of the Bluetooth device that sends the connection reply
  • the Source CID indicates the channel ID of the Bluetooth device that receives the connection reply, and is directly copied from the Source CID of the connection request command
  • Result indicates The result of the connection request signaling, such as Connection successful, Connection pending, and Connection refused, as shown in Table 5;
  • the packet format is as shown in Table 7.
  • Length Indicates the byte length of the Information payload
  • the Channel ID indicates the ID of the destination channel, which is dynamically allocated by the system
  • the Information payload indicates the content of the packet, and the length can be set from 0 to 65535 bytes.
  • the format of the packet sent by the host is shown in Figure 8.
  • Length indicates the total length of the PSM and Information payload bytes; the Channel ID is fixed to 0x0002; PSM indicates the protocol/service multiplexing, which is divided into two parts, the first part is fixedly allocated by the Bluetooth Alliance as the protocol, and the second part is dynamically moved by the system.
  • the allocation is used as a service, which is at least 2 bytes long; the Information payload represents the contents of the packet, and the length can be set from 0 to 65533 bytes.
  • Table 7 The format of the packet sent by the slave in Piconet is shown in Table 7.
  • GAP Generic Access Profile
  • the Bluetooth device can simultaneously query nearby Bluetooth devices and be discovered by nearby Bluetooth devices by means of time division multiplexing, that is, the traditional Bluetooth devices can simultaneously serve as an inquiry device and a discoverable device.
  • the querying device obtains the Bluetooth address of the discoverable device by querying.
  • the querying device and the discoverable device may have been connected to another Bluetooth device, but still maintain the query and discoverable functions.
  • Bluetooth devices can simultaneously connect nearby Bluetooth devices and are nearby by time division multiplexing
  • the Bluetooth device is connected, that is, the Bluetooth device can serve as both a connecting device and a connectable device.
  • the connection device sends a connection request (Connection Request) to the connectable device; the connected device can send a connection response (Connection Response) to the connected device.
  • Connection Request connection request
  • Connection Response connection response
  • the Bluetooth device that initiates the connection becomes the master in the network
  • the connected Bluetooth device becomes the slave in the network.
  • the connected device and the connectable device may already be connected to another Bluetooth device, but remain connected and connectable.
  • the two Bluetooth devices When two Bluetooth devices are successfully connected, they can send string messages to each other.
  • the two Bluetooth devices have the ability to query, discover, connect, and connect while remaining connected.
  • FIG. 1 there are 3 piconets, that is, A is the host, B, C, D, and E are the slaves of the Piconet, F is the host, and E, G, and H are the slaves of the Piconet, and D.
  • A is the host
  • B, C, D, and E are the slaves of the Piconet
  • F is the host
  • E, G, and H are the slaves of the Piconet
  • D For the host, J is the slave's Piconet.
  • Piconet consists of one host and one to seven slaves.
  • a host can send string messages to all slaves in the network at the same time. All slaves can send string messages to the host separately.
  • Piconet A and Piconet F Piconet A and Piconet D have a Bluetooth device intersection, so Piconet A and Piconet F, Piconet A and Piconet D and three Piconets form a Scatternet.
  • Scatternet consisting of Piconet A and Piconet F E can send string messages to both A and F
  • Scatternet consisting of Piconet A and Piconet D D can send string messages to both A and J simultaneously.
  • FIG. 2 is a flowchart of a preferred embodiment of a method for building a steady-state piconet based on Bluetooth according to the present invention. As shown in FIG. 2, the method for constructing a steady-state piconet based on Bluetooth includes the following steps:
  • Step S100 The central device acts as a slave and is in a discoverable role, and at most seven peripheral devices serve as a host query and initiate an L2CAP connection to the central device to form a piconet or a scatternet. After the connection is successful, the central device acquires the Bluetooth address of the peripheral device, and records the state in which the peripheral device has been connected to the central device;
  • Step S200 When all the peripheral devices are disconnected from the central device and enter the query range of the central device again, the central device performs automatic query and identification matching. Upon successful, the device initiates an L2CAP connection request to the peripheral device, and pulls the peripheral device into the device. Establish a steady-state piconet.
  • step S100 specifically includes:
  • Step S101 The central device acts as a slave and is in a discoverable role.
  • the first peripheral device queries the host and initiates an L2CAP connection to the central device to form a piconet of the single slave. After the connection is successful, the center device acquires the first peripheral device. Bluetooth address and record the state that the first peripheral device has actively connected to the central device;
  • Step S102 The central device acts as a slave and is in a discoverable role, and the second peripheral device queries the host and initiates an L2CAP connection to the central device to form a scatter network. After the connection is successful, the central device acquires the Bluetooth address of the second peripheral device. And recording the state that the second peripheral device has actively connected to the central device;
  • Step S103 When both the first peripheral device and the second peripheral device are disconnected from the central device and enter the query range of the central device again, the central device performs automatic query and identifier matching, and when successful, the first peripheral device and the second device The peripheral initiates an L2CAP connection request, and pulls in the first peripheral device and the second peripheral device to establish a steady-state piconet with dual slaves;
  • Step S104 the central device acts as a slave and is in a discoverable role, and one or more of the third peripheral device, the fourth peripheral device, the fifth peripheral device, the sixth peripheral device, and the seventh peripheral device are queried as a host and Initiate an L2CAP connection to the central device to form a scatternet.
  • the central device After the networking is completed, the central device obtains the Bluetooth address of the peripheral device and has the identity that the peripheral device has actively connected. The central device will continue to query. When the peripheral device leaves the network and re-enters the query range of the central device, the central device automatically queries and initiates an L2CAP connection to the peripheral device according to the identifier, and pulls the peripheral device into the network, just as the WIFI device automatically connects before the connection. WIFI network.
  • the central device can automatically query and judge peripheral devices such as air conditioners, water heaters, washing machines, etc. connected to the smart home, and the mobile terminal can remotely control the center device through the Internet network to control the smart home. In some scenarios, the steady-state Piconet networking can be used. If the power is restored after power failure, the central device will automatically query, match the identity, and establish a BT L2CAP connection with the devices in the smart home, instead of manually establishing the connection one by one. After the peripheral device is connected to the central device, disconnect the central device and re-enter the query range of the central device. The central device automatically queries and matches according to the connected identifier. If the match is successful, the L2CAP connection is initiated.
  • peripheral devices such as air conditioners, water heaters, washing machines, etc. connected to the smart home
  • the mobile terminal can remotely control the center device through the Internet network to control the smart home.
  • the steady-state Piconet networking can be used. If the power is restored after power failure, the central device will automatically query, match the identity, and
  • the central device can control the active state of the peripheral device, such as immediate opening, immediate closing, delay opening, and delay closing. Therefore, the central device and all peripheral devices need to be backed up locally.
  • the same operation type and operation result table are loaded so as to be correctly encoded and decoded, as shown in Table 9.
  • the central device customizes the Information payload to the first information data packet as shown in Table 10 based on Table 8; the first information data packet includes a byte length field of the message segment, a Bluetooth object field of the message segment, and a message segment.
  • Operation type field delay time field of the message segment.
  • Message represents the message segment sent by the central device to all peripheral devices; Length in the Message indicates the byte length of the Message, but does not include the length of one byte occupied by the Length itself; BT Address is used to specify the Bluetooth device object of the message segment.
  • Operation Type indicates the type of operation, as shown in Table 9; Delay indicates the number of minutes of delay. If the operation has a delay function, the length of 2 bytes can represent the number of minutes in 24 hours.
  • the peripheral device After receiving the message sent by the central device, the peripheral device parses the BT Address in the message and matches the local Bluetooth address. If the matching is successful, the corresponding operation is performed; otherwise, it is not executed.
  • the peripheral device transmits the operation result to the central device, and the peripheral device customizes the Information payload to the second information data packet as shown in Table 11 based on Table 7; the second information data packet includes the message segment.
  • Byte length field peripheral device's own Bluetooth address field, operation result field.
  • Length indicates the byte length of the message, but does not include the length of one byte occupied by Length itself;
  • BT Address indicates the Bluetooth address of the peripheral device itself;
  • Operation Result indicates the operation result, as shown in Table 9.
  • the method for constructing a steady-state piconet based on Bluetooth is based on traditional Bluetooth as a wireless communication mode, and the central device automatically queries, matches and connects peripheral devices.
  • the peripheral device In the networking process, the peripheral device only needs to actively connect to the central device once. After entering the query range of the central device, the central device will automatically query and initiate an L2CAP connection to the peripheral device according to the identifier, just as the WIFI device will automatically connect.
  • the WIFI network that was connected before.
  • the user can use the mobile terminal to remotely control the central device to send customized control request information to the peripheral device, thereby controlling the peripheral device to form an intelligent network.
  • the present invention also provides a steady state piconet based on Bluetooth.
  • the system as shown in Figure 4, includes:
  • the connection record module 100 is used as a slave device and is in a discoverable role, and at most 7 peripheral devices serve as a host query and initiate an L2CAP connection to the center device to form a piconet or a scatter network. When the connection is successful, the center device acquires the periphery.
  • the networking module 200 is configured to: when all the peripheral devices are disconnected from the central device and re-enter the query range of the central device, the central device performs automatic query and identification matching, and when successful, initiates an L2CAP connection request to the peripheral device, and the peripheral device The device pulls in and establishes a steady-state piconet.
  • connection record module 100 specifically includes:
  • the first recording unit is used as a slave device and is in a discoverable role.
  • the first peripheral device serves as a host query and initiates an L2CAP connection to the central device to form a piconet of a single slave. After the connection is successful, the central device obtains a Bluetooth address of the first peripheral device, and recording a state in which the first peripheral device has actively connected to the center device;
  • the second recording unit is used as a slave device and is in a discoverable role, and the second peripheral device serves as a host query and initiates an L2CAP connection to the central device to form a scatter network. After the connection is successful, the center device acquires the second peripheral device. Bluetooth address and record the state that the second peripheral device has actively connected to the central device;
  • the first piconet networking unit is configured to perform automatic query and identifier matching when the first peripheral device and the second peripheral device are disconnected from the central device and enter the query range of the central device again.
  • the first peripheral device and the second peripheral initiate an L2CAP connection request, and pull the first peripheral device and the second peripheral device to establish a steady state piconet with dual slaves;
  • a scatternet networking unit for the central device as a slave and in a discoverable role, one or more of the third peripheral device, the fourth peripheral device, the fifth peripheral device, the sixth peripheral device, and the seventh peripheral device As a host query and initiate an L2CAP connection to the central device, a scatternet is formed.
  • the method further includes:
  • the backup module is used to back up a same operation type and operation result table locally when the steady state piconet is completed.
  • the central device when all the peripheral devices are disconnected from the central device and re-entered the query range of the central device, the central device performs automatic query and When the identifier matches, the first information data packet in the Payload format is sent to the peripheral device; wherein the first information data packet includes a byte length field of the message segment, a Bluetooth object field of the message segment, an operation type field of the message segment, The delay duration field of the message segment.
  • the peripheral device parses the message in the information packet.
  • the transmitting Bluetooth object field of the segment when matched, the peripheral device sends a second information data packet in the Payload format to the central device; wherein the second information data packet includes a byte length field of the message segment and a Bluetooth address field of the peripheral device itself , operation result field.
  • the present invention provides a method and system for constructing a steady-state piconet based on Bluetooth.
  • the method includes the central device as a slave and is in a discoverable role, and at most seven peripheral devices are used as a host to query and center the device. Initiate an L2CAP connection and set up a piconet or a scatternet.
  • the central device obtains the Bluetooth address of the peripheral device and records the state that the peripheral device has been connected to the central device; when all the peripheral devices are disconnected from the central device, and enter the center again.
  • the central device queries the scope, the central device performs automatic query and identification matching.
  • the peripheral device When successful, it initiates an L2CAP connection request to the peripheral device and pulls in the peripheral device to establish a steady-state piconet.
  • the peripheral device can be connected to the central device without setting, and the peripheral device can be controlled to perform services only through the central device, which is convenient for the user.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Automation & Control Theory (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了基于蓝牙组建稳态微微网的方法:中心设备作为从机,外围设备作为主机,组建微微网,中心设备记录外围设备已连接过中心设备的状态;当外围设备再次进入中心设备的查询范围时,中心设备自动查询和标识匹配,成功时则将外围设备拉入,建立微微网。本发明中外围设备无需设置即可与中心设备进行连接,方便了用户。

Description

一种基于蓝牙组建稳态微微网的方法及其系统 技术领域
本发明涉及蓝牙技术领域,尤其涉及一种基于蓝牙组建稳态微微网的方法及其系统。
背景技术
随着通信技术的发展,推动了物联网推广和产业化,如智能家居通过物联网技术将家中的各种设备(如音视频设备、照明系统、窗帘控制、空调控制、安防系统、数字影院系统、影音服务器、影柜系统、网络家电等)连接到一起,提供家电控制、照明控制、电话远程控制、室内外遥控、防盗报警、环境监测、暖通控制、红外转发以及可编程定时控制等多种功能和手段,兼备建筑、网络通信、信息家电、设备自动化,提供全方位的信息交互功能,甚至为各种能源费用节约资金。但启动这些业务时,往往需要用户对多个设备之间进行设置与连接才能正常使用,对用户来说,使用不是很方便。
因此,现有技术还有待于改进和发展。
发明内容
本发明针对现有技术的上述缺陷,提供一种基于蓝牙组建稳态微微网的方法及其系统,旨在解决现有启动智能设备的无线连接业务需用户对多设备间进行设置才可以连接,从而导致用户不方便的问题。
本发明解决技术问题所采用的技术方案如下:
本发明提供了一种基于蓝牙组建稳态微微网的方法,所述方法包括以 下步骤:
中心设备作为从机并处于可被发现角色,外围设备作为主机查询并对中心设备发起连接,组建微微网或散射网,当连接成功后中心设备获取外围设备的蓝牙地址,并记录外围设备已连接过中心设备的状态;
当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对外围设备发起连接请求,并将外围设备拉入,建立稳态微微网;
当稳态微微网组建完成后,中心设备和所有的外围设备均在本地备份一张相同的操作类型和操作结果表;中心设备控制外围设备的活动状态。
优选的,所述中心设备控制外围设备的活动状态的步骤,包括:
移动终端通过Internet网络远程控制中心设备向外围设备发送自定义的控制请求信息,从而控制外围设备;
当外围设备收到中心设备发送的消息后,解析消息中的BT Address,并与本地的蓝牙地址匹配,如果匹配成功,则执行相应的操作;反之,不执行。
优选的,所述中心设备作为从机并处于可被发现角色,外围设备作为主机查询并对中心设备发起连接,组建微微网或散射网,当连接成功后中心设备获取外围设备的蓝牙地址,并记录外围设备已连接过中心设备的状态的步骤,具体包括:
中心设备作为从机并处于可被发现角色,第一外围设备作为主机查询并对中心设备发起L2CAP连接,组建单一从机的微微网,当连接成功后,中心设备获取第一外围设备的蓝牙地址,并记录第一外围设备已主动连接过中心设备的状态;
中心设备作为从机并处于可被发现角色,第二外围设备作为主机查询并对中心设备发起L2CAP连接,组建散射网,当连接成功后,中心设备获取第二外围设备的蓝牙地址,并记录第二外围设备已主动连接过中心设备 的状态;
当第一外围设备和第二外围设备均脱离过中心设备联网,且再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对第一外围设备和第二外围发起L2CAP连接请求,并将第一外围设备和第二外围设备拉入,建立具有双从机的稳态微微网;
中心设备作为从机并处于可被发现角色,当第三外围设备、第四外围设备、第五外围设备、第六外围设备和第七外围设备中的一个或多个作为主机查询并对中心设备发起L2CAP连接,组建散射网。
优选的,在所述当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配时的步骤之后,还包括:
向外围设备发送Payload格式的第一信息数据包;其中,所述第一信息数据包包括消息段的字节长度字段、消息段的发送蓝牙对象字段,消息段的操作类型字段、消息段的延时时长字段。
优选的,所述中心设备进行自动查询和标识匹配时,向外围设备发送Payload格式的信息数据包时,外围设备解析信息数据包中的消息段的发送蓝牙对象字段,当匹配时,外围设备则向中心设备发送Payload格式的第二信息数据包;其中所述第二信息数据包包括消息段的字节长度字段、外围设备自身蓝牙地址字段、操作结果字段。
本发明还提供了一种基于蓝牙组建稳态微微网的方法,其中,所述方法包括步骤:
中心设备作为从机并处于可被发现角色,至多7个外围设备作为主机查询并对中心设备发起L2CAP连接,组建微微网或散射网,当连接成功后中心设备获取外围设备的蓝牙地址,并记录外围设备已连接过中心设备的状态;
当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范 围时,中心设备进行自动查询和标识匹配,成功时则对外围设备发起L2CAP连接请求,并将外围设备拉入,建立稳态微微网。
所述基于蓝牙组建稳态微微网的方法,其中,所述中心设备作为从机并处于可被发现角色,至多7个外围设备作为主机查询并对中心设备发起L2CAP连接,组建微微网或散射网,当连接成功后中心设备获取外围设备的蓝牙地址,并记录外围设备已连接过中心设备的状态的步骤,具体包括:
中心设备作为从机并处于可被发现角色,第一外围设备作为主机查询并对中心设备发起L2CAP连接,组建单一从机的微微网,当连接成功后,中心设备获取第一外围设备的蓝牙地址,并记录第一外围设备已主动连接过中心设备的状态;
中心设备作为从机并处于可被发现角色,第二外围设备作为主机查询并对中心设备发起L2CAP连接,组建散射网,当连接成功后,中心设备获取第二外围设备的蓝牙地址,并记录第二外围设备已主动连接过中心设备的状态;
当第一外围设备和第二外围设备均脱离过中心设备联网,且再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对第一外围设备和第二外围发起L2CAP连接请求,并将第一外围设备和第二外围设备拉入,建立具有双从机的稳态微微网;
中心设备作为从机并处于可被发现角色,当第三外围设备、第四外围设备、第五外围设备、第六外围设备和第七外围设备中的一个或多个作为主机查询并对中心设备发起L2CAP连接,组建散射网。
所述基于蓝牙组建稳态微微网的方法,其中,所述建立稳态微微网的步骤之后,还包括:
当稳态微微网组建完成后,中心设备和所有的外围设备均在本地备份一张相同的操作类型和操作结果表。
所述基于蓝牙组建稳态微微网的方法,其中,在所述当所有外围设备 脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配时的步骤之后,还包括:向外围设备发送Payload格式的第一信息数据包;其中,所述第一信息数据包包括消息段的字节长度字段、消息段的发送蓝牙对象字段,消息段的操作类型字段、消息段的延时时长字段。
所述基于蓝牙组建稳态微微网的方法,其中,所述中心设备进行自动查询和标识匹配时,向外围设备发送Payload格式的信息数据包时,外围设备解析信息数据包中的消息段的发送蓝牙对象字段,当匹配时,外围设备则向中心设备发送Payload格式的第二信息数据包;其中所述第二信息数据包包括消息段的字节长度字段、外围设备自身蓝牙地址字段、操作结果字段。
本发明还提供了一种基于蓝牙组建稳态微微网的系统,其中,所述系统包括:
连接记录模块,用于中心设备作为从机并处于可被发现角色,至多7个外围设备作为主机查询并对中心设备发起L2CAP连接,组建微微网或散射网,当连接成功后中心设备获取外围设备的蓝牙地址,并记录外围设备已连接过中心设备的状态;
组网模块,用于当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对外围设备发起L2CAP连接请求,并将外围设备拉入,建立稳态微微网。
所述基于蓝牙组建稳态微微网的系统,其中,所述连接记录模块具体包括:
第一记录单元,用于中心设备作为从机并处于可被发现角色,第一外围设备作为主机查询并对中心设备发起L2CAP连接,组建单一从机的微微网,当连接成功后,中心设备获取第一外围设备的蓝牙地址,并记录第一外围设备已主动连接过中心设备的状态;
第二记录单元,用于中心设备作为从机并处于可被发现角色,第二外围设备作为主机查询并对中心设备发起L2CAP连接,组建散射网,当连接成功后,中心设备获取第二外围设备的蓝牙地址,并记录第二外围设备已主动连接过中心设备的状态;
第一微微网组网单元,用于当第一外围设备和第二外围设备均脱离过中心设备联网,且再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对第一外围设备和第二外围发起L2CAP连接请求,并将第一外围设备和第二外围设备拉入,建立具有双从机的稳态微微网;
散射网组网单元,用于中心设备作为从机并处于可被发现角色,当第三外围设备、第四外围设备、第五外围设备、第六外围设备和第七外围设备中的一个或多个作为主机查询并对中心设备发起L2CAP连接,组建散射网。
所述基于蓝牙组建稳态微微网的系统,其中,还包括:
备份模块,用于当稳态微微网组建完成后,中心设备和所有的外围设备均在本地备份一张相同的操作类型和操作结果表。
所述基于蓝牙组建稳态微微网的系统,其中,所述组网模块,还用于当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配时,向外围设备发送Payload格式的第一信息数据包;其中,所述第一信息数据包包括消息段的字节长度字段、消息段的发送蓝牙对象字段,消息段的操作类型字段、消息段的延时时长字段。
所述基于蓝牙组建稳态微微网的系统,其中,所述中心设备进行自动查询和标识匹配时,向外围设备发送Payload格式的信息数据包时,解析信息数据包中的消息段的发送蓝牙对象字段,当匹配时,外围设备则向中心设备发送Payload格式的第二信息数据包;其中所述第二信息数据包包括消息段的字节长度字段、外围设备自身蓝牙地址字段、操作结果字段。
本发明提供了一种基于蓝牙组建稳态微微网的方法及其系统,方法包括中心设备作为从机并处于可被发现角色,至多7个外围设备作为主机查询并对中心设备发起L2CAP连接,组建微微网或散射网,当连接成功后中心设备获取外围设备的蓝牙地址,并记录外围设备已连接过中心设备的状态;当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对外围设备发起L2CAP连接请求,并将外围设备拉入,建立稳态微微网。本发明中外围设备无需设置即可与中心设备进行连接,并只需通过中心设备就可控制外围设备执行业务,方便了用户。
附图说明
图1是本发明提供的多个蓝牙设备之间的网络拓扑结构示意图。
图2是本发明提供的基于蓝牙组建稳态微微网的方法较佳实施例的流程图。
图3为本发明提供的基于蓝牙组建稳态微微网的方法中记录蓝牙连接状态的具体流程图。
图4是本发明提供的基于蓝牙组建稳态微微网的系统较佳实施例的结构框图。
具体实施方式
为使本发明的目的、技术方案及优点更加清楚、明确,以下参照附图并举实施例对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
首先对传统蓝牙协议进行详细说明如下。
传统蓝牙的优点是传输数据量较大,数据传输速率也较快,适用于各种不同的实际应用。传统蓝牙协议的开发主要在逻辑链路控制与适配协议 (Logical Link Control and Adaptation Protocol,L2CAP),通用访问协议层(Generic Access Profile,GAP)和应用层(Application Profile),下面将分别作介绍。
1)逻辑链路控制与适配协议(L2CAP)
根据蓝牙联盟发布的传统蓝牙协议,逻辑链路控制与适配协议(Logical Link Control and Adaptation Protocol,L2CAP)定义了命令格式和数据格式。
两个蓝牙设备在通信过程中需要交互一系列的命令,命令信道的通用信令格式如表1所示。
Figure PCTCN2015092113-appb-000001
表1
其中,Length表示Commands的字节长度;Channel ID固定为0x0001;Commands中的Code表示命令的类型,如连接请求(Connection request),连接回复(Connection response),如表2所示;Commands中的Identifier用来匹配请求和回复;Commands中的Length表示Commands中的Data的字节长度;Commands中的Data表示命令可携带的信息。
Code Description
0x00 RESERVED
0x01 Commandreject
0x02 Connection request
0x03 Connection response
0x04 Configure request
0x05 Configure response
0x06 Disconnection request
0x07 Disconnection response
0x08 Echo request
0x09 Echo response
0x0A Information request
0x0B Information response
表2
连接请求的Commands格式如表3所示。其中,PSM表示协议/服务复用,分为两部分,第一部分固定由蓝牙联盟分配用作协议,第二部分由系 统动态分配用作服务,最少占2个字节长度;Source CID(源信道ID)表示发送连接请求的蓝牙设备的信道ID。
Figure PCTCN2015092113-appb-000002
表3
连接回复的Commands格式如表4所示。
Figure PCTCN2015092113-appb-000003
表4
其中,Destination CID(目的信道ID)表示发送连接回复的蓝牙设备的信道ID;Source CID(源信道ID)表示接收连接回复的蓝牙设备的信道ID,直接从连接请求命令的Source CID复制;Result表示连接请求信令的结果,例如连接成功(Connection successful)、待定(Connection pending)和拒绝(Connection refused),如表5所示;
Value Description
0x0000 Connection successful
0x0001 Connection pending
0x0002 Connection refused-PSM not supported
0x0003 Connection refused-security block
0x0004 Connection refused-no resources available
Other Reserved
表5
对于连接请求信令的结果为待定的情况,用Status来进一步阐述结果为待定的原因,如表6所示。
Value Description
0x0000 No further information available
0x0001 Authentication pending
0x0002 Authorization pending
Other Reserved
表6
两个蓝牙设备点对点建立连接后,数据包格式如表7所示。其中,Length 表示Information payload的字节长度;Channel ID表示目的信道的ID,由系统动态分配;Information payload表示数据包内容,长度可设置为0到65535字节。
Length Channel ID Information payload
m    
2 Bytes 2 Bytes m Bytes
表7
当三个或三个以上蓝牙设备连接成功,组成Piconet(微微网)时,主机发送的数据包格式如图8所示。其中,Length表示PSM和Information payload的字节总长度;Channel ID固定为0x0002;PSM表示协议/服务复用,分为两部分,第一部分固定由蓝牙联盟分配用作协议,第二部分由系统动态分配用作服务,最少占2个字节长度;Information payload表示数据包内容,长度可设置为0到65533字节。Piconet中从机发送的数据包格式如表7所示。
Length Channel ID PSM Information payload
m+n 0002    
2 Bytes 2 Bytes m(≥2)Bytes n Bytes
表8
通用访问协议(Generic Access Profile,GAP)定义了查询、可被发现、连接、可被连接和已连接等状态和流程。
蓝牙设备通过时分复用方式可以同时查询附近的蓝牙设备和被附近的蓝牙设备发现,即传统蓝牙设备可以同时担任查询设备(Inquiring device)和可被发现设备(Discoverable device)。查询设备通过查询获得可被发现设备的蓝牙地址。
查询设备和可被发现设备可能已经与另外一个蓝牙设备处于连接状态,但仍保持查询和可被发现功能。
蓝牙设备通过时分复用方式可以同时连接附近的蓝牙设备和被附近的 蓝牙设备连接,即蓝牙设备可以同时担任连接设备(Connecting device)和可被连接设备(Connectable device)。连接设备向可被连接设备发送连接请求(Connection Request);可被连接设备向连接设备发送连接回复(Connection Response)。连接成功后,发起连接的蓝牙设备在网络中成为主机(Master),被连接的蓝牙设备在网络中成为从机(Slave)。
连接设备和可被连接设备可能已经与另外一个蓝牙设备处于连接状态,但仍保持连接和可被连接功能。
当两个蓝牙设备成功连接后,可以互相发送字符串消息。两个蓝牙设备在保持连接的同时,具有查询、可被发现、连接、可被连接的功能。
多个蓝牙设备之间可以组成一个网络,网络拓扑结构如图1所示。在图1中共有3个微微网(Piconet),即以A为主机,B、C、D、E为从机的Piconet,以F为主机,E、G、H为从机的Piconet,以D为主机,J为从机的Piconet。Piconet由一个主机和一到七个从机组成。在Piconet中,主机可以同时向网络中的所有从机发送字符串消息,所有从机可以单独向主机发送字符串消息。
Piconet A和Piconet F,Piconet A和Piconet D两两之间有蓝牙设备交集,因此,Piconet A和Piconet F,Piconet A和Piconet D以及三个Piconet形成散射网(Scatternet)。例如,在Piconet A和Piconet F组成的Scatternet中,E可以同时向A和F发送字符串消息;在Piconet A和Piconet D组成的Scatternet中,D可以同时向A和J发送字符串消息。
本发明结合传统蓝牙的特点,提供了一种基于蓝牙组建稳态微微网的方法。请参见图2,图2是本发明提供的基于蓝牙组建稳态微微网的方法较佳实施例的流程图。如图2所示,所述基于蓝牙组建稳态微微网的方法,包括步骤:
步骤S100、中心设备作为从机并处于可被发现角色,至多7个外围设备作为主机查询并对中心设备发起L2CAP连接,组建微微网或散射网,当 连接成功后中心设备获取外围设备的蓝牙地址,并记录外围设备已连接过中心设备的状态;
步骤S200、当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对外围设备发起L2CAP连接请求,并将外围设备拉入,建立稳态微微网。
进一步的,如图3所示,所述步骤S100具体包括:
步骤S101、中心设备作为从机并处于可被发现角色,第一外围设备作为主机查询并对中心设备发起L2CAP连接,组建单一从机的微微网,当连接成功后,中心设备获取第一外围设备的蓝牙地址,并记录第一外围设备已主动连接过中心设备的状态;
步骤S102、中心设备作为从机并处于可被发现角色,第二外围设备作为主机查询并对中心设备发起L2CAP连接,组建散射网,当连接成功后,中心设备获取第二外围设备的蓝牙地址,并记录第二外围设备已主动连接过中心设备的状态;
步骤S103、当第一外围设备和第二外围设备均脱离过中心设备联网,且再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对第一外围设备和第二外围发起L2CAP连接请求,并将第一外围设备和第二外围设备拉入,建立具有双从机的稳态微微网;
步骤S104、中心设备作为从机并处于可被发现角色,当第三外围设备、第四外围设备、第五外围设备、第六外围设备和第七外围设备中的一个或多个作为主机查询并对中心设备发起L2CAP连接,组建散射网。
组网完成后,中心设备得到外围设备的蓝牙地址,并有外围设备主动连接过的标识,中心设备会持续查询。当外围设备脱离网络又重新进入中心设备的查询范围内后,中心设备会自动查询,并根据标识对外围设备发起L2CAP连接,将外围设备拉入网络,就如WIFI设备会自动连接之前连过的WIFI网络。
中心设备能自动查询并判断连接智能家庭中的空调、热水器、洗衣机等外围设备,而移动终端可通过Internet网络远程控制中心设备从而控制智能家庭。在某些场景可用到稳态Piconet组网,如断电后恢复,中心设备会自动查询、匹配标识、并和智能家庭中的设备建立BT的L2CAP连接,而不用手动去逐个建立连接。当外围设备连接过中心设备后,断开与中心设备的连接并重新进入中心设备的查询范围,中心设备会自动查询,并根据是否连接过的标识进行匹配,若匹配成功则发起L2CAP连接。
当Piconet稳态网络创建完成后,中心设备可以控制外围设备的活动状态,例如立即开、立即关、延时开、延时关等操作,因此,中心设备和所有的外围设备需在本地备份一张相同的操作类型和操作结果表,以便能够正确地编码和译码,如表9所示。
Operation Code Description
0000 Central asks peripheral to open immediately
0001 Central asks peripheral to close immediately
0010 Central asks peripheral to open after a delayedtime
0011 Central asks peripheral to close after a delayedtime
0100 Peripheral opens successfully
0101 Peripheral opens unsuccessfully
0110 Peripheral closes successfully
0111 Peripheral closes unsuccessfully
Other Reserved
表9
中心设备基于表8将Information payload自定义成如表10所示的第一信息数据包;所述第一信息数据包包括消息段的字节长度字段、消息段的发送蓝牙对象字段,消息段的操作类型字段、消息段的延时时长字段。其中,Message表示中心设备向所有外围设备发送的消息段;Message中的Length表示Message的字节长度,但不包含Length本身占的一个字节长度;BT Address用来指定消息段的发送蓝牙设备对象;Operation Type表示操作类型,如表9所示;Delay表示延时的分钟数,如果该操作带有延时功能的话,2字节的长度可表示24小时的分钟数。
Figure PCTCN2015092113-appb-000004
表10
当外围设备收到上述中心设备发送的消息后,解析消息中的BT Address,并与本地的蓝牙地址匹配,如果匹配成功,则执行相应的操作;反之,不执行。
在匹配的情况下,外围设备将操作结果发送给中心设备,外围设备基于表7将Information payload自定义成如表11所示的第二信息数据包;所述第二信息数据包包括消息段的字节长度字段、外围设备自身蓝牙地址字段、操作结果字段。其中,Length表示消息的字节长度,但不包含Length本身占的一个字节长度;BT Address表示外围设备本身的蓝牙地址;Operation Result表示操作结果,如表9所示。
Figure PCTCN2015092113-appb-000005
表11
本发明提供的基于蓝牙组建稳态微微网的方法是一种基于传统蓝牙作为无线通信方式,中心设备自动查询、匹配和连接外围设备。在组网过程中,外围设备只需主动连接中心设备一次,后续只要进入中心设备的查询范围内后,中心设备会自动查询,并根据标识对外围设备发起L2CAP连接,就如WIFI设备会自动连接之前连过的WIFI网络。当组网完成后,用户使用移动终端可通过Internet网络远程控制中心设备向外围设备发送自定义的控制请求信息,从而控制外围设备,形成智能网络。
基于上述方法实施例,本发明还提供一种基于蓝牙组建稳态微微网的 系统,如图4所示,包括:
连接记录模块100,用于中心设备作为从机并处于可被发现角色,至多7个外围设备作为主机查询并对中心设备发起L2CAP连接,组建微微网或散射网,当连接成功后中心设备获取外围设备的蓝牙地址,并记录外围设备已连接过中心设备的状态;
组网模块200,用于当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对外围设备发起L2CAP连接请求,并将外围设备拉入,建立稳态微微网。
进一步的,在所述基于蓝牙组建稳态微微网的系统中,所述连接记录模块100具体包括:
第一记录单元,用于中心设备作为从机并处于可被发现角色,第一外围设备作为主机查询并对中心设备发起L2CAP连接,组建单一从机的微微网,当连接成功后,中心设备获取第一外围设备的蓝牙地址,并记录第一外围设备已主动连接过中心设备的状态;
第二记录单元,用于中心设备作为从机并处于可被发现角色,第二外围设备作为主机查询并对中心设备发起L2CAP连接,组建散射网,当连接成功后,中心设备获取第二外围设备的蓝牙地址,并记录第二外围设备已主动连接过中心设备的状态;
第一微微网组网单元,用于当第一外围设备和第二外围设备均脱离过中心设备联网,且再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对第一外围设备和第二外围发起L2CAP连接请求,并将第一外围设备和第二外围设备拉入,建立具有双从机的稳态微微网;
散射网组网单元,用于中心设备作为从机并处于可被发现角色,当第三外围设备、第四外围设备、第五外围设备、第六外围设备和第七外围设备中的一个或多个作为主机查询并对中心设备发起L2CAP连接,组建散射网。
进一步的,在所述基于蓝牙组建稳态微微网的系统中,还包括:
备份模块,用于当稳态微微网组建完成后,中心设备和所有的外围设备均在本地备份一张相同的操作类型和操作结果表。
进一步的,在所述基于蓝牙组建稳态微微网的系统中,所述组网模块200中当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配时,向外围设备发送Payload格式的第一信息数据包;其中,所述第一信息数据包包括消息段的字节长度字段、消息段的发送蓝牙对象字段,消息段的操作类型字段、消息段的延时时长字段。
进一步的,在所述基于蓝牙组建稳态微微网的系统中,所述中心设备进行自动查询和标识匹配时,向外围设备发送Payload格式的信息数据包时,外围设备解析信息数据包中的消息段的发送蓝牙对象字段,当匹配时,外围设备则向中心设备发送Payload格式的第二信息数据包;其中所述第二信息数据包包括消息段的字节长度字段、外围设备自身蓝牙地址字段、操作结果字段。
综上所述,本发明提供了一种基于蓝牙组建稳态微微网的方法及其系统,方法包括中心设备作为从机并处于可被发现角色,至多7个外围设备作为主机查询并对中心设备发起L2CAP连接,组建微微网或散射网,当连接成功后中心设备获取外围设备的蓝牙地址,并记录外围设备已连接过中心设备的状态;当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对外围设备发起L2CAP连接请求,并将外围设备拉入,建立稳态微微网。本发明中外围设备无需设置即可与中心设备进行连接,并只需通过中心设备就可控制外围设备执行业务,方便了用户。
应当理解的是,本发明的应用不限于上述的举例,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,所有这些改进和变换都应 属于本发明所附权利要求的保护范围。

Claims (15)

  1. 一种基于蓝牙组建稳态微微网的方法,其中所述方法包括以下步骤:
    中心设备作为从机并处于可被发现角色,外围设备作为主机查询并对中心设备发起连接,组建微微网或散射网,当连接成功后中心设备获取外围设备的蓝牙地址,并记录外围设备已连接过中心设备的状态;
    当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对外围设备发起连接请求,并将外围设备拉入,建立稳态微微网;
    当稳态微微网组建完成后,中心设备和所有的外围设备均在本地备份一张相同的操作类型和操作结果表;中心设备控制外围设备的活动状态。
  2. 根据权利要求1所述基于蓝牙组建稳态微微网的方法,其中所述中心设备控制外围设备的活动状态的步骤,包括:
    移动终端通过Internet网络远程控制中心设备向外围设备发送自定义的控制请求信息,从而控制外围设备;
    当外围设备收到中心设备发送的消息后,解析消息中的BT Address,并与本地的蓝牙地址匹配,如果匹配成功,则执行相应的操作;反之,不执行。
  3. 根据权利要求1所述基于蓝牙组建稳态微微网的方法,其中所述中心设备作为从机并处于可被发现角色,外围设备作为主机查询并对中心设备发起连接,组建微微网或散射网,当连接成功后中心设备获取外围设备的蓝牙地址,并记录外围设备已连接过中心设备的状态的步骤,具体包括:
    中心设备作为从机并处于可被发现角色,第一外围设备作为主机查询并对中心设备发起L2CAP连接,组建单一从机的微微网,当连接成功后,中心设备获取第一外围设备的蓝牙地址,并记录第一外围设备已主动连接过中心设备的状态;
    中心设备作为从机并处于可被发现角色,第二外围设备作为主机查询 并对中心设备发起L2CAP连接,组建散射网,当连接成功后,中心设备获取第二外围设备的蓝牙地址,并记录第二外围设备已主动连接过中心设备的状态;
    当第一外围设备和第二外围设备均脱离过中心设备联网,且再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对第一外围设备和第二外围发起L2CAP连接请求,并将第一外围设备和第二外围设备拉入,建立具有双从机的稳态微微网;
    中心设备作为从机并处于可被发现角色,当第三外围设备、第四外围设备、第五外围设备、第六外围设备和第七外围设备中的一个或多个作为主机查询并对中心设备发起L2CAP连接,组建散射网。
  4. 根据权利要求1所述基于蓝牙组建稳态微微网的方法,其中在所述当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配时的步骤之后,还包括:
    向外围设备发送Payload格式的第一信息数据包;其中,所述第一信息数据包包括消息段的字节长度字段、消息段的发送蓝牙对象字段,消息段的操作类型字段、消息段的延时时长字段。
  5. 根据权利要求4所述基于蓝牙组建稳态微微网的方法,其中所述中心设备进行自动查询和标识匹配时,向外围设备发送Payload格式的信息数据包时,外围设备解析信息数据包中的消息段的发送蓝牙对象字段,当匹配时,外围设备则向中心设备发送Payload格式的第二信息数据包;其中所述第二信息数据包包括消息段的字节长度字段、外围设备自身蓝牙地址字段、操作结果字段。
  6. 一种基于蓝牙组建稳态微微网的方法,其中所述方法包括步骤:
    中心设备作为从机并处于可被发现角色,至多7个外围设备作为主机查询并对中心设备发起L2CAP连接,组建微微网或散射网,当连接成功后中心设备获取外围设备的蓝牙地址,并记录外围设备已连接过中心设备的 状态;
    当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对外围设备发起L2CAP连接请求,并将外围设备拉入,建立稳态微微网。
  7. 根据权利要求6所述基于蓝牙组建稳态微微网的方法,其中所述中心设备作为从机并处于可被发现角色,外围设备作为主机查询并对中心设备发起连接,组建微微网或散射网,当连接成功后中心设备获取外围设备的蓝牙地址,并记录外围设备已连接过中心设备的状态的步骤,具体包括:
    中心设备作为从机并处于可被发现角色,第一外围设备作为主机查询并对中心设备发起L2CAP连接,组建单一从机的微微网,当连接成功后,中心设备获取第一外围设备的蓝牙地址,并记录第一外围设备已主动连接过中心设备的状态;
    中心设备作为从机并处于可被发现角色,第二外围设备作为主机查询并对中心设备发起L2CAP连接,组建散射网,当连接成功后,中心设备获取第二外围设备的蓝牙地址,并记录第二外围设备已主动连接过中心设备的状态;
    当第一外围设备和第二外围设备均脱离过中心设备联网,且再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对第一外围设备和第二外围发起L2CAP连接请求,并将第一外围设备和第二外围设备拉入,建立具有双从机的稳态微微网;
    中心设备作为从机并处于可被发现角色,当第三外围设备、第四外围设备、第五外围设备、第六外围设备和第七外围设备中的一个或多个作为主机查询并对中心设备发起L2CAP连接,组建散射网。
  8. 根据权利要求6所述基于蓝牙组建稳态微微网的方法,其中所述建立稳态微微网的步骤之后,还包括:
    当稳态微微网组建完成后,中心设备和所有的外围设备均在本地备份 一张相同的操作类型和操作结果表。
  9. 根据权利要求6所述基于蓝牙组建稳态微微网的方法,其中在所述当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配时的步骤之后,还包括:
    向外围设备发送Payload格式的第一信息数据包;其中,所述第一信息数据包包括消息段的字节长度字段、消息段的发送蓝牙对象字段,消息段的操作类型字段、消息段的延时时长字段。
  10. 根据权利要求9所述基于蓝牙组建稳态微微网的方法,其中所述中心设备进行自动查询和标识匹配时,向外围设备发送Payload格式的信息数据包时,外围设备解析信息数据包中的消息段的发送蓝牙对象字段,当匹配时,外围设备则向中心设备发送Payload格式的第二信息数据包;其中所述第二信息数据包包括消息段的字节长度字段、外围设备自身蓝牙地址字段、操作结果字段。
  11. 一种基于蓝牙组建稳态微微网的系统,其中所述系统包括:
    连接记录模块,用于中心设备作为从机并处于可被发现角色,至多7个外围设备作为主机查询并对中心设备发起L2CAP连接,组建微微网或散射网,当连接成功后中心设备获取外围设备的蓝牙地址,并记录外围设备已连接过中心设备的状态;
    组网模块,用于当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对外围设备发起L2CAP连接请求,并将外围设备拉入,建立稳态微微网。
  12. 根据权利要求11所述基于蓝牙组建稳态微微网的系统,其中所述连接记录模块具体包括:
    第一记录单元,用于中心设备作为从机并处于可被发现角色,第一外围设备作为主机查询并对中心设备发起L2CAP连接,组建单一从机的微微网,当连接成功后,中心设备获取第一外围设备的蓝牙地址,并记录第一 外围设备已主动连接过中心设备的状态;
    第二记录单元,用于中心设备作为从机并处于可被发现角色,第二外围设备作为主机查询并对中心设备发起L2CAP连接,组建散射网,当连接成功后,中心设备获取第二外围设备的蓝牙地址,并记录第二外围设备已主动连接过中心设备的状态;
    第一微微网组网单元,用于当第一外围设备和第二外围设备均脱离过中心设备联网,且再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配,成功时则对第一外围设备和第二外围发起L2CAP连接请求,并将第一外围设备和第二外围设备拉入,建立具有双从机的稳态微微网;
    散射网组网单元,用于中心设备作为从机并处于可被发现角色,当第三外围设备、第四外围设备、第五外围设备、第六外围设备和第七外围设备中的一个或多个作为主机查询并对中心设备发起L2CAP连接,组建散射网。
  13. 根据权利要求11所述基于蓝牙组建稳态微微网的系统,其中所述系统还包括:
    备份模块,用于当稳态微微网组建完成后,中心设备和所有的外围设备均在本地备份一张相同的操作类型和操作结果表。
  14. 根据权利要求11所述基于蓝牙组建稳态微微网的系统,其中所述组网模块,还用于当所有外围设备脱离过中心设备联网,并再次进入中心设备的查询范围时,中心设备进行自动查询和标识匹配时,向外围设备发送Payload格式的第一信息数据包;其中,所述第一信息数据包包括消息段的字节长度字段、消息段的发送蓝牙对象字段,消息段的操作类型字段、消息段的延时时长字段。
  15. 根据权利要求14所述基于蓝牙组建稳态微微网的系统,其中所述中心设备进行自动查询和标识匹配时,向外围设备发送Payload格式的信息数据包时,外围设备解析信息数据包中的消息段的发送蓝牙对象字段,当 匹配时,外围设备则向中心设备发送Payload格式的第二信息数据包;其中所述第二信息数据包包括消息段的字节长度字段、外围设备自身蓝牙地址字段、操作结果字段。
PCT/CN2015/092113 2015-04-23 2015-10-16 一种基于蓝牙组建稳态微微网的方法及其系统 WO2016169231A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US15/100,790 US9872128B2 (en) 2015-04-23 2015-10-16 Method of establishing stable Piconet and system of establishment of stable Piconet based on bluetooth
EP15853637.5A EP3288296B1 (en) 2015-04-23 2015-10-16 Method and system for building steady piconet based on bluetooth

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510195906.8 2015-04-23
CN201510195906.8A CN104883656B (zh) 2015-04-23 2015-04-23 一种基于蓝牙组建稳态微微网的方法及其系统

Publications (1)

Publication Number Publication Date
WO2016169231A1 true WO2016169231A1 (zh) 2016-10-27

Family

ID=53950960

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/092113 WO2016169231A1 (zh) 2015-04-23 2015-10-16 一种基于蓝牙组建稳态微微网的方法及其系统

Country Status (4)

Country Link
US (1) US9872128B2 (zh)
EP (1) EP3288296B1 (zh)
CN (1) CN104883656B (zh)
WO (1) WO2016169231A1 (zh)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104883656B (zh) 2015-04-23 2018-10-26 惠州Tcl移动通信有限公司 一种基于蓝牙组建稳态微微网的方法及其系统
CN105430597A (zh) * 2015-10-30 2016-03-23 南京网河智能科技有限公司 一种蓝牙设备及其蓝牙散射网组网方法和装置
CN105704535B (zh) * 2016-03-22 2018-09-04 广东欧珀移动通信有限公司 一种音视频播放系统控制方法、装置和音视频播放系统
WO2017193385A1 (zh) * 2016-05-13 2017-11-16 华为技术有限公司 无线连接建立方法及设备
US10405121B2 (en) 2016-08-25 2019-09-03 Gary Reifel Wireless splitter-repeater hub
CN106658377B (zh) * 2016-12-26 2020-04-14 广州立功科技股份有限公司 低功耗蓝牙的通信方法以及装置
CN106900035A (zh) * 2017-01-19 2017-06-27 宇龙计算机通信科技(深圳)有限公司 一种终端通信方法、系统及接入终端
CN110166988B (zh) * 2018-02-13 2022-03-11 盛微先进科技股份有限公司 一种无线通信系统及其方法
CN108494610B (zh) * 2018-05-23 2021-03-23 南京邮电大学 基于6LoBLE的低功耗蓝牙IPv6地址自动配置方法
US11265331B2 (en) * 2019-10-15 2022-03-01 Palo Alto Research Center Incorporated Bluetooth hub device mediating connections between mobile device and controlled device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101959328A (zh) * 2009-07-17 2011-01-26 中兴通讯股份有限公司 基于微微小区基站实现家电智能控制的方法及系统
WO2014065903A2 (en) * 2012-10-22 2014-05-01 Arbitron, Inc. Systems and methods for wirelessly modifying detection characteristics of portable devices
CN104022805A (zh) * 2014-06-06 2014-09-03 深圳市爱美家电子科技有限公司 一种主从端蓝牙设备连接方法及装置
CN104483841A (zh) * 2014-12-22 2015-04-01 深圳市高为通信技术有限公司 智能家居网络系统和智能家居控制方法
CN104883656A (zh) * 2015-04-23 2015-09-02 惠州Tcl移动通信有限公司 一种基于蓝牙组建稳态微微网的方法及其系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2376595A1 (en) * 2000-06-13 2001-12-20 Red-M (Communications) Ltd. A communications device
US6954438B2 (en) * 2001-02-21 2005-10-11 3Com Corporation Wireless callback access control for a LAN network access point
US8014392B2 (en) * 2008-03-11 2011-09-06 Broadcom Corporation Method and system for advertising bluetooth multicast feature
GB2459479B8 (en) * 2008-04-23 2012-08-08 Bigger Than The Wheel Ltd Short range RF monitoring system
CN104539325B (zh) * 2014-12-25 2017-05-10 惠州Tcl移动通信有限公司 一种基于低功耗蓝牙微微网的组网互连方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101959328A (zh) * 2009-07-17 2011-01-26 中兴通讯股份有限公司 基于微微小区基站实现家电智能控制的方法及系统
WO2014065903A2 (en) * 2012-10-22 2014-05-01 Arbitron, Inc. Systems and methods for wirelessly modifying detection characteristics of portable devices
CN104022805A (zh) * 2014-06-06 2014-09-03 深圳市爱美家电子科技有限公司 一种主从端蓝牙设备连接方法及装置
CN104483841A (zh) * 2014-12-22 2015-04-01 深圳市高为通信技术有限公司 智能家居网络系统和智能家居控制方法
CN104883656A (zh) * 2015-04-23 2015-09-02 惠州Tcl移动通信有限公司 一种基于蓝牙组建稳态微微网的方法及其系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3288296A4 *

Also Published As

Publication number Publication date
EP3288296A1 (en) 2018-02-28
US20170118582A1 (en) 2017-04-27
EP3288296B1 (en) 2021-08-04
US9872128B2 (en) 2018-01-16
EP3288296A4 (en) 2018-12-05
CN104883656B (zh) 2018-10-26
CN104883656A (zh) 2015-09-02

Similar Documents

Publication Publication Date Title
WO2016169231A1 (zh) 一种基于蓝牙组建稳态微微网的方法及其系统
CN110912789B (zh) 一种基于阿里云IoT Hub平台的智能家居物联网通信方法
WO2017000619A1 (zh) 基于低功耗蓝牙和传统蓝牙的微微网组网互连方法及系统
US10116501B2 (en) Method and apparatus for inter-profile commissioning in a network
WO2020223854A1 (zh) 设备配网方法、装置、电子设备及存储介质
CN113572799B (zh) 设备接入控制平台的方法、装置和服务器
RU2584499C2 (ru) Способ функционирования и ввода в действие устройств в сети zigbee
CN105471686A (zh) 终端控制方法、装置及系统
CN104320494A (zh) 一种基于云技术及物联网技术的智能家居门铃系统
WO2016155286A1 (zh) 一种基于蓝牙的多设备智能互连方法及系统
US10797944B2 (en) Zigbee light link network commissioning
WO2003003659A1 (fr) Dispositif et procede, en controle de radiocommunications, support d'informations, et programme
JP2012529833A (ja) 無線ネットワークシステムの先進の試運転
CN111010324A (zh) 一种基于ble mesh网络协议的家电设备自组网方法和系统
WO2017101050A1 (zh) 智能家居设备的控制方法、控制面板及控制系统
US20110213876A1 (en) Using a service discovery request to find available devices
JP2020532925A (ja) シングルホップ接続を使用したマルチホップネットワークにおけるコミッショニング
CN204231419U (zh) 一种基于云技术及物联网技术的智能家居门铃系统
JP2016524422A (ja) コンフィギュレーション接続装置
CN111372222A (zh) 设备连接方法、系统以及相应的终端设备和服务器
WO2017219519A1 (zh) 设备的控制方法、装置及系统
CN113794996B (zh) 设备通信、设备控制方法、装置、电子设备和存储介质
CN105099836A (zh) Ble智能节点控制方法和系统
WO2019120188A1 (zh) 一种自动切换通信方式的方法、终端及智能设备
JP3838130B2 (ja) 電源コントロール方法

Legal Events

Date Code Title Description
REEP Request for entry into the european phase

Ref document number: 2015853637

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 15100790

Country of ref document: US

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15853637

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2015853637

Country of ref document: EP