[go: up one dir, main page]

CN111132099B - Control method and device for Bluetooth master and slave devices and Bluetooth device - Google Patents

Control method and device for Bluetooth master and slave devices and Bluetooth device Download PDF

Info

Publication number
CN111132099B
CN111132099B CN201910950354.5A CN201910950354A CN111132099B CN 111132099 B CN111132099 B CN 111132099B CN 201910950354 A CN201910950354 A CN 201910950354A CN 111132099 B CN111132099 B CN 111132099B
Authority
CN
China
Prior art keywords
bluetooth
master
slave
clock
master device
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
CN201910950354.5A
Other languages
Chinese (zh)
Other versions
CN111132099A (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.)
Zhuhai Jieli Technology Co Ltd
Original Assignee
Zhuhai Jieli Technology 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 Zhuhai Jieli Technology Co Ltd filed Critical Zhuhai Jieli Technology Co Ltd
Priority to CN201910950354.5A priority Critical patent/CN111132099B/en
Publication of CN111132099A publication Critical patent/CN111132099A/en
Application granted granted Critical
Publication of CN111132099B publication Critical patent/CN111132099B/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/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/69Spread spectrum techniques
    • H04B1/713Spread spectrum techniques using frequency hopping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • 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

本发明公开了一种蓝牙主、从设备的控制方法、装置及蓝牙设备,该控制方法包括如下步骤:在主设备内预先存储参考蓝牙时钟值、以及从设备蓝牙地址;在所述主设备开始搜索前,先将主设备时钟初始化为所述参考蓝牙时钟值,并锁定所述主设备时钟保持不变;根据主设备蓝牙地址以及所述参考蓝牙时钟值确定搜索频点,并在所述搜索频点上向所述从设备发送询问包;在所述搜索频点上尝试接收所述从设备发送的响应包,当接收到所述响应包后,解锁所述主设备时钟,以开始与所述从设备跳频连接。本发明连接步骤少,耗费时间少,能快速进入连接状态。

Figure 201910950354

The invention discloses a bluetooth master and slave device control method, device and bluetooth device. The control method includes the following steps: pre-store the reference bluetooth clock value and the bluetooth address of the slave device in the master device; Before searching, first initialize the master device clock to the reference Bluetooth clock value, and lock the master device clock to remain unchanged; determine the search frequency point according to the master device Bluetooth address and the reference Bluetooth clock value, and in the search Send an inquiry packet to the slave device at the frequency point; try to receive the response packet sent by the slave device at the search frequency point, and when the response packet is received, unlock the clock of the master device to start communicating with the slave device The frequency hopping connection of the slave device is described. The invention has few connection steps, consumes less time, and can quickly enter the connection state.

Figure 201910950354

Description

一种蓝牙主、从设备的控制方法、装置及蓝牙设备Method and device for controlling bluetooth master and slave devices, and bluetooth device

技术领域technical field

本发明涉及蓝牙通信领域,尤其涉及一种蓝牙主、从设备的控制方法、装置及蓝牙设备。The invention relates to the field of bluetooth communication, in particular to a control method and device for bluetooth master and slave equipment and bluetooth equipment.

背景技术Background technique

经典蓝牙设备之间进行数据传输之前,需要在设备之间建立可靠的无线连接链路。按照经典蓝牙协议规范,蓝牙设备分为蓝牙主设备(以下简称为主设备)及蓝牙从设备(以下简称为从设备),要建立连接链路,对于首次连接的主设备和从设备而言,需要经历以下步骤阶段:查询(inquiry)和查询响应(response)阶段、搜索阶段和连接确认阶段;对于再次连接的主设备和从设备而言,需要经历以下步骤阶段:搜索阶段和连接确认阶段。Before data transmission between classic Bluetooth devices, a reliable wireless connection link needs to be established between the devices. According to the classic Bluetooth protocol specification, Bluetooth devices are divided into Bluetooth master devices (hereinafter referred to as master devices) and Bluetooth slave devices (hereinafter referred to as slave devices). To establish a connection link, for the first connected master device and slave device, Need to go through the following steps: inquiry (inquiry) and query response (response) stage, search stage and connection confirmation stage; for the master device and slave device connected again, need to go through the following steps: search stage and connection confirmation stage.

查询和查询响应阶段(未在附图中示出):由于主设备并不知道周围存在哪些从设备,因此,主设备首先要在所有频点上跳频发送查询包,而从设备则要在所有频点上进行监听查询表,以获得潜在的主设备。当从设备监听到查询包后,向主设备发送从设备的从设备蓝牙地址。这个过程需要通常要耗费较长的时间。Inquiry and query response phase (not shown in the accompanying drawings): since the master device does not know which slave devices exist around, the master device first needs to hop frequency at all frequency points to send query packets, and the slave device needs to send query packets at all frequency points. Monitor the lookup table on all frequency points to obtain potential master devices. After the slave device monitors the query packet, it sends the slave device Bluetooth address of the slave device to the master device. This process usually takes a long time.

搜索阶段:如图1所示,主设备和从设备进入搜索阶段;主设备与目标从设备(例如,通过查询获得)进行配对(page),首先,主设备根据从设备的从设备蓝牙地址确定跳频序列,然后在该跳频序列上不同频点上发送ID包(包含从设备蓝牙地址的包);从设备进行配对扫描(page scan),从设备根据从设备蓝牙地址确定跳频序列,然后在该跳频序列上在不同频点上打开接收窗口进行扫描(scan)。跳频序列由蓝牙地址和蓝牙时钟内的时钟值决定,蓝牙地址决定了跳频序列中各个频点排列顺序,而蓝牙时钟内的时钟值决定了跳频序列的时序(跳频序列的频点在哪个时间点出现)。因此,在搜索阶段,由于主设备和从设备都是根据从设备蓝牙地址确定跳频序列,因此跳频序列的频点的顺序相同,但是由于在连接之前主设备的蓝牙时钟值与从设备的蓝牙时钟值通常是不相同的,因此两个跳频序列的时序是不相同的,导致主设备和从设备在同一个时间点上很难在同一个频点上,因此,可能需要经过较长的时间,从设备和主设备才能同时处于一个频点上(如图1中当主设备CLKN=N,从设备CLKN=k+1时,主设备和从设备处于同一个频点f(n)和f(k+1)上),且主设备发送ID包的时间段位于从设备扫描(SCAN)的时间窗口内,从设备才能接收到该ID包;在跳频序列的下一个频点f(n+1)上,从设备再返回ID包给主设备;主设备接收到该ID包后,在频点f(n+1)的下一个频点f(n+2)上,向从设备发送FHS包(主蓝牙时钟、主设备地址等信息);从设备接收到该FHS包后,在频点f(n+2)的下一个频点f(n+3)上,再向主设备发送ID包以确认。Search phase: As shown in Figure 1, the master device and the slave device enter the search phase; the master device is paired (paged) with the target slave device (for example, obtained by query), first, the master device determines the slave device Bluetooth address according to the slave device Frequency hopping sequence, and then send ID packets (packages containing the Bluetooth address of the slave device) on different frequency points on the frequency hopping sequence; the slave device performs a pairing scan (page scan), and the slave device determines the frequency hopping sequence according to the Bluetooth address of the slave device, Then open receiving windows at different frequency points on the frequency hopping sequence for scanning (scan). The frequency hopping sequence is determined by the Bluetooth address and the clock value in the Bluetooth clock. The Bluetooth address determines the arrangement order of each frequency point in the frequency hopping sequence, and the clock value in the Bluetooth clock determines the timing of the frequency hopping sequence (the frequency point of the frequency hopping sequence at what point in time). Therefore, in the search phase, since both the master device and the slave device determine the frequency hopping sequence according to the Bluetooth address of the slave device, the order of the frequency points of the frequency hopping sequence is the same, but because the Bluetooth clock value of the master device is different from that of the slave device before the connection The Bluetooth clock value is usually different, so the timing of the two frequency hopping sequences is different, making it difficult for the master device and the slave device to be on the same frequency point at the same time point, so it may take a long time time, the slave device and the master device can be at the same frequency point at the same time (as shown in Figure 1, when the master device CLKN=N and the slave device CLKN=k+1, the master device and the slave device are at the same frequency point f(n) and f(k+1)), and the time period when the master device sends the ID packet is within the time window of the slave device scan (SCAN), the slave device can receive the ID packet; at the next frequency point f( n+1), the slave device returns the ID packet to the master device; after receiving the ID packet, the master device sends a message to the slave device at the frequency point f(n+2) next to Send FHS packet (main bluetooth clock, master device address and other information); after the slave device receives the FHS packet, it will send to the master device at the next frequency point f(n+3) of the frequency point f(n+2). Send ID packet to confirm.

