CN112312361B - Host slave pairing method and system - Google Patents

Host slave pairing method and system Download PDF

Info

Publication number
CN112312361B
CN112312361B CN202011045044.8A CN202011045044A CN112312361B CN 112312361 B CN112312361 B CN 112312361B CN 202011045044 A CN202011045044 A CN 202011045044A CN 112312361 B CN112312361 B CN 112312361B
Authority
CN
China
Prior art keywords
slave
pairing
machine
host
slave machine
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202011045044.8A
Other languages
Chinese (zh)
Other versions
CN112312361A (en
Inventor
周潇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
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 Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202011045044.8A priority Critical patent/CN112312361B/en
Publication of CN112312361A publication Critical patent/CN112312361A/en
Application granted granted Critical
Publication of CN112312361B publication Critical patent/CN112312361B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • 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
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W80/00Wireless network protocols or protocol adaptations to wireless operation
    • H04W80/08Upper layer protocols
    • H04W80/12Application layer protocols, e.g. WAP [Wireless Application Protocol]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a method and a system for pairing host and slave. The slave comprises a first slave and at least one second slave; the first slave machine, the second slave machine and the host machine have the same communication protocol, the first slave machine is matched and connected to the host machine, and the second slave machine is not matched and connected to the host machine; when the second slave machine and the host machine are in pairing connection, the method comprises the following steps: the first slave machine and the second slave machine complete pairing connection, and pairing information of the second slave machine is obtained; the first slave machine sends the pairing information of the second slave machine to the host machine so that the host machine performs forced handshake pairing with the second slave machine according to the pairing information of the second slave machine. The method of the application makes the pairing connection process more interesting, and is especially suitable for game scenes in which the communication protocol is a private protocol.

Description

Host slave pairing method and system
Technical Field
The invention belongs to the technical field of wireless communication, and particularly relates to a method and a system for pairing host computers and slave computers.
Background
The electronic device such as the wireless communication handle can be used as a slave device for controlling the host device. The host comprises a mobile phone, a game machine, a virtual display device and the like. In general, there will not be only one slave, and there will be multiple slave devices for controlling the host, especially on a handheld gaming machine, home gaming host device. When the host is started, the slave devices which are already connected in a matched mode can be automatically connected, and when the host needs to be connected with the new slave devices, in the prior art, the matching operation needs to be carried out on the host system, the new slave devices are connected to the host, and therefore initiative of the matching operation is in the host system, the matching operation is single, and the sensitivity is poor.
Disclosure of Invention
Aiming at the current situation that the host slave machine pairing mode is single and tedious, the host slave machine pairing method with strong interest is provided.
According to an aspect of the present application, there is provided a master-slave pairing method, the slave including a first slave and at least one second slave; the first slave, the second slave and the host have the same communication protocol with each other, and the first slave is already paired to the host, and the second slave is not yet paired to the host; when the second slave machine and the host machine are in pairing connection, the method comprises the following steps:
the first slave machine and the second slave machine complete pairing connection, and pairing information of the second slave machine is obtained;
and the first slave machine sends the pairing information of the second slave machine to the host machine so that the host machine performs forced handshake pairing with the second slave machine according to the pairing information of the second slave machine.
Optionally, in the above method for pairing a master slave, the first slave and the second slave complete pairing connection, and the obtaining pairing information of the second slave includes:
the first slave machine and the second slave machine are both set to a corresponding pairing mode, wherein the first slave machine is set to a receiving mode, the second slave machine is set to a transmitting mode, and the second slave machine externally broadcasts own pairing information through a broadcast message;
when the distance between the first slave machine and the second slave machine is smaller than the communication distance, the first slave machine receives a broadcast message of the second slave machine;
the first slave machine analyzes the received broadcast message of the second slave machine to obtain the pairing information of the second slave machine, and judges whether the pairing information of the second slave machine meets the preset pairing requirement;
and when judging that the pairing information of the second slave machine accords with the preset pairing requirement, the first slave machine temporarily stores the pairing information of the second slave machine and completes pairing handshake with the second slave machine.
Optionally, in the method for pairing the master slave, the broadcast message of the second slave includes at least a start tag, a stop tag, and pairing information;
pairing information of the second slave is between the start mark and the end mark;
when the first slave receives the broadcast message, analyzing the information between the start mark and the end mark to obtain the pairing information of the second slave;
the pairing information of the second slave machine at least comprises a device mark and a device type which are uniquely corresponding to the second slave machine.
Optionally, in the above method for pairing master slaves, the second slave has a plurality of second slaves,
and when the first slave machine receives the broadcast messages of the second slave machines, distinguishing the second slave machines according to the analyzed equipment marks, and carrying out pairing handshake with each second slave machine in sequence according to the time sequence of the received broadcast messages of the second slave machines.
Optionally, in the method for pairing a master slave, the performing, by the master, forced handshake pairing with the second slave according to pairing information of the second slave includes:
the host analyzes the pairing information of the second slave machine sent by the first slave machine, obtains a device mark uniquely corresponding to the second slave machine and stores the device mark;
the host performs forced handshake pairing with the second slave according to the equipment mark uniquely corresponding to the second slave, and prompts a user after the pairing is completed;
the method for prompting the user comprises the following steps:
prompting, by the host, that the second host and the host are successfully connected;
and/or prompting, by the second host, that the second host is successfully connected with the host. According to another aspect of the present application, there is provided a master slave pairing system, the system comprising a master, a first slave and at least one second slave; the first slave, the second slave and the host have the same communication protocol with each other, and the first slave is already paired to the host, and the second slave is not yet paired to the host; when the second slave and the master are in pairing connection,
the first slave machine and the second slave machine complete pairing connection, and pairing information of the second slave machine is obtained;
the first slave machine sends pairing information of the second slave machine to the master machine;
and the host performs forced handshake pairing with the second slave according to the pairing information of the second slave.
Optionally, in the above master slave pairing system, when the first slave and the second slave pair and connect, the first slave and the second slave are both set to corresponding pairing modes, where the first slave is set to a receiving mode, the second slave is set to a transmitting mode, and the second slave broadcasts its own pairing information externally through a broadcast message;
when the distance between the first slave machine and the second slave machine is smaller than the communication distance, the first slave machine receives a broadcast message of the second slave machine;
the first slave analyzes the received broadcast message of the second slave to obtain the pairing information of the second slave, and judges whether the pairing information of the second slave meets the preset pairing requirement;
and when judging that the pairing information of the second slave machine accords with the preset pairing requirement, the first slave machine temporarily stores the pairing information of the second slave machine and completes pairing handshake with the second slave machine.
Optionally, in the master slave pairing system, the broadcast message of the second slave includes at least a start tag, a stop tag, and pairing information;
pairing information of the second slave is between the start mark and the end mark;
when the first slave receives the broadcast message, analyzing the information between the start mark and the end mark to obtain the pairing information of the second slave;
the pairing information of the second slave machine at least comprises a device mark and a device type which are uniquely corresponding to the second slave machine.
Optionally, in the master slave pairing system, the second slave has a plurality of slaves,
and when the first slave machine receives the broadcast messages of the second slave machines, distinguishing the second slave machines according to the analyzed equipment marks, and carrying out pairing handshake with each second slave machine in sequence according to the time sequence of the received broadcast messages of the second slave machines.
Optionally, in the above master slave pairing system, after the master receives the pairing information of the second slave sent by the first slave, the master analyzes the pairing information of the second slave to obtain a device mark uniquely corresponding to the second slave and stores the device mark;
the host performs forced handshake pairing with the second slave according to the equipment mark, and prompts a user after the pairing is completed;
the method for prompting the user comprises the following steps:
prompting, by the host, that the second host and the host are successfully connected;
and/or prompting, by the second host, that the second host is successfully connected with the host. The beneficial effects of this application lie in:
different from a pairing connection mode in the prior art that a host is used as the main unit between a host and a slave, the application provides a new pairing method, wherein a first slave which is already paired with the host is firstly paired with a second slave which is not yet paired with the host, pairing information of the second slave is obtained and sent to the host, and then the host performs forced handshake pairing with the second slave according to the received pairing information of the second slave. When a user wants to temporarily connect a new remote control device or a friend of the user wants to connect a host device of the user by using the remote control device carried by the user, the pairing connection process is more interesting by adopting the method, and the method is particularly suitable for a game scene with a private communication protocol.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification in order to make the technical means of the present application more clearly understood, and in order to make the above-mentioned and other objects, features and advantages of the present application more clearly understood, the following detailed description of the present application will be given.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 illustrates a master slave pairing method according to one embodiment of the present application;
FIG. 2 illustrates a master slave pairing method according to another embodiment of the present application;
FIG. 3 illustrates a master slave pairing system according to one embodiment of the application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The concept of the present application is to provide a new pairing method for a single pairing mode of a host and a slave in the prior art, when a slave (hereinafter referred to as a second slave) which is not paired with a host device needs to be paired with the host device, the second slave is first paired with a slave (hereinafter referred to as a first slave) which is already paired with the host successfully, and after the first slave and the second slave are paired successfully, the first slave sends information of the second slave to the host, so that the host and the second slave complete forced pairing.
FIG. 1 illustrates a master slave pairing method according to one embodiment of the present application. The slave comprises a first slave and at least one second slave; the first slave, the second slave and the host have the same communication protocol, and the first slave is already paired to connect to the host, and the second slave is not yet paired to connect to the host.
In the application, the slave comprises a wireless communication handle and the like, and can be used as a remote controller to control the host; the host computer comprises a game machine, virtual reality glasses, virtual display equipment and other equipment.
The application is implemented in a situation that the first slave, the second slave and the host have the same communication protocol, and the first slave is already paired to connect to the host, and the second slave is not yet paired to connect to the host.
The communication protocol can be any one of the prior art, such as ZigBee wireless protocol, bluetooth communication protocol and the like, and the application is recommended to be more suitable for private communication protocols, such as game scenes. The first slave, the second slave and the master are required to have the same communication protocol with each other because the master and the slave can be paired only if the wireless communication protocol used by the master and the slave are identical, which is a precondition that the master slave can be paired successfully.
The first slave generally refers to one of a plurality of slaves in a successfully paired connection with the master, the first slave also being referred to as an old slave; the second slave machine generally refers to a slave machine which has not yet formed a mating connection with the master machine, and may also be referred to as a new slave machine, and may also include a plurality of slave machines.
As shown in fig. 1, when the second slave and the master are in pairing connection, the pairing method includes:
and step S110, the first slave machine and the second slave machine finish pairing connection, and pairing information of the second slave machine is obtained.
The first slave acts as an old slave and is already coupled to the master, and the second slave acts as a new slave and is not yet coupled to the master. When the second slave computer wants to connect to the host computer, the second slave computer is not directly connected with the host computer, but the first slave computer completes pairing connection with the second slave computer.
The pairing connection method may be any one of the prior arts, such as bluetooth connection, where the communication protocol is a private communication protocol, and the pairing connection is implemented according to the private communication protocol, and after the pairing connection between the first slave and the second slave is successful, the first slave obtains pairing information of the second slave, such as a device model of the second slave, a device ID of the second slave, and so on.
And step S120, the first slave machine sends the pairing information of the second slave machine to the host machine so that the host machine performs forced handshake pairing with the second slave machine according to the pairing information of the second slave machine.
After the first slave machine and the second slave machine are successfully paired and connected, the first slave machine sends pairing information of the second slave machine to the host machine, the host machine judges whether the second slave machine meets the pairing requirement of the second slave machine after obtaining the pairing information of the second slave machine, if so, the first slave machine and the second slave machine carry out forced handshake pairing, and if not, the received pairing information is ignored. The pairing operation is firstly carried out between the slaves, so that the use pleasure of a user is increased, and particularly, when the user host is paired with the slaves carried out by other people, the process can be simplified and interesting.
Unlike the single-master pairing connection mode between a master and a slave in the prior art, the method shown in fig. 1 provides a new pairing method, in which a first slave paired with the master is first paired with a second slave that is not yet paired with the master, pairing information of the second slave is obtained and sent to the master, and then the master performs forced handshake pairing with the second slave according to the received pairing information of the second slave. When a user wants to temporarily connect a new remote control device or a friend of the user wants to connect a host device of the user by using the remote control device carried by the user, the pairing connection process is more interesting by adopting the method, and the method is particularly suitable for a game scene with a private communication protocol.
In some embodiments of the present application, in the above method for pairing a master slave, the first slave and the second slave complete pairing connection, and obtaining pairing information of the second slave includes: the first slave and the second slave are both set to corresponding pairing modes, wherein the first slave is set to a receiving mode, the second slave is set to a transmitting mode, and the second slave broadcasts own pairing information externally through a broadcast message.
When the distance between the first slave machine and the second slave machine is smaller than the communication distance, the first slave machine receives the broadcast message of the second slave machine; the first slave analyzes the received broadcast message of the second slave to obtain the pairing information of the second slave, and judges whether the pairing information of the second slave meets the preset pairing requirement; and when the first slave machine judges that the pairing information of the second slave machine accords with the preset pairing requirement, the first slave machine completes pairing handshake with the second slave machine and stores the pairing information of the second slave machine.
The first slave machine and the second slave machine can be paired only when both are in the pairing mode, so that when the first slave machine and the second slave machine need to be paired, a user can manually set both the first slave machine and the second slave machine to the corresponding pairing mode. The first slave machine is set to a receiving mode, and is used as a receiver to receive the equipment information of the second slave machine, and meanwhile, an indicator lamp of the first slave machine enters a receiving flashing mode or is displayed on a display screen of the first slave machine or the first slave machine outputs sound to prompt a user that the first slave machine enters the receiving mode; the second slave enters a transmitting mode as a sender to broadcast the self equipment information, and meanwhile, an indicator light of the second slave enters a transmitting flashing mode or a display screen of the second slave displays or the first slave outputs a sound to prompt a user that the second slave enters the transmitting mode.
After the first slave machine and the second slave machine are mutually close by a user, the distance between the first slave machine and the second slave machine is smaller than the communication distance, for example, after the optimal communication distance is achieved, the first slave machine receives the broadcast message of the second slave machine, analyzes the received broadcast message of the second slave machine, obtains the pairing information of the second slave machine, and further judges whether the pairing information of the second slave machine meets the preset pairing requirement or not, wherein the pairing information comprises the equipment model of the second slave machine, the equipment ID of the second slave machine and the like. The pairing requirement can be set according to actual needs, if the second slave and the first slave are required to be peer devices, if the first slave obtains that the second slave is also a wireless communication handle through analyzing the broadcast message, the second slave and the first slave are considered to be peer devices, and the preset pairing requirement is met. Of course, other pairing requirements can be set according to actual needs, for example, the first slave machine obtains the equipment model of the second slave machine through analyzing the broadcast message, but the second slave machine can be considered to not meet the pairing requirements if the version of the second slave machine is found to be old and cannot meet the game requirements.
And when the first slave machine judges that the pairing information of the second slave machine does not meet the preset pairing requirement, the first slave machine ignores the received pairing information. When the first slave machine judges that the pairing information of the second slave machine accords with the preset pairing requirement, the first slave machine temporarily stores the pairing information of the second slave machine, and simultaneously sends a request for agreeing to pair to the second slave machine, so that pairing handshake is completed with the second slave machine, after the second slave machine agrees to pair with the first slave machine, the indicator lamps of the first slave machine and the second slave machine flash at the same frequency, or a prompt for successful pairing of the first slave machine and the second slave machine is displayed through a display screen of the first slave machine and the second slave machine or is prompted through sound.
Since the communication protocols between the first slave and the second slave are consistent, the consistency refers to that the slaves can be mutually identified without confirmation by a user. Therefore, when the first slave machine and the second slave machine are in the pairing mode, the first slave machine and the second slave machine can be mutually identified according to certain information in the broadcast information, and when the two parties confirm that certain information in the broadcast information meets the requirement, automatic pairing is started, the information of the two parties is recorded into respective micro control units (Microcontroller Unit, MCU) to complete pairing of the two slave machines.
The broadcast message of the second slave machine at least comprises a start mark, a stop mark and pairing information, the pairing information of the second slave machine is between the start mark and the stop mark, and when the first slave machine receives the broadcast message sent by the second slave machine, the information between the start mark and the stop mark is analyzed to obtain the pairing information of the second slave machine, wherein the pairing information of the second slave machine at least comprises a device mark and a device type which are uniquely corresponding to the second slave machine.
In some embodiments of the present application, the broadcast message of the second slave adopts the following broadcast information format: the method comprises the steps that I, startStr I UUID I DeviceType I … … I EndStr I, wherein Startstr and Endstr are respectively a start mark and a stop mark, pairing information of a second slave is in the middle of a Startstr character string and an Endstr character string, UUID (Universally Unique Identifier) is an identification code uniquely corresponding to the second slave, namely a device mark of the second slave, and DeviceType is a device type of the second slave; and when the first slave receives the broadcast message, analyzing the information between the Startstr character string and the Endstr character string to obtain the pairing information of the second slave.
The communication protocol format |startstr|uuid|devicetype| … … |endstr| used above is commonly used in proprietary communication protocols, where StartStr, endstr is the beginning and ending label. When the first slave receives the broadcast message in the communication protocol format, the information in the middle of the Startstr and Endstr character strings is analyzed, and pairing information such as a device tag UUID and a device type DeviceType which are uniquely corresponding to the second slave is obtained.
The purpose of using the device to tag the UUID is to enable all elements in the distributed system to have unique identification information, and no identification information specification is required by the central control end, so that each device can create a UUID that does not conflict with other devices. In this embodiment, the device is used to mark the UUID, and the first slave is capable of distinguishing the plurality of second slaves according to the UUID, so as to determine whether each second slave meets the preset pairing requirement.
For example, in some embodiments of the present application, there are a plurality of second slaves, and when a first slave receives broadcast messages of the plurality of second slaves, the plurality of second slaves are distinguished according to the parsed UUIDs, and pairing handshakes are sequentially performed with each of the second slaves according to the time sequence of the received broadcast messages of the plurality of second slaves.
When the second slaves have a plurality of second slaves, the first slaves can receive the plurality of broadcast messages, the first slaves set a receiving time stamp for each broadcast message when receiving the broadcast messages, the first slaves can obtain a plurality of UUIDs after analyzing the received plurality of broadcast messages, and the first slaves can distinguish the plurality of second slaves according to the UUIDs because the UUIDs of the second slaves are different and pair handshake with each second slave in sequence according to the received time stamp information of the received broadcast messages of the plurality of second slaves.
In some embodiments of the present application, the master performs forced handshake pairing with the second slave according to pairing information of the second slave includes: the host analyzes the pairing information of the second slave machine sent by the first slave machine, obtains the equipment mark UUID uniquely corresponding to the second slave machine and stores the equipment mark UUID; the host performs forced handshake pairing with the second slave according to the UUID of the equipment mark of the second slave, and prompts a user after the pairing is completed; the method for prompting the user comprises the following steps: prompting that the second host is successfully connected with the host through the host; and/or prompting the second host to be successfully connected with the host through the second host.
In this embodiment, the prompting manner may specifically be: displaying that the second host is successfully connected with the host on display equipment of the host; or the second host computer prompts the user that the second host computer is successfully connected with the host computer in the forms of vibration, sound and lamplight.
After the first slave machine and the second slave machine finish pairing, the first slave machine acquires pairing information of the second slave machine, the pairing information of the second slave machine is sent to the host machine equipment, the host machine analyzes the pairing information of the second slave machine sent by the first slave machine to obtain a device mark UUID uniquely corresponding to the second slave machine, and preferably, the first slave machine directly sends the analyzed device mark UUID and the device type to the host machine, so that the process that the host machine needs to analyze the pairing information of the second slave machine is omitted. And then the host device performs forced handshake connection with the second slave device according to the UUID, the device type and other information of the second slave device, the second slave device can perform communication operation with the host device after the forced handshake connection is completed, meanwhile, the display device of the host device displays that the host device is successfully connected with a certain second slave device through the first slave device, such as a new game handle or a controller, or the second host device prompts a user that the second host device is successfully connected with the host device through vibration, sound and lamplight, and then the first slave device and the second slave device can simultaneously control the host device.
Fig. 2 illustrates a master slave pairing method according to another embodiment of the present application, including:
in step S210, the second slave (unpaired connection master) is set to the transmitting mode, while the first slave (paired connection master) is set to the receiving mode, and the second slave broadcasts its own configuration information through a broadcast message.
Step S220, the first slave analyzes the received broadcast message, and analyzes the pairing information of the second slave, wherein the pairing information comprises the equipment mark and the equipment type which are uniquely corresponding to the second slave.
In step S230, the first slave determines whether the second slave and the first slave meet the preset pairing requirement?
If not, go to step S241, where the first slave ignores the broadcast message;
if yes, step S240 is entered, where the first slave completes the pairing connection with the second slave, temporarily stores the device tag and the device type uniquely corresponding to the second slave in the MCU of the first slave, and sends the device tag uniquely corresponding to the second slave to the master.
Step S250, the host finishes forced handshake pairing according to the device mark uniquely corresponding to the second slave and the second slave corresponding to the device mark, and prompts the user to finish pairing.
FIG. 3 illustrates a master slave pairing system according to one embodiment of the application. The master slave pairing system 300 includes a master 310, a first slave 320, and at least one second slave 330; the first slave 320, the second slave 330 and the master 310 have the same communication protocol with each other, and the first slave 320 is already paired with the master 310, and the second slave 330 is not yet paired with the master 310; when the second slave 330 performs pairing connection with the master 310, the first slave 320 completes pairing connection with the second slave 330 first, and obtains pairing information of the second slave 330; the first slave 320 then transmits pairing information of the second slave 330 to the master 310; the master 310 performs forced handshake pairing with the second slave 330 according to the pairing information of the second slave 330.
In some embodiments of the present application, when the first slave 320 and the second slave 330 are in pairing connection, the first slave 320 and the second slave 330 are both set to a corresponding pairing mode, wherein the first slave 320 is set to a receiving mode, the second slave 330 is set to a transmitting mode, and the second slave 330 broadcasts its own pairing information externally through a broadcast message; when the distance between the first slave 320 and the second slave 330 is smaller than the communication distance, the first slave 320 receives a broadcast message of the second slave 330; the first slave 320 analyzes the received broadcast message of the second slave 330 to obtain pairing information of the second slave 330, and judges whether the pairing information of the second slave 330 meets a preset pairing requirement; when the first slave 320 determines that the pairing information of the second slave 330 meets the preset pairing requirement, the pairing information of the second slave 330 is temporarily stored, and the pairing handshake is completed with the second slave 330.
The broadcast message of the second slave machine at least comprises a start mark, a stop mark and pairing information, the pairing information of the second slave machine is between the start mark and the stop mark, and when the first slave machine receives the broadcast message sent by the second slave machine, the information between the start mark and the stop mark is analyzed to obtain the pairing information of the second slave machine, wherein the pairing information of the second slave machine at least comprises a device mark and a device type which are uniquely corresponding to the second slave machine.
In some embodiments of the present application, the broadcast message of the second slave 330 employs the following broadcast information: the pairing information of the second slave 330 is in the middle of the Startstr and Endstr character strings, the UUID is the unique corresponding identification code of the second slave, namely the device mark of the second slave, and the DeviceType is the device type of the second slave; upon receiving the broadcast message, the first slave 320 parses the information in the middle of the Startstr and Endstr strings to obtain the pairing information of the second slave 330.
In some embodiments of the present application, there are a plurality of second slaves 330, and when the first slave 320 receives the broadcast messages of the plurality of second slaves 330, the plurality of second slaves 330 are distinguished according to the parsed device tag UUID, and pairing handshake is performed with each of the second slaves 330 in turn according to the time sequence of the received broadcast messages of the plurality of second slaves 330.
In some embodiments of the present application, after receiving the pairing information of the second slave 330 sent by the first slave 320, the master 310 parses the pairing information of the second slave 330 to obtain and store a device tag UUID uniquely corresponding to the second slave 330; the host 310 performs forced handshake pairing with the second slave 330 according to the device tag UUID of the second slave 330, and prompts the user after the pairing is completed; the method for prompting the user comprises the following steps: prompting that the second host is successfully connected with the host through the host; and/or prompting the second host to be successfully connected with the host through the second host.
It should be noted that, the specific implementation of each embodiment of the master slave pairing system may be performed with reference to the specific implementation of the corresponding method embodiment, which is not described herein.
It should be noted that:
in the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the present application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the above description of exemplary embodiments of the application, various features of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the application and aiding in the understanding of one or more of the various application's aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed application requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this application.
It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.

Claims (8)

1. A master slave pairing method applied to a private communication protocol, wherein the slave comprises a first slave and at least one second slave; the first slave, the second slave and the host have the same communication protocol with each other, and the first slave is already paired to the host, and the second slave is not yet paired to the host; when the second slave machine and the host machine are in pairing connection, the method comprises the following steps:
the first slave machine and the second slave machine are both set to a corresponding pairing mode, wherein the first slave machine is set to a receiving mode, the second slave machine is set to a transmitting mode, and the second slave machine externally broadcasts own pairing information through a broadcast message;
when the distance between the first slave machine and the second slave machine is smaller than the communication distance, the first slave machine receives a broadcast message of the second slave machine;
the first slave machine analyzes the received broadcast message of the second slave machine to obtain the pairing information of the second slave machine, and judges whether the pairing information of the second slave machine meets the preset pairing requirement;
when the first slave machine judges that the pairing information of the second slave machine accords with a preset pairing requirement, the first slave machine temporarily stores the pairing information of the second slave machine and completes pairing handshake with the second slave machine;
the host analyzes the pairing information of the second slave machine sent by the first slave machine, obtains a device mark uniquely corresponding to the second slave machine and stores the device mark;
and the host performs forced handshake pairing with the second slave according to the equipment mark uniquely corresponding to the second slave, and prompts a user after the pairing is completed.
2. The master slave pairing method according to claim 1, wherein the broadcast message of the second slave includes at least a start flag, a stop flag, pairing information;
pairing information of the second slave is between the start mark and the end mark;
when the first slave receives the broadcast message, analyzing the information between the start mark and the end mark to obtain the pairing information of the second slave;
the pairing information of the second slave machine at least comprises a device mark and a device type which are uniquely corresponding to the second slave machine.
3. The method of pairing a master and a slave according to claim 2, wherein the second slave has a plurality of,
and when the first slave machine receives the broadcast messages of the second slave machines, distinguishing the second slave machines according to the analyzed equipment marks, and carrying out pairing handshake with each second slave machine in sequence according to the time sequence of the received broadcast messages of the second slave machines.
4. The method of claim 1, wherein the prompting the user comprises:
prompting, by the host, that the second host and the host are successfully connected;
and/or prompting, by the second host, that the second host is successfully connected with the host.
5. A master slave pairing system, the system comprising a master, a first slave and at least one second slave; the first slave, the second slave and the host have the same communication protocol with each other, and the first slave is already paired to the host, and the second slave is not yet paired to the host; when the second slave and the master are in pairing connection,
the first slave machine and the second slave machine are both set to a corresponding pairing mode, wherein the first slave machine is set to a receiving mode, the second slave machine is set to a transmitting mode, and the second slave machine externally broadcasts own pairing information through a broadcast message;
when the distance between the first slave machine and the second slave machine is smaller than the communication distance, the first slave machine receives a broadcast message of the second slave machine;
the first slave machine analyzes the received broadcast message of the second slave machine to obtain the pairing information of the second slave machine, and judges whether the pairing information of the second slave machine meets the preset pairing requirement;
when the first slave machine judges that the pairing information of the second slave machine accords with a preset pairing requirement, the first slave machine temporarily stores the pairing information of the second slave machine and completes pairing handshake with the second slave machine;
the host analyzes the pairing information of the second slave machine sent by the first slave machine, obtains a device mark uniquely corresponding to the second slave machine and stores the device mark;
and the host performs forced handshake pairing with the second slave according to the equipment mark uniquely corresponding to the second slave, and prompts a user after the pairing is completed.
6. The master slave pairing system of claim 5, wherein the broadcast message of the second slave includes at least a start tag, a stop tag, pairing information;
pairing information of the second slave is between the start mark and the end mark;
when the first slave receives the broadcast message, analyzing the information between the start mark and the end mark to obtain the pairing information of the second slave;
the pairing information of the second slave machine at least comprises a device mark and a device type which are uniquely corresponding to the second slave machine.
7. The master slave pairing system according to claim 6, wherein the second slave has a plurality of,
and when the first slave machine receives the broadcast messages of the second slave machines, distinguishing the second slave machines according to the analyzed equipment marks, and carrying out pairing handshake with each second slave machine in sequence according to the time sequence of the received broadcast messages of the second slave machines.
8. The master slave pairing system according to claim 5, wherein the means for prompting the user comprises:
prompting, by the host, that the second host and the host are successfully connected;
and/or prompting, by the second host, that the second host is successfully connected with the host.
CN202011045044.8A 2020-09-28 2020-09-28 Host slave pairing method and system Active CN112312361B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011045044.8A CN112312361B (en) 2020-09-28 2020-09-28 Host slave pairing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011045044.8A CN112312361B (en) 2020-09-28 2020-09-28 Host slave pairing method and system

Publications (2)

Publication Number Publication Date
CN112312361A CN112312361A (en) 2021-02-02
CN112312361B true CN112312361B (en) 2023-06-23

Family

ID=74489297

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011045044.8A Active CN112312361B (en) 2020-09-28 2020-09-28 Host slave pairing method and system

Country Status (1)

Country Link
CN (1) CN112312361B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112533190B (en) * 2020-11-20 2023-02-28 歌尔科技有限公司 Control method of slave device, and computer-readable storage medium
WO2022259432A1 (en) * 2021-06-09 2022-12-15 三菱電機株式会社 Communication system and device
CN113905361A (en) * 2021-09-16 2022-01-07 深圳国实智能有限公司 Bluetooth one-to-many communication method, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101364820A (en) * 2008-08-12 2009-02-11 深圳市华禹高科技有限公司 Connection method for Bluetooth apparatus system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012117306A1 (en) * 2011-03-01 2012-09-07 Koninklijke Philips Electronics N.V. Method for enabling a wireless secured communication among devices
US20130018975A1 (en) * 2011-07-15 2013-01-17 Motorola Solutions, Inc. Low frequency method of pairing a master device to multiple slave devices
US9445032B2 (en) * 2014-03-24 2016-09-13 Broadcom Corporation Auto-pairing control device
WO2016039598A1 (en) * 2014-09-14 2016-03-17 엘지전자(주) Method and device for controlling device by using bluetooth technology
CN108924806A (en) * 2018-07-19 2018-11-30 廊坊新奥燃气设备有限公司 A kind of family's internet of things data communication means and system using BLE technology
CN111615086A (en) * 2019-02-26 2020-09-01 北京奇虎科技有限公司 Method and device for pairing game handles capable of being connected to network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101364820A (en) * 2008-08-12 2009-02-11 深圳市华禹高科技有限公司 Connection method for Bluetooth apparatus system

Also Published As

Publication number Publication date
CN112312361A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
CN112312361B (en) Host slave pairing method and system
US10521183B2 (en) Control terminal device and audio system control method that displays a source selection screen with an area image background
EP3174303B1 (en) Remote control method for multi-terminal device, and related apparatus and system
CN111866998A (en) Bluetooth network distribution method, equipment and storage medium
CN107205218B (en) Pairing method and system of Bluetooth equipment
CN111813433B (en) Method for updating key value in remote controller, remote controller and storage medium
JP6567990B2 (en) Wireless communication apparatus, wireless communication method, and wireless communication system
US10797944B2 (en) Zigbee light link network commissioning
US10085290B2 (en) Discovering wireless communication device based on required services
CN112804730B (en) Equipment interconnection method, device, server, intelligent equipment and storage medium
CN103544830A (en) Intelligent pairing method of infrared remote control device
JP6322001B2 (en) COMMUNICATION DEVICE AND ITS CONTROL METHOD
US20200374149A1 (en) Systems and methods for the implementation of an ai/iot hub in the control of electrical devices, electronics and appliances
CN109297142A (en) Control method, air conditioner and storage medium
CN106550259B (en) The matching method and system of remote controler and TV
CN104574930A (en) Configuration method of home control function of mobile terminal, mobile terminal and home electrical equipment
JP2004326705A (en) Vehicle communication apparatus and vehicle communication method
JP2013255107A (en) Controller, control terminal, remote control system, and program for making processor perform communication method
US10349453B2 (en) Communication apparatus, communication system, communication method and recording medium
CN107637175B (en) Connected device system
CN112423291B (en) WIFI module detection and number burning method, controller, WIFI module and electrical equipment
CN215935106U (en) Wireless communication system with automatic pairing mechanism
CN113596809B (en) Equipment discovery method and system based on natural language coding
JP2013255108A (en) Controller, control terminal, remote control system, and program for making processor perform communication method
CN108616851A (en) A kind of Bluetooth connecting method and bluetooth equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant