CN112312361A - Host and slave machine pairing method and system - Google Patents

Host and slave machine pairing method and system Download PDF

Info

Publication number
CN112312361A
CN112312361A CN202011045044.8A CN202011045044A CN112312361A CN 112312361 A CN112312361 A CN 112312361A CN 202011045044 A CN202011045044 A CN 202011045044A CN 112312361 A CN112312361 A CN 112312361A
Authority
CN
China
Prior art keywords
slave
machine
pairing
slave machine
master
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.)
Granted
Application number
CN202011045044.8A
Other languages
Chinese (zh)
Other versions
CN112312361B (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 host-slave machine pairing method and system. The slave machines comprise a first slave machine and at least one second slave machine; the first slave machine, the second slave machine and the host machine have the same communication protocol with each other, the first slave machine is connected to the host machine in a paired mode, and the second slave machine is not connected to the host machine in a paired mode; when the second slave machine is in pairing connection with the master machine, the method comprises the following steps: the first slave machine and the second slave machine complete pairing connection to acquire pairing information of the second slave machine; and the first slave machine sends the pairing information of the second slave machine to the master machine, so that the master machine performs forced handshake pairing with the second slave machine according to the pairing information of the second slave machine. By adopting the method, the pairing connection process is more interesting, and the method is particularly suitable for the game scene with the communication protocol being the private protocol.

Description

Host and slave machine pairing method and system
Technical Field
The invention belongs to the technical field of wireless communication, and particularly relates to a host-slave machine pairing method and system.
Background
Electronic equipment such as a wireless communication handle can be used as slave equipment for controlling host equipment. The host computer comprises a mobile phone, a game machine, a virtual display device and the like. Generally, there is not only one slave, but a plurality of slave devices are used to control the master, especially on handheld game machines and home game master devices. When the host computer is started, the paired and connected slave computer equipment can be automatically connected, and when the host computer needs to be connected with new slave computer equipment, in the prior art, the pairing operation needs to be carried out on the host computer system, and the new slave computer equipment is connected with the host computer, so that the initiative of the pairing operation is at the host computer system, the pairing operation is single, and the sensibility is poor.
Disclosure of Invention
The method for pairing the master machine and the slave machine is highly interesting and aims to solve the problem that the master machine and the slave machine are single and tedious in pairing mode.
According to an aspect of the present application, there is provided a master-slave pairing method, the slaves 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, the first slave is paired and connected to the host, and the second slave is not paired and connected to the host; when the second slave machine is in pairing connection with the master machine, the method comprises the following steps:
the first slave machine and the second slave machine complete pairing connection to acquire pairing information of the second slave machine;
and the first slave machine sends the pairing information of the second slave machine to the master machine, so that the master machine performs forced handshake pairing with the second slave machine according to the pairing information of the second slave machine.
Optionally, in the master-slave pairing method, the pairing connection between the first slave and the second slave is completed, and acquiring the 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 sending mode, and the second slave machine externally broadcasts the pairing information of the second slave machine 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 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 the first slave machine judges that the pairing information of the second slave machine meets the preset pairing requirement, temporarily storing the pairing information of the second slave machine, and completing pairing handshake with the second slave machine.
Optionally, in the master-slave pairing method, the broadcast message of the second slave includes at least a start flag, a stop flag, and pairing information;
the pairing information of the second slave is between the start marker and the end marker;
when the first slave machine receives the broadcast message, analyzing the information between the starting mark and the ending mark to obtain the pairing information of the second slave machine;
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 method, the second slave may have a plurality of slaves,
when the first slave machine receives the broadcast messages of the second slave machines, the first slave machine distinguishes the second slave machines according to the analyzed device marks, and performs 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 master-slave pairing method, the performing, by the master, a forced handshake pairing with the second slave according to the pairing information of the second slave includes:
the host machine analyzes the pairing information of the second slave machine sent by the first slave machine to obtain and store a device mark uniquely corresponding to the second slave machine;
the host machine performs forced handshake pairing with the second slave machine according to the equipment mark uniquely corresponding to the second slave machine, and prompts a user after pairing is completed;
the mode of prompting the user comprises the following steps:
prompting that the second host is successfully connected with the host through the host;
and/or prompting that the second host is successfully connected with the host through the second 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, the first slave is paired and connected to the host, and the second slave is not paired and connected to the host; when the second slave machine and the master machine are in pairing connection,
the first slave machine and the second slave machine complete pairing connection to acquire pairing information of the second slave machine;
the first slave machine sends the pairing information of the second slave machine to the master machine;
and the master machine performs forced handshake pairing with the second slave machine according to the pairing information of the second slave machine.
Optionally, in the master-slave pairing system, when the first slave is paired with the second slave, both the first slave and the second slave are set to a corresponding pairing mode, where the first slave is set to a receiving mode, the second slave is set to a sending mode, and the second slave broadcasts pairing information of itself to the outside 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 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 the first slave machine judges that the pairing information of the second slave machine meets the preset pairing requirement, temporarily storing the pairing information of the second slave machine, and completing 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 flag, a stop flag, and pairing information;
the pairing information of the second slave is between the start marker and the end marker;
when the first slave machine receives the broadcast message, analyzing the information between the starting mark and the ending mark to obtain the pairing information of the second slave machine;
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, there are a plurality of the second slaves,
when the first slave machine receives the broadcast messages of the second slave machines, the first slave machine distinguishes the second slave machines according to the analyzed device marks, and performs 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 master-slave pairing system, after receiving the pairing information of the second slave sent by the first slave, the master analyzes the pairing information of the second slave, and obtains and stores a device identifier uniquely corresponding to the second slave;
the host machine performs forced handshake pairing with the second slave machine according to the equipment mark, and prompts a user after pairing is completed;
the mode of prompting the user comprises the following steps:
prompting that the second host is successfully connected with the host through the host;
and/or prompting that the second host is successfully connected with the host through the second host. The beneficial effect of this application lies in:
different from a pairing connection mode in which a master machine is used as a main machine only between a master machine and slave machines in the prior art, the application provides a new pairing method, wherein a first slave machine in pairing connection with the master machine is firstly in pairing connection with a second slave machine which is not in pairing connection with the master machine, the pairing information of the second slave machine is acquired and sent to the master machine, and then the master machine performs forced handshake pairing with the second slave machine according to the received pairing information of the second slave machine. When a user wants to connect a new remote control device temporarily or a friend of the user wants to connect a host device of the user by using a remote control device carried by the user, the method enables the pairing connection process to be more interesting, and 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 the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
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 refer to like parts throughout the drawings. In the drawings:
figure 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 present 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 idea of the present invention is to provide a new pairing method for a single master and slave pairing mode in the prior art, wherein when a slave that is not paired with a master device (hereinafter referred to as a second slave) needs to be paired with the master device, the second slave is first paired with a slave that has been successfully paired with the master device (hereinafter referred to as a first slave), and after the first slave and the second slave are successfully paired, the first slave transmits information of the second slave to the master device, so that the master device 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 machines comprise a first slave machine and at least one second slave machine; the first slave, the second slave and the host have the same communication protocol with each other, the first slave is paired and connected to the host, and the second slave is not paired and connected to the host.
In the application, the slave machine comprises a wireless communication handle and the like and can be used as a remote controller to control the master machine; the host computer comprises a game machine, virtual reality glasses, a virtual display device and the like.
The application is implemented in a situation that the first slave, the second slave and the master have the same communication protocol with each other, the first slave is already paired and connected to the master, and the second slave is not yet paired and connected to the master.
The communication protocol can be any one of the prior art, such as a ZigBee wireless protocol, a Bluetooth communication protocol and the like, and the method is recommended, and is more suitable for a private communication protocol, such as a game scene. 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 and connected only if the wireless communication protocols used by the master and the slave are consistent, which is a precondition that the master and the slave can be paired successfully.
The first slave generally refers to one of the slaves that has already made a successful pairing connection with the master, and is also referred to as the old slave; the second slave generally refers to a slave that has not yet formed a pairing connection with the master, and the second slave is also referred to as a new slave, and may include a plurality of slaves.
As shown in fig. 1, when the second slave is paired with the master, the pairing method includes:
and step S110, completing pairing connection between the first slave machine and the second slave machine, and acquiring pairing information of the second slave machine.
The first slave is used as an old slave and is already paired and connected to the master, and the second slave is used as a new slave and is not yet paired and connected to the master. When the second slave wants to be connected to the master, the second slave is not directly connected with the master, but the first slave and the second slave complete pairing connection first.
The pairing connection method may be any one of the prior art, such as bluetooth connection, where in a case that the communication protocol is a private communication protocol, 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 acquires pairing information of the second slave, such as a device model of the second slave, a device ID of the second slave, and the like.
And step S120, the first slave machine sends the pairing information of the second slave machine to the master machine, so that the master 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 connected in a pairing mode, the first slave machine sends the 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 host machine after obtaining the pairing information of the second slave machine, if yes, the host machine carries out forced handshake pairing with the second slave machine, and if not, the received pairing information is omitted. By carrying out pairing operation between the slave machines, the use pleasure of a user is increased, and particularly when the user host machine is paired with the slave machines of other people, the process becomes simple and interesting.
Different from the pairing connection mode in which the master is solely used as the master between the master and the slave in the prior art, the method shown in fig. 1 provides a new pairing method, in which a first slave paired and connected with the master performs pairing connection with a second slave that is not paired and connected with the master, acquires pairing information of the second slave and sends the pairing information 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 connect a new remote control device temporarily or a friend of the user wants to connect a host device of the user by using a remote control device carried by the user, the method enables the pairing connection process to be more interesting, and is particularly suitable for a game scene with a private communication protocol.
In some embodiments of the present application, in the master-slave pairing method, the first slave and the second slave complete pairing connection, and acquiring pairing information of the second slave includes: the first slave machine and the second slave machine are set to corresponding pairing modes, wherein the first slave machine is set to a receiving mode, the second slave machine is set to a sending mode, and the second slave machine externally broadcasts the pairing information of the second slave machine 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 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 the first slave machine judges that the pairing information of the second slave machine meets the preset pairing requirement, finishing pairing handshake with the second slave machine and storing the pairing information of the second slave machine.
Therefore, when the first slave machine and the second slave machine need to be paired and connected, a user can manually set the first slave machine and the second slave machine to the corresponding pairing modes. The first slave machine is set to be in a receiving mode and used as a receiving party to receive the equipment information of the second slave machine, and meanwhile, an indicator lamp of the first slave machine enters a receiving flicker 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; and the second slave machine enters a sending mode and is used as a sender to broadcast the self equipment information, and meanwhile, an indicator lamp of the second slave machine enters a sending flicker mode or a display screen of the second slave machine displays or the first slave machine outputs sound to prompt a user that the second slave machine enters the sending mode.
After the user brings the first slave and the second slave close to each other and the distance between the first slave and the second slave is smaller than the communication distance, for example, the optimal communication distance is reached, the first slave receives the broadcast message of the second slave and analyzes the received broadcast message of the second slave to obtain pairing information of the second slave, wherein the pairing information includes, for example, the device model of the second slave, the device ID of the second slave, and the like, and further determines whether the pairing information of the second slave meets a preset pairing requirement. The pairing requirement can be set according to actual needs, and if the second slave machine and the first slave machine are required to be peer devices, and if the first slave machine obtains that the second slave machine is also a wireless communication handle and the like through analysis of the broadcast message, the second slave machine and the first slave machine are considered to be peer devices, that is, the preset pairing requirement is met. Of course, other pairing requirements may also be set according to actual needs, for example, the first slave machine obtains the device model of the second slave machine through analysis of the broadcast message, but if the version of the second slave machine is old and cannot meet the game requirement, the second slave machine may be considered not to meet the pairing requirements.
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 meets the preset pairing requirement, the first slave machine temporarily stores the pairing information of the second slave machine, simultaneously sends a pairing approval request to the second slave machine, so that pairing handshake is completed with the second slave machine, and after the second slave machine and the first slave machine both approve pairing, indicator lamps of the first slave machine and the second slave machine flicker at the same frequency, or display is performed through display screens of the first slave machine and the second slave machine, or prompt that the first slave machine and the second slave machine are successfully paired is prompted through sound.
Since the communication protocol between the first slave and the second slave is consistent, the consistency means that the slaves can recognize each other without user confirmation. Therefore, when the first slave and the second slave are both in the pairing mode, the first slave and the second slave can recognize each other according to some information in the broadcast information, when the two slaves confirm that some information in the broadcast information meets the requirements, automatic pairing is started, and the information of the two slaves is recorded into respective Micro Control Units (MCUs) to complete the pairing of the two slaves.
The broadcast message of the second slave machine at least comprises a starting mark, a terminating mark and pairing information, the pairing information of the second slave machine is between the starting mark and the terminating mark, and when the first slave machine receives the broadcast message sent by the second slave machine, the information between the starting mark and the terminating 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 is in the following broadcast information format: the slave device identifier is a Unique identifier of the second slave device, namely a device identifier of the second slave device, and the DeviceType is a device type of the second slave device; and when the first slave machine receives the broadcast message, analyzing the information in the middle of the Startstr and Endstr character strings to obtain the pairing information of the second slave machine.
The communication protocol format | StartStr | UUID | DeviceType | … … | EndStr | adopted above is mostly used in the private communication protocol, where StartStr, EndStr are the labels of the beginning and the end. When the first slave machine receives the broadcast message in the communication protocol format, the first slave machine analyzes the information in the middle of the Startstr and Endstr character strings to obtain the pairing information such as the equipment mark UUID and the equipment type DeviceType which are uniquely corresponding to the second slave machine.
The purpose of using the device tag UUID is to allow all elements in the distributed system to have unique identification information without the need for identification information designation by the central control side, so that each device can create a UUID that does not conflict with other devices. In this embodiment, the UUID is marked by the device, and the first slave machine can distinguish the plurality of second slave machines according to the UUID, so as to respectively determine whether each second slave machine meets the preset pairing requirement.
For example, in some embodiments of the present application, there are a plurality of second slaves, and when the first slave receives broadcast messages of the plurality of second slaves, the first slave distinguishes the plurality of second slaves according to the parsed UUIDs, and performs pairing handshake with each second slave in turn according to the time sequence of the received broadcast messages of the plurality of second slaves.
When a plurality of second slaves are provided, the first slave receives a plurality of broadcast messages, the first slave sets a receiving timestamp for each broadcast message when receiving the broadcast messages, the first slave analyzes the received broadcast messages to obtain a plurality of UUIDs, and the UUIDs of the second slaves are different, so that the first slave can distinguish the second slaves according to the UUIDs and sequentially perform pairing handshake with the second slaves according to the receiving timestamp information of the received broadcast messages of the second slaves.
In some embodiments of the present application, the master performing the forced handshake pairing with the second slave according to the pairing information of the second slave includes: the host machine analyzes the pairing information of the second slave machine sent by the first slave machine to obtain and store a unique device mark UUID corresponding to the second slave machine; the host machine carries out forced handshake pairing with the second slave machine according to the equipment mark UUID of the second slave machine, and prompts a user after pairing is finished; the mode of prompting the user comprises the following steps: the host prompts that the second host is successfully connected with the host; and/or prompting the second host computer to be successfully connected with the host computer through the second host computer.
In this embodiment, the prompting manner may specifically be: displaying that the second host is successfully connected with the host on the display equipment of the host; or the second host prompts the user that the second host is successfully connected with the host through vibration, sound and light.
After the first slave machine and the second slave machine are paired, the first slave machine acquires the pairing information of the second slave machine and sends the pairing information of the second slave machine 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 the equipment mark UUID uniquely corresponding to the second slave machine, and preferably, the first slave machine directly sends the analyzed equipment mark UUID and the equipment 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. Then, the master machine device performs forced handshake connection with the second slave machine according to information such as a device identifier UUID and/or a device type of the second slave machine, the second slave machine can perform communication operation with the master machine after the forced handshake connection is completed, meanwhile, a display device of the master machine device displays that the master machine is successfully connected with a certain second slave machine through the first slave machine, for example, a new gamepad or a controller, or the second master machine prompts a user that the second master machine is successfully connected with the master machine through vibration, sound and light forms, and then the first slave machine and the second slave machine can simultaneously control the master machine.
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 be in the transmission mode, and the first slave (paired connection master) is set to be in the reception mode, and the second slave broadcasts its configuration information through a broadcast message.
Step S220, the first slave machine parses the received broadcast message, and parses the pairing information of the second slave machine, where the pairing information includes the device identifier and the device type uniquely corresponding to the second slave machine.
In step S230, the first slave determines whether the second slave and the first slave meet the preset pairing requirement?
If not, the step S241 is executed, and the first slave machine ignores the broadcast message;
if yes, the process proceeds to step S240, where the first slave completes pairing connection with the second slave, temporarily stores the device identifier and the device type uniquely corresponding to the second slave in its own MCU, and sends the device identifier uniquely corresponding to the second slave to the master.
And step S250, the host completes forced handshake pairing with the second slave machine corresponding to the equipment mark according to the equipment mark uniquely corresponding to the second slave machine, and prompts a user to complete pairing.
Fig. 3 illustrates a master-slave pairing system according to one embodiment of the present application. The master-slave pairing system 300 comprises 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, the first slave 320 is already paired and connected to the master 310, and the second slave 330 is not already paired and connected to the master 310; when the second slave machine 330 is paired with the master machine 310, the first slave machine 320 and the second slave machine 330 firstly complete pairing connection to acquire pairing information of the second slave machine 330; then the first slave 320 sends the pairing information of the second slave 330 to the master 310; the master 310 performs a 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 paired and connected, the first slave 320 and the second slave 330 are both set to a corresponding pairing mode, where the first slave 320 is set to a receiving mode, the second slave 330 is set to a sending mode, and the second slave 330 broadcasts its pairing information to the outside through a broadcast message; when the distance between the first slave machine 320 and the second slave machine 330 is less than the communication distance, the first slave machine 320 receives the broadcast message of the second slave machine 330; the first slave machine 320 analyzes the received broadcast message of the second slave machine 330 to obtain pairing information of the second slave machine 330, and determines whether the pairing information of the second slave machine 330 meets a preset pairing requirement; when the first slave device 320 determines that the pairing information of the second slave device 330 meets the preset pairing requirement, the first slave device 320 temporarily stores the pairing information of the second slave device 330, and completes pairing handshake with the second slave device 330.
The broadcast message of the second slave machine at least comprises a starting mark, a terminating mark and pairing information, the pairing information of the second slave machine is between the starting mark and the terminating mark, and when the first slave machine receives the broadcast message sent by the second slave machine, the information between the starting mark and the terminating 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 adopts the following broadcast information: | StartStr | UUID | DeviceType | … … | EndStr |, where Startstr and Endstr are start mark and end mark, respectively, the pairing information of the second slave machine 330 is in the middle of the character strings of Startstr and Endstr, UUID is an identification code uniquely corresponding to the second slave machine, that is, the device mark of the second slave machine, and DeviceType is the device type of the second slave machine; when receiving the broadcast message, the first slave device 320 analyzes information in the middle of the Startstr and Endstr character strings to obtain pairing information of the second slave device 330.
In some embodiments of the present application, there are a plurality of second slaves 330, and when receiving the broadcast messages of the plurality of second slaves 330, the first slave 320 distinguishes the plurality of second slaves 330 according to the parsed device identifier UUID, and performs pairing handshake with each second slave 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 the master 310 receives the pairing information of the second slave 330 sent by the first slave 320, the master 310 analyzes the pairing information of the second slave 330 to obtain and store an equipment identifier UUID uniquely corresponding to the second slave 330; the host 310 performs forced handshake pairing with the second slave 330 according to the UUID of the device identifier of the second slave 330, and prompts the user after completing pairing; the mode of prompting the user comprises the following steps: the host prompts that the second host is successfully connected with the host; and/or prompting the second host computer to be successfully connected with the host computer through the second host computer.
It should be noted that, for the specific implementation of each embodiment of the master-slave pairing system, reference may be made to the specific implementation of the foregoing corresponding method embodiment, and details are not described here again.
It should be noted that:
in the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the 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 foregoing 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 aspects. However, the disclosed method should not be interpreted as reflecting an intention that: this application is intended to cover such departures from the present disclosure as come within known or customary practice in the art to which this invention pertains. Rather, as the following claims reflect, application is directed to 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 usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (10)

1. A master-slave pairing method, characterized in that the slaves comprise 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, the first slave is paired and connected to the host, and the second slave is not paired and connected to the host; when the second slave machine is in pairing connection with the master machine, the method comprises the following steps:
the first slave machine and the second slave machine complete pairing connection to acquire pairing information of the second slave machine;
and the first slave machine sends the pairing information of the second slave machine to the master machine, so that the master machine performs forced handshake pairing with the second slave machine according to the pairing information of the second slave machine.
2. The master-slave pairing method according to claim 1, wherein the first slave and the second slave complete pairing connection, and acquiring pairing information of the second slave comprises:
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 sending mode, and the second slave machine externally broadcasts the pairing information of the second slave machine 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 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 the first slave machine judges that the pairing information of the second slave machine meets the preset pairing requirement, temporarily storing the pairing information of the second slave machine, and completing pairing handshake with the second slave machine.
3. The master-slave pairing method according to claim 2, wherein the broadcast message of the second slave includes at least a start flag, a stop flag, and pairing information;
the pairing information of the second slave is between the start marker and the end marker;
when the first slave machine receives the broadcast message, analyzing the information between the starting mark and the ending mark to obtain the pairing information of the second slave machine;
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.
4. The master-slave pairing method according to claim 3, wherein the second slave has a plurality of second slaves,
when the first slave machine receives the broadcast messages of the second slave machines, the first slave machine distinguishes the second slave machines according to the analyzed device marks, and performs pairing handshake with each second slave machine in sequence according to the time sequence of the received broadcast messages of the second slave machines.
5. The master-slave pairing method according to claim 1, wherein the master performing forced handshake pairing with the second slave according to the pairing information of the second slave comprises:
the host machine analyzes the pairing information of the second slave machine sent by the first slave machine to obtain and store a device mark uniquely corresponding to the second slave machine;
the host machine performs forced handshake pairing with the second slave machine according to the equipment mark uniquely corresponding to the second slave machine, and prompts a user after pairing is completed;
the mode of prompting the user comprises the following steps:
prompting that the second host is successfully connected with the host through the host;
and/or prompting that the second host is successfully connected with the host through the second host.
6. A master-slave pairing system is characterized in that the system comprises 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, the first slave is paired and connected to the host, and the second slave is not paired and connected to the host; when the second slave machine and the master machine are in pairing connection,
the first slave machine and the second slave machine complete pairing connection to acquire pairing information of the second slave machine;
the first slave machine sends the pairing information of the second slave machine to the master machine;
and the master machine performs forced handshake pairing with the second slave machine according to the pairing information of the second slave machine.
7. The master-slave pairing system according to claim 6, wherein when the first slave and the second slave are in pairing connection, the first slave and the second slave are both set to a corresponding pairing mode, wherein the first slave is set to a receiving mode, the second slave is set to a sending mode, and the second slave broadcasts pairing information of the second slave to the outside 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 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 the first slave machine judges that the pairing information of the second slave machine meets the preset pairing requirement, temporarily storing the pairing information of the second slave machine, and completing pairing handshake with the second slave machine.
8. The master-slave pairing system according to claim 7, wherein the broadcast message of the second slave includes at least a start flag, a stop flag, and pairing information;
the pairing information of the second slave is between the start marker and the end marker;
when the first slave machine receives the broadcast message, analyzing the information between the starting mark and the ending mark to obtain the pairing information of the second slave machine;
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.
9. The master-slave pairing system according to claim 8, wherein the second slave has a plurality of slaves,
when the first slave machine receives the broadcast messages of the second slave machines, the first slave machine distinguishes the second slave machines according to the analyzed device marks, and performs pairing handshake with each second slave machine in sequence according to the time sequence of the received broadcast messages of the second slave machines.
10. The master-slave pairing system according to claim 6, wherein 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 and store a device tag uniquely corresponding to the second slave;
the host machine performs forced handshake pairing with the second slave machine according to the equipment mark, and prompts a user after pairing is completed;
the mode of prompting the user comprises the following steps:
prompting that the second host is successfully connected with the host through the host;
and/or prompting that the second host is successfully connected with the host through the second 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 true CN112312361A (en) 2021-02-02
CN112312361B 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)