连接确认阶段:如图1所示,主设备和从设备进入连接确认阶段;主设备根据自身的主设备蓝牙地址和主设备时钟内的时钟值确定跳频序列的频点,同时从设备根据接收到的FHS包的时间点推算出主设备发送FHS包的时间点,然后校准从设备的跳频序列使其与主设备的跳频序列的时序一致,然后向空中发送POLL包询问,等待接收从设备响应;从设备根据FHS包信息的主设备蓝牙地址,根据主设备蓝牙地址和主设备蓝牙时钟内的时钟值,确定跳频序列的频点然后在该频点上接收主设备发送的POLL包后,向主设备发送响应包NULL以通知主设备收到询问包。至此,主设备和从设备确认连接完成;Connection confirmation stage: as shown in Figure 1, the master device and the slave device enter the connection confirmation stage; the master device determines the frequency point of the frequency hopping sequence according to its own master device Bluetooth address and the clock value in the master device clock, and the slave device determines the frequency point of the frequency hopping sequence according to the received Calculate the time point when the master device sends the FHS packet from the time point of the received FHS packet, then calibrate the frequency hopping sequence of the slave device to make it consistent with the timing of the frequency hopping sequence of the master device, and then send a POLL packet query to the air, waiting to receive the slave device The device responds; the slave device determines the frequency point of the frequency hopping sequence according to the Bluetooth address of the master device in the FHS packet information, the Bluetooth address of the master device and the clock value in the Bluetooth clock of the master device, and then receives the POLL packet sent by the master device at this frequency point After that, send a response packet NULL to the master device to notify the master device that it has received the inquiry packet. At this point, the master device and the slave device confirm that the connection is complete;

连接阶段:主设备和从设备进入跳频连接状态,可通过此连接链路进行数据传输。Connection stage: The master device and the slave device enter the frequency hopping connection state, and data transmission can be performed through this connection link.

上述搜索阶段中,采用的跳频方法选用的跳频序列长,导致主设备和从设备频点匹配的几率低;而且,配对(page)时使用跳频时间间隔大(平均625us一次频点更新);同时,由于搜索阶段主设备和从设备采用的连接参数(基于从设备的蓝牙地址和从设备蓝牙时钟的跳频序列)与最终的连接状态参数(基于主设备的蓝牙地址和主设备蓝牙时钟的跳频序列)不同,导致状态切换步骤增加。以上缺陷都将增加建立连接的时间消耗,无法满足此类应用场景下的快速连接要求。In the above-mentioned search phase, the frequency hopping sequence used by the frequency hopping method is long, resulting in a low frequency matching probability between the master device and the slave device; moreover, the frequency hopping time interval used for pairing (page) is large (an average frequency update of 625us ); At the same time, due to the connection parameters (based on the bluetooth address of the slave device and the frequency hopping sequence of the slave device bluetooth clock) and the final connection state parameters (based on the bluetooth address of the master device and the bluetooth The frequency hopping sequence of the clock) is different, resulting in an increase in state switching steps. The above defects will increase the time consumption of establishing a connection, and cannot meet the fast connection requirements in such application scenarios.

发明内容Contents of the invention

本发明提供了蓝牙主设备、从设备的控制方法、装置及蓝牙设备,对经典蓝牙标准协议规范中的搜索阶段使用的方法进行改进,以实现更快速的搜索连接,减少连接步骤,降低连接耗时。The invention provides a bluetooth master device, a control method and a device for a slave device, and a bluetooth device, and improves the method used in the search stage in the classic bluetooth standard protocol specification, so as to realize a faster search connection, reduce connection steps, and reduce connection consumption hour.

本发明提供了一种蓝牙主设备的控制方法,用于将主设备与从设备进行连接,包括如下步骤:在主设备内预先存储参考蓝牙时钟值、以及从设备蓝牙地址;在所述主设备开始搜索前,先将主设备时钟初始化为所述参考蓝牙时钟值,并锁定所述主设备时钟保持不变;根据主设备蓝牙地址以及所述参考蓝牙时钟值确定搜索频点,并在所述搜索频点上向所述从设备发送询问包;在所述搜索频点上尝试接收所述从设备发送的响应包,当接收到所述响应包后,解锁所述主设备时钟,以开始与所述从设备跳频连接。The present invention provides a control method of a bluetooth master device, which is used to connect the master device with a slave device, comprising the following steps: storing a reference bluetooth clock value and a bluetooth address of a slave device in advance in the master device; Before starting to search, first initialize the master device clock to the reference Bluetooth clock value, and lock the master device clock to remain unchanged; determine the search frequency point according to the master device Bluetooth address and the reference Bluetooth clock value, and in the Send an inquiry packet to the slave device on the search frequency point; try to receive the response packet sent by the slave device on the search frequency point, and after receiving the response packet, unlock the clock of the master device to start communicating with The slave device hops connections.

优选地,所述主设备是一对蓝牙耳机中的主耳机,所述从设备是所述一对蓝牙耳机中的从耳机。Preferably, the master device is a master earphone in a pair of Bluetooth earphones, and the slave device is a slave earphone in the pair of Bluetooth earphones.

本发明提供了一种蓝牙从设备的控制方法,用于将从设备与主设备进行连接,包括如下步骤:在从设备内预先存储参考蓝牙时钟值、以及主设备蓝牙地址;在所述从设备搜索到所述主设备前,将从设备时钟初始化为所述参考蓝牙时钟值,并锁定所述从设备时钟保持不变;根据主设备蓝牙地址以及所述参考蓝牙时钟值确定搜索频点,并在所述搜索频点上尝试接收所述主设备发送的询问包;当接收到所述询问包后,在所述搜索频点上向所述主设备发送响应包,再解锁所述从设备时钟,以开始与所述主设备跳频连接。The invention provides a control method of a bluetooth slave device, which is used to connect the slave device with a master device, comprising the following steps: pre-store a reference bluetooth clock value and a master device bluetooth address in the slave device; Before searching for the master device, initialize the slave device clock to the reference Bluetooth clock value, and lock the slave device clock to remain unchanged; determine the search frequency point according to the master device Bluetooth address and the reference Bluetooth clock value, and Attempt to receive the query packet sent by the master device at the search frequency point; after receiving the query packet, send a response packet to the master device at the search frequency point, and then unlock the clock of the slave device , to start a frequency-hopping connection with the master device.

优选地,所述主设备是一对蓝牙耳机中的主耳机,所述从设备是所述一对蓝牙耳机中的从耳机。Preferably, the master device is a master earphone in a pair of Bluetooth earphones, and the slave device is a slave earphone in the pair of Bluetooth earphones.

本发明提供了一种蓝牙主设备的控制装置,用于控制主设备与从设备进行连接,包括:存储单元,用于在主设备内预先存储参考蓝牙时钟值、以及从设备蓝牙地址;锁定单元,用于在所述主设备开始搜索前,先将主设备时钟初始化为所述参考蓝牙时钟值,并锁定所述主设备时钟保持不变;发送接收单元,用于根据所述主设备蓝牙地址以及所述参考蓝牙时钟值确定搜索频点,并在所述搜索频点上向所述从设备发送询问包,以及在所述搜索频点上尝试接收所述从设备发送的响应包;跳频连接单元,用于接收到所述响应包后,解锁所述主设备时钟,以开始与所述从设备跳频连接。The invention provides a control device of a Bluetooth master device, which is used to control the connection between the master device and the slave device, comprising: a storage unit for pre-storing the reference Bluetooth clock value and the Bluetooth address of the slave device in the master device; a locking unit , used to initialize the clock of the master device to the reference Bluetooth clock value before the master device starts searching, and lock the clock of the master device to remain unchanged; the sending and receiving unit is used to And the reference Bluetooth clock value determines the search frequency point, and sends an inquiry packet to the slave device on the search frequency point, and tries to receive the response packet sent by the slave device on the search frequency point; frequency hopping The connection unit is configured to unlock the clock of the master device after receiving the response packet, so as to start a frequency hopping connection with the slave device.

优选地,所述主设备是一对蓝牙耳机中的主耳机,所述从设备是所述一对蓝牙耳机中的从耳机。Preferably, the master device is a master earphone in a pair of Bluetooth earphones, and the slave device is a slave earphone in the pair of Bluetooth earphones.

本发明提供了一种蓝牙从设备的控制装置,用于控制从设备与主设备进行连接,包括:存储单元,用于在从设备内预先存储参考蓝牙时钟值、以及主设备蓝牙地址;锁定单元,用于在所述从设备搜索到所述主设备前,将从设备时钟初始化为所述参考蓝牙时钟值,并锁定所述从设备时钟保持不变;发送单元,用于根据所述主设备蓝牙地址以及所述参考蓝牙时钟值确定搜索频点,并在所述搜索频点上尝试接收所述主设备发送的询问包;跳频连接单元,用于接收到所述询问包后,在所述搜索频点上向所述主设备发送响应包,再解锁所述从设备时钟,以开始与所述主设备跳频连接。The present invention provides a control device for a Bluetooth slave device, which is used to control the connection between the slave device and the master device, comprising: a storage unit for pre-storing the reference Bluetooth clock value and the Bluetooth address of the master device in the slave device; a locking unit , used to initialize the clock of the slave device to the reference bluetooth clock value before the slave device searches for the master device, and lock the clock of the slave device to remain unchanged; the sending unit is used for according to the master device The bluetooth address and the reference bluetooth clock value determine the search frequency point, and try to receive the inquiry packet sent by the master device at the search frequency point; the frequency hopping connection unit is configured to, after receiving the inquiry packet, Send a response packet to the master device at the search frequency point, and then unlock the clock of the slave device to start a frequency hopping connection with the master device.

优选地,所述主设备是一对蓝牙耳机中的主耳机,所述从设备是所述一对蓝牙耳机中的从耳机。Preferably, the master device is a master earphone in a pair of Bluetooth earphones, and the slave device is a slave earphone in the pair of Bluetooth earphones.

本发明提供了一种蓝牙主设备与从设备的连接控制方法,包括如下步骤:在主设备内预先存储参考蓝牙时钟值、以及从设备蓝牙地址,在从设备内预先存储参考蓝牙时钟值、以及主设备蓝牙地址;在所述主设备开始搜索前,先将主设备时钟初始化为所述参考蓝牙时钟值,并锁定所述主设备时钟保持不变;根据主设备蓝牙地址以及所述参考蓝牙时钟值确定搜索频点,并在所述搜索频点上向所述从设备发送询问包;在所述从设备搜索到所述主设备前,将从设备时钟初始化为所述参考蓝牙时钟值,并锁定所述从设备时钟保持不变;根据主设备蓝牙地址以及所述参考蓝牙时钟值确定搜索频点,并在所述搜索频点上尝试接收所述主设备发送的询问包;当接收到所述询问包后,在所述搜索频点上向所述主设备发送响应包;在所述搜索频点上尝试接收所述从设备发送的响应包,当接收到所述响应包后,解锁所述主设备时钟,以开始所述主设备与从设备跳频连接。The invention provides a connection control method between a Bluetooth master device and a slave device, comprising the following steps: pre-store a reference Bluetooth clock value and a slave device Bluetooth address in the master device, pre-store the reference Bluetooth clock value in the slave device, and Master device Bluetooth address; before the master device starts searching, first initialize the master device clock to the reference Bluetooth clock value, and lock the master device clock to remain unchanged; according to the master device Bluetooth address and the reference Bluetooth clock The value determines the search frequency point, and sends an inquiry packet to the slave device on the search frequency point; before the slave device searches the master device, initializes the slave device clock to the reference Bluetooth clock value, and Lock the clock of the slave device to remain unchanged; determine the search frequency point according to the Bluetooth address of the master device and the reference Bluetooth clock value, and try to receive the inquiry packet sent by the master device at the search frequency point; when receiving the After receiving the inquiry packet, send a response packet to the master device at the search frequency point; try to receive the response packet sent by the slave device at the search frequency point, and unlock the The master device clock is used to start the frequency hopping connection between the master device and the slave device.

本发明提供了一种蓝牙设备,包括权利要求5-8所述的控制装置,还包括存储介质,所述存储介质存有计算机程序,所述计算机程序被处理器执行成任一所述的方法。The present invention provides a bluetooth device, including the control device described in claims 5-8, and also includes a storage medium, the storage medium stores a computer program, and the computer program is executed by a processor as any one of the described methods .