Cited By (3)

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

Citations (7)

* 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
US20130018975A1 (en) * 2011-07-15 2013-01-17 Motorola Solutions, Inc. Low frequency method of pairing a master device to multiple slave devices
US20130337739A1 (en) * 2011-03-01 2013-12-19 Koninklijke Philips N.V. Method for enabling a wireless secured communication among devices
US20150271432A1 (en) * 2014-03-24 2015-09-24 Broadcom Corporation Auto-Pairing Control Device
US20170353979A1 (en) * 2014-09-14 2017-12-07 Lg Electronics Inc. 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 (7)

* 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
US20130337739A1 (en) * 2011-03-01 2013-12-19 Koninklijke Philips 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
US20150271432A1 (en) * 2014-03-24 2015-09-24 Broadcom Corporation Auto-Pairing Control Device
US20170353979A1 (en) * 2014-09-14 2017-12-07 Lg Electronics Inc. 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

Cited By (5)

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

Also Published As

Publication number Publication date
CN112312361B (en) 2023-06-23

Similar Documents

Publication Publication Date Title
CN112312361A (en) Host and slave machine pairing method and system
US9789398B2 (en) Wireless communication game system
CN107683465B (en) Control terminal device, audio system, and audio system control method
US9124604B2 (en) Communication apparatus, computer-readable storage medium having stored therein communication control program, communication control method, and communication system
CN103136928B (en) Terminal device, remote control equipment and its method of automatic matching
JPH11501194A (en) System for communicating between a group of devices
CN111866998A (en) Bluetooth network distribution method, equipment and storage medium
CN103544830A (en) Intelligent pairing method of infrared remote control device
CN104202461A (en) Connected smart phone function synchronizing automotive sound system
CN109297142A (en) Control method, air conditioner and storage medium
CN112804730B (en) Equipment interconnection method, device, server, intelligent equipment and storage medium
WO2016027561A1 (en) Network system, sound output method, server, communication terminal, and electrical device
CN106251609B (en) Intelligent robot, networking method thereof, network sharing method and device
CN112530149B (en) Remote control method and device
US10099125B2 (en) Game system, non-transitory storage medium encoded with computer readable processing program, processing method, game device, and information processing apparatus
CN113064642A (en) Method and system for starting working process of electric control equipment, terminal and electric control equipment
CN106550259B (en) The matching method and system of remote controler and TV
CN109951829B (en) Bluetooth connection method, intelligent terminal and Bluetooth device
JP2013255107A (en) Controller, control terminal, remote control system, and program for making processor perform communication method
CN105188155B (en) A kind of method and terminal of network connection
KR102141526B1 (en) Method of providing contents and system performing the same
US10349453B2 (en) Communication apparatus, communication system, communication method and recording medium
JP2017046227A (en) Radio communication system, terminal device, access point, and program
CN106792441B (en) Bluetooth switching method, device and storage medium
CN115484340B (en) Operation matching method for multiple intelligent air conditioners based on Bluetooth and intelligent air conditioner

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