有益效果:Beneficial effect:

通过在从设备中预先存储主设备蓝牙地址和蓝牙参考时钟,以及在主设备预先存储从设备蓝牙地址和蓝牙参考时钟,并锁定主设备时钟和从设备时钟,从而使得主设备和从设备一开始在同一个搜索频点上进行搜索,与经典蓝牙协议中主设备和从设备搜索的过程相比,连接的步骤更少,耗费时间大大减少,快速进入连接状态,提高了用户体验并降低了功耗。By pre-storing the master device Bluetooth address and Bluetooth reference clock in the slave device, and pre-storing the slave device Bluetooth address and Bluetooth reference clock in the master device, and locking the master device clock and the slave device clock, so that the master device and the slave device start Searching on the same search frequency point, compared with the process of searching for the master device and the slave device in the classic Bluetooth protocol, the connection steps are less, the time-consuming is greatly reduced, and the connection state is quickly entered, which improves the user experience and reduces the power consumption. consumption.

附图说明Description of drawings

图1为现有技术中经典蓝牙连接方法的流程示意图。FIG. 1 is a schematic flowchart of a classic Bluetooth connection method in the prior art.

图2为本发明蓝牙主设备与蓝牙从设备的连接控制方法一种实施例的流程示意图。FIG. 2 is a schematic flowchart of an embodiment of a method for controlling a connection between a Bluetooth master device and a Bluetooth slave device according to the present invention.

图3是本发明蓝牙主设备与蓝牙从设备的连接控制方法一种实施例的流程框图。Fig. 3 is a flowchart of an embodiment of a method for controlling the connection between a Bluetooth master device and a Bluetooth slave device according to the present invention.

具体实施方式Detailed ways

为了对本发明的技术方案进行更详细的说明,以促进对本发明的进一步理解,下面结合附图描述本发明的具体实施方式。但应当理解,所有示意性实施例及其说明用于解释本发明,并不构成对本发明的唯一限定。In order to describe the technical solution of the present invention in more detail and facilitate a further understanding of the present invention, the specific implementation manners of the present invention will be described below in conjunction with the accompanying drawings. However, it should be understood that all the exemplary embodiments and their descriptions are used to explain the present invention, and do not constitute the only limitation to the present invention.

一个预设好的蓝牙设备群组包括蓝牙主设备(以下简称主设备)和蓝牙从设备(以下简称从设备),即主设备和从设备从属于该蓝牙设备群组,主设备和从设备之间的连接是已知且固定的。在一个实施例中,主设备和从设备可以分别是一对蓝牙耳机中的主耳机和从耳机。A preset Bluetooth device group includes a Bluetooth master device (hereinafter referred to as the master device) and a Bluetooth slave device (hereinafter referred to as the slave device), that is, the master device and the slave device belong to the Bluetooth device group, and the master device and the slave device The connections between are known and fixed. In one embodiment, the master device and the slave device may be respectively the master earphone and the slave earphone in a pair of Bluetooth earphones.

如图3所示,主设备与从设备的连接控制方法的一种实施例,包括如下步骤。As shown in FIG. 3 , an embodiment of a method for controlling a connection between a master device and a slave device includes the following steps.

S11、在主设备和从设备内预先设置配置信息S11. Presetting configuration information in the master device and the slave device

在主设备内预先存储用于与从设备进行连接的第一配置信息,在从设备内预先存储用于与主设备进行连接的第二配置信息;其中,主设备和从设备从属于一个蓝牙设备群组,第一配置信息包括从设备的从设备蓝牙地址和参考蓝牙时钟值;第二配置信息包括主设备的主设备蓝牙地址和参考蓝牙时钟值。The first configuration information for connecting with the slave device is pre-stored in the master device, and the second configuration information for connecting with the master device is pre-stored in the slave device; wherein, the master device and the slave device belong to a Bluetooth device Group, the first configuration information includes the slave device Bluetooth address and the reference Bluetooth clock value of the slave device; the second configuration information includes the master device Bluetooth address and the reference Bluetooth clock value of the master device.

S12、初始化主设备时钟为参考蓝牙时钟值,固定主设备时钟,并发送询问包S12. Initialize the clock of the master device as the reference Bluetooth clock value, fix the clock of the master device, and send an inquiry packet

在主设备开始搜索从设备前,主设备将本身的蓝牙时钟(以下称为主时钟设备)初始化为参考蓝牙时钟值,并锁定主设备时钟保持不变;主设备根据主设备蓝牙地址以及被锁定的主设备时钟确定搜索频点,并在搜索频点上向从设备发送询问包。Before the master device starts to search for the slave device, the master device initializes its own Bluetooth clock (hereinafter referred to as the master clock device) to the reference Bluetooth clock value, and locks the master device clock to remain unchanged; the master device is locked according to the master device Bluetooth address and The master device clock determines the search frequency point, and sends an inquiry packet to the slave device on the search frequency point.

在经典蓝牙协议中,蓝牙设备当前所在的无线频点取决于蓝牙地址和蓝牙时钟内的蓝牙时钟值,对于给定的蓝牙设备而言,由于蓝牙地址是固定的,蓝牙时钟内的蓝牙时钟值的不断变化将导致蓝牙设备所在无线频点不断变化,即所谓跳频。经典蓝牙协议中,每经过625微秒,蓝牙时钟内的蓝牙时钟值增加1,从而使蓝牙时钟值不断变化。在经典蓝牙中的硬件架构中,蓝牙时钟无法被停止,或者锁定。在本方案中,为了锁定蓝牙时钟,需要对蓝牙时钟进行一定的改动,例如,对蓝牙时钟增加使能端,当向该控制端输出使能信号时,蓝牙时钟开始计数(也就是计时);当向该控制端输出锁定信号时,蓝牙时钟被锁定,停止计数。In the classic Bluetooth protocol, the current wireless frequency of the Bluetooth device depends on the Bluetooth address and the Bluetooth clock value in the Bluetooth clock. For a given Bluetooth device, since the Bluetooth address is fixed, the Bluetooth clock value in the Bluetooth clock The constant change of the frequency will lead to the constant change of the wireless frequency point where the Bluetooth device is located, which is the so-called frequency hopping. In the classic Bluetooth protocol, every 625 microseconds, the Bluetooth clock value in the Bluetooth clock increases by 1, so that the Bluetooth clock value keeps changing. In the hardware architecture in Classic Bluetooth, the Bluetooth clock cannot be stopped, or locked. In this solution, in order to lock the Bluetooth clock, certain changes need to be made to the Bluetooth clock. For example, an enable terminal is added to the Bluetooth clock. When an enable signal is output to the control terminal, the Bluetooth clock starts counting (that is, timing); When the locking signal is output to the control terminal, the bluetooth clock is locked and stops counting.

在本方案中,在主设备开始搜索从设备前,将主设备的主设备时钟初始化为参考蓝牙时钟值,然后锁定主设备时钟,使主设备时钟内的时钟值保持不变,一直保持为参考蓝牙时钟值,故蓝牙主设备根据该锁定的主设备时钟内不变的蓝牙时钟值(即参考蓝牙时钟值)得到的无线频点是固定不变的,即主设备所在的无线频点固定,主设备在此无线频点上向从设备发送询问包,以搜索从设备,故该无线频点可称为搜索频点。询问包中包含了从设备的蓝牙地址和主设备的蓝牙地址,从设备根据询问包的这两个地址、以及本身预先存储的第二配置信息可以确定发出该询问包的设备是否是这个蓝牙设备群组的主设备。询问包可以采用经典蓝牙协议中的询问包。In this solution, before the master device starts to search for the slave device, the master device clock of the master device is initialized to the reference Bluetooth clock value, and then the master device clock is locked, so that the clock value in the master device clock remains unchanged and remains as the reference Bluetooth clock value, so the wireless frequency point obtained by the Bluetooth master device based on the constant Bluetooth clock value (that is, the reference Bluetooth clock value) in the locked master device clock is fixed, that is, the wireless frequency point where the master device is located is fixed, The master device sends an inquiry packet to the slave device on this wireless frequency point to search for the slave device, so this wireless frequency point can be called a search frequency point. The inquiry packet contains the Bluetooth address of the slave device and the Bluetooth address of the master device. The slave device can determine whether the device sending the inquiry packet is the Bluetooth device according to the two addresses of the inquiry packet and the second configuration information stored in advance. The master device of the group. The inquiry packet may adopt an inquiry packet in the classic bluetooth protocol.

如图2所示,主设备的搜索频点被固定在f(n*)上,并在该搜索频点f(n*)上不断发送询问包POLL包。As shown in FIG. 2 , the search frequency point of the master device is fixed at f(n*), and continuously sends inquiry packets POLL packets at the search frequency point f(n*).

S13、初始化从设备时钟为参考蓝牙时钟值,固定从设备时钟,并尝试接收询问包S13. Initialize the slave device clock as the reference Bluetooth clock value, fix the slave device clock, and try to receive the query packet

在从设备搜索到主设备前,从设备将从设备时钟初始化为参考蓝牙时钟值,并锁定从设备时钟保持不变;从设备根据主设备蓝牙地址以及被锁定的从设备时钟确定搜索频点,并在搜索频点上尝试接收主设备发送的询问包。Before the slave device searches for the master device, the slave device initializes the slave device clock to the reference Bluetooth clock value, and locks the slave device clock to remain unchanged; the slave device determines the search frequency point according to the master device Bluetooth address and the locked slave device clock, And try to receive the query packet sent by the master device on the search frequency point.

为了及时搜索到主设备、接收到主设备发送的询问包,从设备需要处于主设备所在的无线频点上,即上述搜索频点。由于在搜索到主设备前,从设备的从设备时钟被初始化为参考蓝牙时钟值,从设备根据该从设备时钟内的参考蓝牙时钟值即可得到该搜索频点,然后在该搜索频点上尝试接收主设备发送的询问包:如果主设备发送询问包的时间段刚好位于从设备尝试接收的时间窗口(即扫描窗口)内,则从设备能成功接收到询问包;如果主设备发送询问包的时间段位于从设备尝试接收的时间窗口外,则从设备无法接收到该询问包,故从设备需要再次尝试接收询问包,或者说,主设备需要再次发送询问包,以使发送询问包的时间段刚好位于从设备尝试接收的时间窗口内。由于从设备时钟被锁定了,从设备时钟内的值一直保持在参考蓝牙时钟值,故在这个阶段从设备一直处于该搜索频点上。In order to search for the master device in time and receive the inquiry packet sent by the master device, the slave device needs to be at the wireless frequency point where the master device is located, that is, the above-mentioned search frequency point. Since the slave device clock of the slave device is initialized to the reference Bluetooth clock value before searching for the master device, the slave device can obtain the search frequency point according to the reference Bluetooth clock value in the slave device clock, and then at the search frequency point Try to receive the query packet sent by the master device: If the time period for the master device to send the query packet is just within the time window (that is, the scanning window) that the slave device tries to receive, the slave device can successfully receive the query packet; if the master device sends the query packet If the time period of the slave device is outside the time window for the slave device to try to receive, the slave device cannot receive the inquiry packet, so the slave device needs to try to receive the inquiry packet again, or the master device needs to send the inquiry packet again, so that the sending inquiry packet The time period is exactly within the time window the slave device is trying to receive. Because the clock of the slave device is locked, the value in the clock of the slave device remains at the reference Bluetooth clock value, so the slave device is always at the search frequency point at this stage.

如图2所示,主设备的搜索频点被固定在f(n*)上,并在该搜索频点f(n*)上不断尝试接收询问包POLL包。As shown in FIG. 2 , the search frequency point of the master device is fixed at f(n*), and continuously tries to receive the inquiry packet POLL packet at the search frequency point f(n*).

S14、当从设备接收到蓝牙主设备发送的询问包后,从设备在搜索频点上向主设备发送响应包,并解锁从设备时钟。S14. After the slave device receives the inquiry packet sent by the Bluetooth master device, the slave device sends a response packet to the master device at the search frequency point, and unlocks the clock of the slave device.

从设备判定该询问包是主设备发送的之后,在该搜索频点上向主设备发送响应包,以通知主设备从设备已收到该询问包。响应包包含了从设备的蓝牙地址和主设备的蓝牙地址,主设备根据响应包的这两个地址、以及本身预先存储的第一配置信息可以确定发出该响应包的设备是否是这个蓝牙设备群组的从设备。响应包可以采用经典蓝牙协议中的响应包。After the slave device determines that the inquiry packet is sent by the master device, it sends a response packet to the master device at the search frequency point to notify the master device that the slave device has received the inquiry packet. The response packet contains the Bluetooth address of the slave device and the Bluetooth address of the master device. The master device can determine whether the device sending the response packet is the Bluetooth device group according to the two addresses of the response packet and the first configuration information stored in advance. group of slave devices. The response packet may adopt the response packet in the classic Bluetooth protocol.

在发送响应包之后,从设备对从设备时钟进行解锁,此时从设备时钟开始在参考蓝牙时钟值的基础上开始运行。由于运行的从设备时钟内的时钟值不断变化,从而从设备所在的频点不断变化,从设备开始进入跳频状态。After sending the response packet, the slave device unlocks the slave device clock, and at this time, the slave device clock starts to run based on the reference Bluetooth clock value. Since the clock value in the running slave device clock is constantly changing, the frequency point where the slave device is located is constantly changing, and the slave device starts to enter the frequency hopping state.

如图2所示,当从设备在搜索频点f(n*)上接收询问包POLL包后,从设备在搜索频点f(n*)上发送响应包NULL包,并解锁从设备时钟,从设备时钟下一个频点即进入f(n*+1)。As shown in Figure 2, when the slave device receives the query packet POLL packet at the search frequency point f(n*), the slave device sends a response packet NULL packet at the search frequency point f(n*), and unlocks the clock of the slave device, The next frequency point of the slave device clock enters f(n*+1).

S15、主设备在搜索频点上尝试接收从设备发送的响应包,当主设备接收到从设备发送的响应包后,解锁主设备时钟。S15. The master device tries to receive the response packet sent by the slave device at the search frequency point, and unlocks the clock of the master device after receiving the response packet sent by the slave device.

为了判断从设备是否收到询问包,主设备在搜索频点上尝试接收从设备发送的响应包,若从设备发送响应包的时间段刚好落在主设备尝试接收的时间窗口内,则主设备能成功接收到响应包;若从设备发送响应包的时间段落在主设备尝试接收的时间窗口外,则主设备能无法接收到响应包。In order to judge whether the slave device has received the query packet, the master device tries to receive the response packet sent by the slave device on the search frequency point. The response packet can be successfully received; if the time period for the slave device to send the response packet is outside the time window for the master device to try to receive, the master device may not be able to receive the response packet.

主设备可以周期性地在该搜索频点上的发送询问包和尝试接收响应包,且发送询问包的开始时间点和尝试接收响应包的开始时间点在该时间周期的位置中是设定好的且固定的,两个时间点的间隔是固定的,因此,当从设备接收到该询问包后,根据收到该询问包时的本从设备的计时器(在经典蓝牙协议中,此计时器不同于蓝牙时钟,其作用包括用于同步主设备和从设备之间的收发)的时间点和上述已知的固定间隔,即可以计算出主设备发送询问包的开始时间点与从设备尝试接收询问包的开始时间点之间的差值,以便从设备在主设备尝试接收询问包的时间点上发送响应包,以保证主设备能够收到响应包。从设备可以根据上述计算得到的差值,调整本身的计时器,使与主设备的计时器同步,以便使得在主设备和从设备跳频连接状态,主设备在发送数据时从设备能够接收到,从设备在发送数据时主设备能够接收到。The master device can periodically send inquiry packets and try to receive response packets at the search frequency point, and the start time point of sending inquiry packets and the start time point of attempting to receive response packets are set in the position of this time period and fixed, the interval between two time points is fixed, therefore, when the slave device receives the inquiry packet, according to the timer of the slave device when receiving the inquiry packet (in the classic Bluetooth protocol, this timing The device is different from the bluetooth clock, its function includes the time point for synchronizing the transmission and reception between the master device and the slave device and the above-mentioned known fixed interval, that is, it can calculate the start time point of the master device sending the inquiry packet and the slave device's attempt The difference between the start time points of receiving inquiry packets, so that the slave device sends a response packet at the time point when the master device tries to receive the inquiry packet, so as to ensure that the master device can receive the response packet. The slave device can adjust its own timer according to the difference calculated above to synchronize with the timer of the master device, so that in the state of frequency hopping connection between the master device and the slave device, the slave device can receive , the master device can receive when the slave device sends data.

主设备判定该响应包是从设备发送的之后,此时主设备时钟开始在参考蓝牙时钟值的基础上开始运行,如图2所示,主设备时钟下一个频点进入f(n*+1)。由于运行的主设备时钟内的时钟值不断变化,从而主设备所在的频点不断变化,主设备开始进入跳频状态。After the master device determines that the response packet is sent by the slave device, the master device clock starts to run on the basis of the reference Bluetooth clock value. As shown in Figure 2, the next frequency point of the master device clock enters f(n*+1 ). Since the clock value in the running master device clock is constantly changing, the frequency point where the master device is located is constantly changing, and the master device starts to enter the frequency hopping state.

S16、主设备开始与从设备跳频连接。S16. The master device starts a frequency hopping connection with the slave device.

由于主设备和从设备产生的无线频点的蓝牙地址和蓝牙时钟都是相同的,因此主设备的跳频序列(即无线频点的先后顺序)和从设备的跳频序列是相同的;根据前面步骤S5可知,在从设备接收到主设备发送的询问包之后,从设备可以通过计算获得从设备与主设备计时器之间的时差,从设备通过修正本身的计时器以与主设备保持同步,从而可以保证主设备和从设备之间的跳频连接通信。Since the Bluetooth address and Bluetooth clock of the wireless frequency point generated by the master device and the slave device are the same, the frequency hopping sequence of the master device (that is, the sequence of wireless frequency points) and the frequency hopping sequence of the slave device are the same; The previous step S5 shows that after the slave device receives the inquiry packet sent by the master device, the slave device can obtain the time difference between the timer of the slave device and the master device through calculation, and the slave device can maintain synchronization with the master device by correcting its own timer , so that the frequency hopping connection communication between the master device and the slave device can be guaranteed.

S17、当从设备与主设备连接结束后,从设备再将从设备时钟初始化为蓝牙时钟值,并锁定从设备时钟保持不变,以便在搜索频点上尝试接收下一次主设备发送的询问包。S17. After the connection between the slave device and the master device is completed, the slave device initializes the slave device clock to the Bluetooth clock value, and locks the slave device clock to remain unchanged, so as to try to receive the next inquiry packet sent by the master device at the search frequency point .

在本实施例中,通过在从设备中预先存储主设备蓝牙地址和蓝牙参考时钟,以及在主设备预先存储从设备蓝牙地址和蓝牙参考时钟,并锁定主设备时钟和从设备时钟,从而使得主设备和从设备一开始在同一个搜索频点上进行搜索,与经典蓝牙协议中主设备和从设备搜索的过程相比,连接的步骤更少,耗费时间大大减少,快速进入连接状态,很好的提高用户体验并降低功耗。In this embodiment, the master device Bluetooth address and the Bluetooth reference clock are pre-stored in the slave device, and the slave device Bluetooth address and the Bluetooth reference clock are pre-stored in the master device, and the master device clock and the slave device clock are locked, so that the master device The device and the slave device search on the same search frequency point at the beginning. Compared with the process of searching for the master device and the slave device in the classic Bluetooth protocol, the connection steps are fewer, the time-consuming is greatly reduced, and the connection state is quickly entered, which is very good Improve user experience and reduce power consumption.

本发明还提供了一种蓝牙主设备的控制装置,用于控制主设备与从设备进行连接,包括:The present invention also provides a control device for a Bluetooth master device, which is used to control the connection between the master device and the slave device, including:

存储单元,用于在主设备内预先存储参考蓝牙时钟值、以及从设备蓝牙地址;The storage unit is used to pre-store the reference Bluetooth clock value and the Bluetooth address of the slave device in the master device;

锁定单元,用于在所述主设备开始搜索前,先将主设备时钟初始化为所述参考蓝牙时钟值,并锁定所述主设备时钟保持不变;The locking unit is used to initialize the clock of the master device to the reference Bluetooth clock value before the master device starts searching, and lock the clock of the master device to remain unchanged;

发送接收单元,用于根据所述主设备蓝牙地址以及所述参考蓝牙时钟值确定搜索频点,并在所述搜索频点上向所述从设备发送询问包,以及在所述搜索频点上尝试接收所述从设备发送的响应包;A sending and receiving unit, configured to determine a search frequency point according to the Bluetooth address of the master device and the reference Bluetooth clock value, and send an inquiry packet to the slave device at the search frequency point, and at the search frequency point Attempt to receive the response packet sent from the device;

跳频连接单元,用于接收到所述响应包后,解锁所述主设备时钟,以开始与所述从设备跳频连接。The frequency hopping connection unit is configured to unlock the clock of the master device after receiving the response packet, so as to start the frequency hopping connection with the slave device.

该蓝牙主设备的控制装置执行的其他步骤,具体参见前面实施例主设备的执行步骤,在此不再赘述。For other steps performed by the control device of the Bluetooth master device, refer to the execution steps of the master device in the foregoing embodiment for details, and details are not repeated here.

本发明还提供了一种蓝牙从设备的控制装置,用于控制从设备与主设备进行连接,包括:The present invention also provides a control device for a Bluetooth slave device, which is used to control the connection between the slave device and the master device, including:

存储单元,用于在从设备内预先存储参考蓝牙时钟值、以及主设备蓝牙地址;The storage unit is used to pre-store the reference Bluetooth clock value and the Bluetooth address of the master device in the slave device;

锁定单元,用于在所述从设备搜索到所述主设备前,将从设备时钟初始化为所述参考蓝牙时钟值,并锁定所述从设备时钟保持不变;A locking unit, configured to initialize the clock of the slave device to the reference Bluetooth clock value before the slave device searches for the master device, and lock the clock of the slave device to remain unchanged;

发送单元,用于根据所述主设备蓝牙地址以及所述参考蓝牙时钟值确定搜索频点,并在所述搜索频点上尝试接收所述主设备发送的询问包;A sending unit, configured to determine a search frequency point according to the Bluetooth address of the master device and the reference Bluetooth clock value, and try to receive an inquiry packet sent by the master device at the search frequency point;

跳频连接单元,用于接收到所述询问包后,在所述搜索频点上向所述主设备发送响应包,再解锁所述从设备时钟,以开始与所述主设备跳频连接。The frequency hopping connection unit is configured to send a response packet to the master device at the search frequency point after receiving the inquiry packet, and then unlock the clock of the slave device to start a frequency hopping connection with the master device.

该蓝牙从设备的控制装置执行的其他步骤,具体参见前面实施例从设备的执行步骤,在此不再赘述。For other steps performed by the control device of the Bluetooth slave device, refer to the execution steps of the slave device in the previous embodiment for details, and details are not repeated here.

本发明还提供了一种蓝牙设备,包括存储介质,所述存储介质存有计算机程序,所述计算机程序被处理器执行所述的一种蓝牙主设备与从设备连接的方法方法,或者一种蓝牙主设备与从设备连接的方法,具体参见前面实施例主设备和从设备的执行步骤,在此不再赘述。The present invention also provides a bluetooth device, including a storage medium, the storage medium stores a computer program, and the computer program is executed by a processor to connect a bluetooth master device with a slave device, or a For the method of connecting the Bluetooth master device and the slave device, refer to the execution steps of the master device and the slave device in the previous embodiment for details, and details are not repeated here.

本领域的技术人员能够理解的是,在不冲突的前提下,上述各优选方案可以自由地组合、叠加。Those skilled in the art can understand that, on the premise of no conflict, the above-mentioned preferred solutions can be freely combined and superimposed.

应当理解,上述的实施方式仅是示例性的,而非限制性的,在不偏离本发明的基本原理的情况下,本领域的技术人员可以针对上述细节做出的各种明显的或等同的修改或替换,都将包含于本发明的权利要求范围内。It should be understood that the above-mentioned implementations are only exemplary rather than limiting, and those skilled in the art can make various obvious or equivalent solutions to the above-mentioned details without departing from the basic principles of the present invention. Any modification or replacement will be included in the scope of the claims of the present invention.

Claims (13)

1. A control method of a Bluetooth master device is used for connecting the master device with a slave device, and is characterized by comprising the following steps:
pre-storing a reference Bluetooth clock value and a Bluetooth address of a slave device in a master device;
initializing a master device clock to the reference Bluetooth clock value before the master device starts to search, and locking the master device clock to keep unchanged;
determining a searching frequency point according to a master equipment Bluetooth address and the reference Bluetooth clock value, and sending an inquiry packet to the slave equipment on the searching frequency point;
and trying to receive a response packet sent by the slave equipment on the searching frequency point, and unlocking the clock of the master equipment after receiving the response packet so as to start frequency hopping connection with the slave equipment.
2. The control method according to claim 1,
the master device is a master headset of a pair of bluetooth headsets and the slave device is a slave headset of the pair of bluetooth headsets.
3. A control method of a bluetooth slave device for connecting the slave device with a master device, comprising the steps of:
pre-storing a reference Bluetooth clock value and a master Bluetooth address in the slave equipment;
before the slave device searches the master device, initializing a slave device clock to the reference Bluetooth clock value, and locking the slave device clock to keep unchanged;
determining a searching frequency point according to a Bluetooth address of the main equipment and the reference Bluetooth clock value, and trying to receive an inquiry packet sent by the main equipment on the searching frequency point;
and after receiving the inquiry packet, sending a response packet to the master device on the searching frequency point, and unlocking the clock of the slave device to start frequency hopping connection with the master device.
4. The control method according to claim 3,
the master device is a master headset of a pair of bluetooth headsets and the slave device is a slave headset of the pair of bluetooth headsets.
5. A control device of a Bluetooth master device, which is used for controlling the master device to be connected with a slave device, is characterized by comprising:
the storage unit is used for pre-storing a reference Bluetooth clock value and a Bluetooth address of the slave device in the master device;
the locking unit is used for initializing a master device clock to the reference Bluetooth clock value before the master device starts searching, and locking the master device clock to keep unchanged;
a sending and receiving unit, configured to determine a search frequency point according to the master device bluetooth address and the reference bluetooth clock value, send an inquiry packet to the slave device on the search frequency point, and attempt to receive a response packet sent by the slave device on the search frequency point;
and the frequency hopping connection unit is used for unlocking the clock of the master device after receiving the response packet so as to start frequency hopping connection with the slave device.
6. The control apparatus of claim 5,
the master device is a master headset of a pair of bluetooth headsets and the slave device is a slave headset of the pair of bluetooth headsets.
7. A control device of a Bluetooth slave device, which is used for controlling the slave device to be connected with a master device, is characterized by comprising:
the storage unit is used for pre-storing a reference Bluetooth clock value and a master device Bluetooth address in the slave device;
the locking unit is used for initializing a slave device clock to the reference Bluetooth clock value before the slave device searches the master device, and locking the slave device clock to keep unchanged;
the transmitting unit is used for determining a searching frequency point according to the master equipment Bluetooth address and the reference Bluetooth clock value and trying to receive an inquiry packet transmitted by the master equipment on the searching frequency point;
and the frequency hopping connection unit is used for sending a response packet to the master equipment on the searching frequency point after receiving the inquiry packet, and unlocking the clock of the slave equipment to start frequency hopping connection with the master equipment.
8. The control device of claim 7,
the master device is a master headset in a pair of bluetooth headsets and the slave device is a slave headset in the pair of bluetooth headsets.
9. A connection control method of a Bluetooth master device and a Bluetooth slave device is characterized by comprising the following steps:
pre-storing a reference Bluetooth clock value and a slave equipment Bluetooth address in the master equipment, and pre-storing the reference Bluetooth clock value and the master equipment Bluetooth address in the slave equipment;
initializing a master device clock to the reference Bluetooth clock value before the master device starts to search, and locking the master device clock to keep unchanged;
determining a searching frequency point according to a master equipment Bluetooth address and the reference Bluetooth clock value, and sending an inquiry packet to the slave equipment on the searching frequency point;
initializing a slave device clock to the reference Bluetooth clock value before the slave device searches the master device, and locking the slave device clock to keep unchanged;
determining a searching frequency point according to a Bluetooth address of the main equipment and the reference Bluetooth clock value, and trying to receive an inquiry packet sent by the main equipment on the searching frequency point;
after receiving the inquiry packet, sending a response packet to the master device on the search frequency point, and then unlocking the clock of the slave device;
and trying to receive a response packet sent by the slave equipment on the searching frequency point, and unlocking the clock of the master equipment after receiving the response packet so as to start frequency hopping connection between the master equipment and the slave equipment.
10. A Bluetooth device comprising the control apparatus of claim 5 or 6.
11. A bluetooth device comprising the control apparatus of claim 7 or 8.
12. A bluetooth device comprising a storage medium having stored thereon a computer program for execution by a processor as the method of claim 1 or 2.
13. A Bluetooth device comprising a storage medium having stored thereon a computer program for execution by a processor to perform the method of claim 3 or 4.
CN201910950354.5A 2019-10-08 2019-10-08 Control method and device for Bluetooth master and slave devices and Bluetooth device Active CN111132099B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910950354.5A CN111132099B (en) 2019-10-08 2019-10-08 Control method and device for Bluetooth master and slave devices and Bluetooth device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910950354.5A CN111132099B (en) 2019-10-08 2019-10-08 Control method and device for Bluetooth master and slave devices and Bluetooth device

Publications (2)

Publication Number Publication Date
CN111132099A CN111132099A (en) 2020-05-08
CN111132099B true CN111132099B (en) 2023-03-24

Family

ID=70496064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910950354.5A Active CN111132099B (en) 2019-10-08 2019-10-08 Control method and device for Bluetooth master and slave devices and Bluetooth device

Country Status (1)

Country Link
CN (1) CN111132099B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970669B (en) * 2020-08-17 2023-11-24 立讯电子科技(昆山)有限公司 Bluetooth connection method and device and Bluetooth equipment
CN112020047A (en) * 2020-09-02 2020-12-01 上海富芮坤微电子有限公司 Bluetooth communication method, medium, bluetooth device and communication system
CN113055868B (en) * 2021-03-12 2022-09-23 上海物骐微电子有限公司 Bluetooth fast networking method, system and Bluetooth headset
CN115665888A (en) * 2022-10-31 2023-01-31 深圳市中科蓝讯科技股份有限公司 Method for establishing Bluetooth connection, storage medium, chip, earphone and equipment system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1389050A (en) * 2000-06-26 2003-01-01 皇家菲利浦电子有限公司 Communication system
CN1631013A (en) * 2002-02-12 2005-06-22 诺基亚公司 Design of short-range radio frequency access point supporting master and slave mobile device services
CN101646245A (en) * 2008-06-16 2010-02-10 美国博通公司 Method and system for bluetooth and wimax coexistence
CN105207733A (en) * 2015-09-09 2015-12-30 深圳市艾迪思特信息技术有限公司 Wireless access and transmission method of integrated voice and data
CN107567007A (en) * 2016-07-01 2018-01-09 英特尔Ip公司 Short distance radio communication equipment and the method for controlling the equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1389050A (en) * 2000-06-26 2003-01-01 皇家菲利浦电子有限公司 Communication system
CN1631013A (en) * 2002-02-12 2005-06-22 诺基亚公司 Design of short-range radio frequency access point supporting master and slave mobile device services
CN101646245A (en) * 2008-06-16 2010-02-10 美国博通公司 Method and system for bluetooth and wimax coexistence
CN105207733A (en) * 2015-09-09 2015-12-30 深圳市艾迪思特信息技术有限公司 Wireless access and transmission method of integrated voice and data
CN107567007A (en) * 2016-07-01 2018-01-09 英特尔Ip公司 Short distance radio communication equipment and the method for controlling the equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
蓝牙技术主要原理综述;盛红梅等;《计算机时代》;20090331;全文 *

Also Published As

Publication number Publication date
CN111132099A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN111132099B (en) Control method and device for Bluetooth master and slave devices and Bluetooth device
US10911930B2 (en) Wireless system, wireless device, non-transitory computer-readable storage medium having stored therein communication program, and communication method
US9986495B2 (en) Methods, devices and systems for supporting wireless communication
US10149232B2 (en) Method for participating in nan cluster in wireless communication system and device therefor
US20040221046A1 (en) Short-range RF access point design enabling services to master and slave mobile devices
CN111107528B (en) Bluetooth testing method and testing machine
US20130182798A1 (en) Method, apparatus, and computer program product for digital stream swapping between signal sources
CN111107527B (en) Bluetooth master device, control method and device of slave device and Bluetooth device
CN105075302A (en) Systems and methods for synchronization within a neighborhood aware network
US9974075B2 (en) Method and apparatus for NAN terminal to transceive signal in wireless communication system
CN111132100B (en) Bluetooth connection method and device, bluetooth equipment and Bluetooth system
JP7712486B2 (en) Method, electronic device and communication system for establishing an SLB connection - Patents.com
JP6808411B2 (en) Communication equipment, communication methods, and programs
JP6598616B2 (en) Communication device, control method, and program
KR100862954B1 (en) Rescue Beacon
CN108370503B (en) Communication apparatus, control method thereof, and non-transitory computer-readable storage medium
US7120390B2 (en) BLUETOOTH smart offset compensation
US7697895B2 (en) Bluetooth smart offset compensation
CN111614424B (en) Subnet fusion method, device, node and storage medium
WO2016123217A1 (en) Methods, devices and systems for supporting wireless communication
CN107027126B (en) Data communication method and system, terminal equipment and control equipment
JP2003309486A (en) Communication equipment
WO2017216952A1 (en) First wireless communication terminal, second wireless communication terminal, wireless communication system, wireless communication method, and program
JP2016195465A (en) Communication device
CN112367655A (en) Communication method and device for TWS equipment team formation and electronic 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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 519075 No. 333, Kexing Road, Xiangzhou District, Zhuhai City, Guangdong Province

Applicant after: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.

Address before: Floor 1-107, building 904, ShiJiHua Road, Zhuhai City, Guangdong Province

Applicant before: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant