[go: up one dir, main page]

CN104811895B - Connection method and device of low-power-consumption Bluetooth - Google Patents

Connection method and device of low-power-consumption Bluetooth Download PDF

Info

Publication number
CN104811895B
CN104811895B CN201510152785.9A CN201510152785A CN104811895B CN 104811895 B CN104811895 B CN 104811895B CN 201510152785 A CN201510152785 A CN 201510152785A CN 104811895 B CN104811895 B CN 104811895B
Authority
CN
China
Prior art keywords
slave
connection
master
time slice
bluetooth
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
CN201510152785.9A
Other languages
Chinese (zh)
Other versions
CN104811895A (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.)
Guangdong Genius Technology Co Ltd
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201510152785.9A priority Critical patent/CN104811895B/en
Publication of CN104811895A publication Critical patent/CN104811895A/en
Priority to PCT/CN2016/074825 priority patent/WO2016155444A1/en
Application granted granted Critical
Publication of CN104811895B publication Critical patent/CN104811895B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • 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
    • H04W52/00Power management, e.g. Transmission Power Control [TPC] or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. Transmission Power Control [TPC] or power classes
    • H04W52/02Power saving arrangements
    • 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)
  • Telephone Function (AREA)

Abstract

The invention discloses a connection method of low-power-consumption Bluetooth, which comprises the conversion of a master device and a slave device; the conversion of the master device and the slave device includes: a. acquiring a master time slice with random length, and using a low-power-consumption Bluetooth protocol to scan slave equipment as master equipment; determining that no connection is established with the slave device within a master time slice of random length; acquiring slave time slices with random lengths, and sending out a Bluetooth broadcast signal by using a low-power Bluetooth protocol as slave equipment; and c, determining that the connection with the master device is not established in the slave time slices with random lengths, and returning to the step a. The equipment is used as the master equipment and the slave equipment in turn in an automatic random time slice mode, the situation that a plurality of pieces of equipment cannot be scanned by the master equipment or the slave equipment at the same time is avoided, the time slice length is generated randomly, connection is established when the equipment circulates to be in different master-slave modes, the connection is more convenient, the complexity of user operation is simplified, and the user experience is improved.

Description

一种低功耗蓝牙的连接方法及装置A connection method and device for low-power bluetooth

技术领域technical field

本发明涉及无线通信的低功耗蓝牙技术,尤其涉及一种低功耗蓝牙的连接方法及装置。The invention relates to low-power bluetooth technology for wireless communication, in particular to a connection method and device for low-power bluetooth.

背景技术Background technique

低功耗蓝牙(Bluetooth)主要用于实现移动智能终端之间或者移动智能终端与周边配件之间的持续连接,是功耗极低的短距离无线通信技术,并且有效传输距离被提升到了100米以上,但是,蓝牙连接过程中需要确立主从关系,从设备开启蓝牙广播信号,主设备扫描广播信号启动连接,所以蓝牙应用前,必须两者确立主从关系以后,才可以进行连接通信,如果两者都变成主设备或者从设备,那么双方就无法搜索到对方,不能进行下一步的连接请求。但如果双方主体相同,比如两个手表,需要建立蓝牙连接之前,还必须让用户选择蓝牙连接的主从关系,在交互上多一步确认,对于不懂技术的应用者来说增添了技术性障碍。Bluetooth low energy consumption is mainly used to realize the continuous connection between mobile smart terminals or between mobile smart terminals and peripheral accessories. It is a short-range wireless communication technology with extremely low power consumption, and the effective transmission distance has been increased to 100 meters. Above, however, the master-slave relationship needs to be established during the Bluetooth connection process. The slave device turns on the Bluetooth broadcast signal, and the master device scans the broadcast signal to start the connection. Therefore, before the Bluetooth application, the master-slave relationship between the two must be established before the connection can be carried out. If Both become the master device or the slave device, then the two parties cannot search for each other, and cannot make the next connection request. However, if the two parties have the same subject, such as two watches, before establishing a Bluetooth connection, the user must also select the master-slave relationship of the Bluetooth connection. One more step of confirmation in the interaction will add technical obstacles to users who do not understand technology.

发明内容Contents of the invention

本发明实施例提供一种低功耗蓝牙的连接方法及装置,无需人工额外选择设备的主从关系,连接更加方便,简化了用户操作的复杂度,提升了用户体验。Embodiments of the present invention provide a low-power Bluetooth connection method and device, which do not need to manually select the master-slave relationship of the device, which makes the connection more convenient, simplifies the complexity of user operations, and improves user experience.

本发明实施例采用以下技术方案:Embodiments of the present invention adopt the following technical solutions:

第一方面,本技术方案提供一种低功耗蓝牙的连接方法,包括主设备和从设备的转换;In the first aspect, the technical solution provides a low-power Bluetooth connection method, including the conversion of the master device and the slave device;

主设备和从设备的转换包括:Master and slave transitions include:

a.获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备;确定在随机长度的主时间片内没有与从设备建立连接;获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号;确定在随机长度的从时间片内没有与主设备建立连接,返回步骤a;或者,a. Obtain a random length of the main time slice, as the master device scans the slave device using the Bluetooth low energy protocol; determine that there is no connection with the slave device within the random length of the main time slice; obtain a random length of the slave time slice, as a slave device Use the Bluetooth low energy protocol to send out a Bluetooth broadcast signal; determine that there is no connection with the master device within the random length of the slave time slice, and return to step a; or,

c.获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号;确定在随机长度的从时间片内没有与主设备建立连接;获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备;确定在随机长度的主时间片内没有与从设备建立连接,返回步骤c。c. Obtain a slave time slice of random length as a slave device to send a Bluetooth broadcast signal using the Bluetooth low energy protocol; determine that no connection is established with the master device within the slave time slice of random length; obtain a master time slice of random length as the master The device scans the slave device using the Bluetooth low energy protocol; it is determined that no connection is established with the slave device within the random length of the master time slice, and returns to step c.

其进一步技术方案为,所述获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备之后,还包括:Its further technical solution is that after acquiring the master time slice of random length, as the master device scans the slave device using the Bluetooth low energy protocol, it also includes:

确定作为主设备与从设备建立连接后并中断,则获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号;或者,After determining that the connection between the master device and the slave device is established and interrupted, a slave time slice of random length is obtained, and the slave device sends out a Bluetooth broadcast signal using the Bluetooth low energy protocol; or,

确定作为主设备与从设备建立连接后并中断,则获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备。After it is determined that the connection between the master device and the slave device is established and interrupted, a random length of the master time slice is obtained, and the master device scans the slave device using the Bluetooth low energy protocol.

其进一步技术方案为,所述获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号之后,还包括:Its further technical solution is that after the acquisition of the slave time slice of random length, as the slave device sends out the Bluetooth broadcast signal using the Bluetooth low energy protocol, it also includes:

确定作为从设备与主设备建立连接后并中断,则获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备;或者,After it is determined that the connection between the slave device and the master device is established and interrupted, a random length of the master time slice is obtained, and the master device scans the slave device using the Bluetooth low energy protocol; or,

确定作为从设备与主设备建立连接后并中断,则获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号。After it is determined that the connection between the slave device and the master device is established and interrupted, a slave time slice of random length is obtained, and the slave device uses the Bluetooth low energy protocol to send out a Bluetooth broadcast signal.

其进一步技术方案为,所述获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备之后,还包括:Its further technical solution is that after acquiring the master time slice of random length, as the master device scans the slave device using the Bluetooth low energy protocol, it also includes:

若检测到至少两个从设备,将从设备的蓝牙信号强度进行排序,按蓝牙信号强度从强到弱依次进行连接。If at least two slave devices are detected, sort the Bluetooth signal strengths of the slave devices, and connect according to the Bluetooth signal strength from strong to weak.

其进一步技术方案为,所述随机长度的主时间片及随机长度的从时间片均是由公式T2=((Rand()%N)+1)*T1获取的随机时间片,其中,T1为低功耗蓝牙设备切换的最小时间单元,N为大于1并且小于20的整数。Its further technical solution is that both the master time slice of random length and the slave time slice of random length are random time slices obtained by the formula T2=((Rand()%N)+1)*T1, wherein T1 is The minimum time unit for the Bluetooth low energy device switching, N is an integer greater than 1 and less than 20.

第二方面,本技术方案提供一种低功耗蓝牙的连接装置,包括:In the second aspect, the technical solution provides a low-power Bluetooth connection device, including:

主时间片获取单元,用于获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备;The main time slice acquisition unit is used to obtain a random length of the main time slice, as the master device uses the Bluetooth low energy protocol to scan the slave device;

第一连接确定单元,用于确定在随机长度的主时间片内没有与从设备建立连接;The first connection determining unit is used to determine that no connection is established with the slave device within the master time slice of random length;

第一触发单元,用于当在随机长度的主时间片内没有与从设备建立连接时,触发从时间片获取单元;The first trigger unit is used to trigger the slave time slice acquisition unit when no connection is established with the slave device within the random length of the master time slice;

从时间片获取单元,用于获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号;The slave time slice acquisition unit is used to acquire a slave time slice of random length, as a slave device using a Bluetooth low energy protocol to send a Bluetooth broadcast signal;

第二连接确认单元,用于确定在随机长度的从时间片内没有与主设备建立连接;The second connection confirmation unit is used to determine that no connection is established with the master device within the slave time slice of random length;

第二触发单元,用于当在随机长度的从时间片内没有与主设备建立连接时,触发所述主时间片获取单元。The second triggering unit is configured to trigger the master time slice acquiring unit when no connection is established with the master device within a slave time slice of random length.

其进一步技术方案为,还包括:Its further technical scheme is, also includes:

第一连接中断单元,用于确定作为主设备与从设备建立连接后并中断,则获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号;或者,用于确定作为主设备与从设备建立连接后并中断,则获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备。The first connection interruption unit is used to determine that the connection between the master device and the slave device is interrupted, then obtain a slave time slice of random length, and send a Bluetooth broadcast signal as a slave device using the Bluetooth low-power protocol; After the master device establishes a connection with the slave device and is interrupted, it obtains a random length of the master time slice, and uses the low-power bluetooth protocol as the master device to scan the slave device.

其进一步技术方案为,还包括:Its further technical scheme is, also includes:

第二连接中断单元,用于确定作为从设备与主设备建立连接后并中断,则获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备;或者,用于确定作为从设备与主设备建立连接后并中断,则获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号。The second connection interruption unit is used to determine that the connection between the slave device and the master device is interrupted, then obtain a random length of the master time slice, and use the low-power bluetooth protocol as the master device to scan the slave device; After the device establishes a connection with the master device and interrupts it, it will obtain a slave time slice of random length, and use the Bluetooth low energy protocol as a slave device to send out a Bluetooth broadcast signal.

其进一步技术方案为,还包括:Its further technical scheme is, also includes:

信号强度连接单元,用于若检测到至少两个从设备,将从设备的蓝牙信号强度进行排序,按蓝牙信号强度从强到弱依次进行连接。The signal strength connection unit is used to sort the bluetooth signal strengths of the slave devices if at least two slave devices are detected, and connect according to the bluetooth signal strength from strong to weak.

其进一步技术方案为,随机时间获取单元,用于由公式T2=((Rand()%N)+1)*T1获取所述随机长度的主时间片及随机长度的从时间片,其中,T1为低功耗蓝牙设备切换的最小时间单元,N为大于1并且小于20的整数。Its further technical solution is a random time acquisition unit, which is used to obtain the master time slice of random length and the slave time slice of random length by the formula T2=((Rand()%N)+1)*T1, wherein, T1 It is the minimum time unit for switching between Bluetooth low energy devices, and N is an integer greater than 1 and less than 20.

本发明实施例提供的技术方案带来的有益效果:Beneficial effects brought by the technical solutions provided by the embodiments of the present invention:

本技术方案中,通过自动随机时间片的方式使设备轮番作为主设备及从设备,避免多个设备同时为主设备或者同时为从设备而无法发现对方建立连接,时间片长度随机产生,当设备循环到处于不同的主从模式时则建立连接,连接更加方便,简化了用户操作的复杂度,提升了用户体验。In this technical solution, the device is made to take turns as the master device and the slave device by means of automatic random time slices, so as to avoid multiple devices being master devices or slave devices at the same time and not being able to find the other party to establish a connection. The length of the time slice is randomly generated. When the device When looping to different master-slave modes, a connection is established, which makes the connection more convenient, simplifies the complexity of user operations, and improves the user experience.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对本发明实施例描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据本发明实施例的内容和这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments of the present invention. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention , for those skilled in the art, other drawings can also be obtained according to the content of the embodiment of the present invention and these drawings without any creative effort.

图1是本发明实施例提供的低功耗蓝牙的连接方法第一个实施例的方法流程图。Fig. 1 is a method flow chart of the first embodiment of the Bluetooth low energy connection method provided by the embodiment of the present invention.

图2是本发明实施例提供的低功耗蓝牙的连接方法第二个实施例的方法流程图。Fig. 2 is a method flow chart of the second embodiment of the Bluetooth low energy connection method provided by the embodiment of the present invention.

图3是本发明实施例提供的低功耗蓝牙的连接方法第三个实施例的方法流程图。Fig. 3 is a method flow chart of the third embodiment of the Bluetooth low energy connection method provided by the embodiment of the present invention.

图4是本发明实施例提供的低功耗蓝牙的连接方法第四个实施例的方法流程图。Fig. 4 is a method flow chart of the fourth embodiment of the Bluetooth low energy connection method provided by the embodiment of the present invention.

图5是本发明实施例提供的低功耗蓝牙的连接方法第五个实施例的方法流程图。Fig. 5 is a method flow chart of the fifth embodiment of the Bluetooth low energy connection method provided by the embodiment of the present invention.

图6是本发明实施例提供的低功耗蓝牙的连接方法第六个实施例的方法流程图。Fig. 6 is a method flowchart of the sixth embodiment of the Bluetooth low energy connection method provided by the embodiment of the present invention.

图7是本发明实施例提供的低功耗蓝牙的连接装置的第一个实施例的结构图。FIG. 7 is a structural diagram of a first embodiment of a Bluetooth low energy connection device provided by an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明解决的技术问题、采用的技术方案和达到的技术效果更加清楚,下面将结合附图对本发明实施例的技术方案作进一步的详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the technical problems solved by the present invention, the technical solutions adopted and the technical effects achieved clearer, the technical solutions of the embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only the technical solutions of the present invention. Some, but not all, embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts belong to the protection scope of the present invention.

请参考图1,其是本发明实施例提供的低功耗蓝牙的连接方法第一个实施例的方法流程图。该低功耗蓝牙连接方法包括:Please refer to FIG. 1 , which is a method flowchart of the first embodiment of the Bluetooth low energy connection method provided by the embodiment of the present invention. The Bluetooth low energy connection methods include:

S100、获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备。S100. Obtain a master time slice of a random length, and use the Bluetooth low energy protocol as the master device to scan the slave device.

随机长度的主时间片由公式T2=((Rand()%N)+1)*T1获取,其中,T1为低功耗蓝牙设备切换的最小时间单元,N为大于1并且小于20的整数。本实施例中,N优选为10。The main time slice of random length is obtained by the formula T2=((Rand()%N)+1)*T1, wherein T1 is the minimum time unit for Bluetooth low energy device switching, and N is an integer greater than 1 and less than 20. In this embodiment, N is preferably 10.

随机长度的主时间片相对较短,但时间长度至少为允许从设备能够被其他主设备收到连接请求信息所需的时间,主设备能够搜索到其他从设备所需要的时间,通常在此时间基础上延长一定时间,保证双方持续几次随机后一个为主设备一个为从设备的状态下建立连接。The master time slice of random length is relatively short, but the length of time is at least the time required to allow the slave device to receive connection request information from other master devices, and the time required for the master device to search for other slave devices, usually at this time Extend a certain period of time on the basis to ensure that the two parties continue to establish a connection in a state where one is the master device and the other is the slave device after a few random times.

S101、确定在随机长度的主时间片内没有与从设备建立连接。S101. Determine that no connection is established with the slave device within the master time slice of random length.

在随机长度的主时间片内没有扫描到从设备的蓝牙信号,或者,扫描到的蓝牙信号低于设定值,则不进行连接。If the bluetooth signal of the slave device is not scanned within the main time slice of random length, or if the scanned bluetooth signal is lower than the set value, no connection is made.

S102、获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号。S102. Obtain a slave time slice of a random length, and use the Bluetooth low energy protocol as a slave device to send out a Bluetooth broadcast signal.

随机长度的从时间片与随机长度的主时间片获取方法一样,不再赘述。由于随机长度的从时间片与随机长度的主时间片是在一定范围内随机的,所以时间片的长度不是固定值,设备从主设备状态转换为从设备状态。The random-length slave time slice is obtained in the same way as the random-length master time slice, and will not be repeated here. Since the slave time slice of random length and the master time slice of random length are random within a certain range, the length of the time slice is not a fixed value, and the device is converted from the master state to the slave state.

S103、确定在随机长度的从时间片内没有与主设备建立连接,返回步骤S100。S103. Determine that no connection is established with the master device within the slave time slice of random length, and return to step S100.

设备处于从设备状态没有主设备与之建立连接,则再次作为主设备进行扫描,如此在主设备状态与从设备状态之间循环,直到多个设备不同时为主设备或者同时为从设备能够建立连接为止。通常经过1-3个循环即可自动建立连接。If the device is in the slave state and there is no master device to establish a connection with it, it will scan again as the master device, and thus cycle between the master device state and the slave device state until multiple devices are not master devices or slave devices at the same time. until connected. Usually after 1-3 cycles, the connection can be established automatically.

综上,本实施例中打开蓝牙功能后设备处于主设备状态,通过自动随机时间片的方式使设备轮番作为主设备及从设备,避免多个设备同时为主设备或者同时为从设备而无法扫描到,时间片长度随机产生,当设备循环到处于不同的主从模式时则建立连接,连接更加方便,简化了用户操作的复杂度,提升了用户体验。To sum up, in this embodiment, after the Bluetooth function is turned on, the device is in the master device state, and the device will take turns as the master device and the slave device by means of automatic random time slices, so as to avoid multiple devices being the master device or the slave device at the same time and unable to scan The length of the time slice is randomly generated, and the connection is established when the device is in different master-slave modes. The connection is more convenient, the complexity of user operations is simplified, and the user experience is improved.

请参考图2,其是本发明实施例提供的低功耗蓝牙的连接方法第二个实施例的方法流程图。该低功耗蓝牙的连接方法与图1所示方法的不同之处在于,本实施例低功耗蓝牙的连接方法开始时首先处于从设备状态,低功耗蓝牙的连接方法包括:Please refer to FIG. 2 , which is a method flowchart of the second embodiment of the Bluetooth low energy connection method provided by the embodiment of the present invention. The difference between the connection method of this low-power bluetooth and the method shown in Figure 1 is that the connection method of low-power bluetooth in this embodiment is first in the slave device state at the beginning, and the connection method of low-power bluetooth includes:

S200、获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号。S200. Obtain a slave time slice of a random length, and use the Bluetooth low energy protocol as a slave device to send out a Bluetooth broadcast signal.

S201、确定在随机长度的从时间片内没有与主设备建立连接。S201. Determine that no connection is established with the master device within a slave time slice of random length.

S202、获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备。S202. Obtain a master time slice of random length, and use the Bluetooth low energy protocol as the master device to scan the slave device.

S203、确定在随机长度的主时间片内没有与从设备建立连接,返回步骤S200。S203. Determine that no connection is established with the slave device within the random length of the master time slice, and return to step S200.

设备处于主设备状态没有扫描到从设备,或者,扫描到的蓝牙信号低于设定值而不进行连接,则再次作为从设备进行扫描,如此在主设备状态与从设备状态之间循环,直到多个设备不同时为主设备或者同时为从设备能够建立连接为止。通常经过1-3个循环即可自动建立连接。If the device is in the master device state and does not scan the slave device, or if the scanned Bluetooth signal is lower than the set value and does not connect, it will scan again as a slave device, and thus cycle between the master device state and the slave device state until Multiple devices are not at the same time as the master device or at the same time as the slave device until the connection can be established. Usually after 1-3 cycles, the connection can be established automatically.

随机长度的从时间片与随机长度的主时间片获取方法参考图1所示方法相关内容,此处不再赘述。For the method of obtaining the slave time slice of random length and the master time slice of random length, refer to the relevant content of the method shown in FIG. 1 , which will not be repeated here.

综上,本实施例中打开蓝牙功能后设备处于从设备状态,通过自动随机时间片的方式使设备轮番作为主设备及从设备,避免多个设备同时为主设备或者同时为从设备而无法扫描到,时间片长度随机产生,当设备循环到处于不同的主从模式时则建立连接,连接更加方便,简化了用户操作的复杂度,提升了用户体验。To sum up, in this embodiment, after the Bluetooth function is turned on, the device is in the slave device state, and the device will take turns as the master device and the slave device by means of automatic random time slices, so as to avoid multiple devices being the master device or the slave device at the same time and unable to scan The length of the time slice is randomly generated, and the connection is established when the device is in different master-slave modes. The connection is more convenient, the complexity of user operations is simplified, and the user experience is improved.

请参考图3,其是本发明实施例提供的低功耗蓝牙的连接方法第三个实施例的方法流程图。本实施例中与图1所示方法不同之处在于,本实施例在连接后发现不是需要连接的目标设备则做出处理。Please refer to FIG. 3 , which is a method flowchart of the third embodiment of the Bluetooth low energy connection method provided by the embodiment of the present invention. The difference between this embodiment and the method shown in FIG. 1 is that, after the connection, the embodiment finds that it is not a target device that needs to be connected, and then processes it.

该低功耗蓝牙的连接方法包括:The Bluetooth low energy connection methods include:

S300、获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备。S300. Obtain a master time slice of random length, and use the Bluetooth low energy protocol as the master device to scan the slave device.

S301、确定作为主设备与从设备建立连接后并中断,则获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号。S301. After determining that the connection between the master device and the slave device is established and interrupted, obtain a slave time slice of a random length, and send out a Bluetooth broadcast signal as a slave device using the Bluetooth low energy protocol.

当设备处于主设备状态时,扫描到从设备并与之建立连接,此时,随机时间片停止,连接后通过身份信息确认不是需要连接的目标设备,该设备则进入从设备状态。When the device is in the state of the master device, it scans the slave device and establishes a connection with it. At this time, the random time slice stops. After the connection, it is confirmed by the identity information that it is not the target device that needs to be connected, and the device enters the slave device state.

当建立连接后进行身份确认时,用户可以通过触摸屏点击确认,也可以是使用预设动作进行体感确认。When the identity is confirmed after the connection is established, the user can click on the touch screen to confirm, or use a preset action to confirm the identity.

S302、确定在随机长度的从时间片内没有与主设备建立连接,返回步骤S300。S302. Determine that no connection is established with the master device within the slave time slice of random length, and return to step S300.

综上,本实施例中打开蓝牙功能后设备处于主设备状态,通过自动随机时间片的方式使设备轮番作为主设备及从设备,直到多个设备处于不同的状态而建立连接,判断出连接的设备不是目标设备,则继续随机时间片的循环,连接更加方便,简化了用户操作的复杂度,提升了用户体验,保证连接的准确性。To sum up, in this embodiment, after the Bluetooth function is turned on, the device is in the master device state, and the device will take turns as the master device and the slave device by means of automatic random time slices, until multiple devices are in different states and establish a connection, and the connection is determined. If the device is not the target device, the cycle of random time slices will continue, making the connection more convenient, simplifying the complexity of user operations, improving the user experience, and ensuring the accuracy of the connection.

本实施例中,优选地,设备在处于主设备状态时,若检测到至少两个从设备,将从设备的蓝牙信号强度进行排序,按蓝牙信号强度从强到弱依次进行连接。当连接的从设备不是目标设备时,则断开舍弃该从设备的蓝牙信号,按照蓝牙信号强度从强到弱依次进行连接。确保面对面的用户交换信息时可以一次连接成功。In this embodiment, preferably, when the device is in the master state, if at least two slave devices are detected, the Bluetooth signal strengths of the slave devices are sorted, and the connections are made in order from strong to weak Bluetooth signal strengths. When the connected slave device is not the target device, the Bluetooth signal of the slave device is disconnected and discarded, and the connection is made in order according to the strength of the Bluetooth signal from strong to weak. Make sure that when face-to-face users exchange information, they can connect successfully the first time.

请参考图4,其是本发明实施例提供的低功耗蓝牙的连接方法第四个实施例的方法流程图。本实施例中与图3所示方法不同之处在于,本实施例在连接后发现不是需要连接的目标设备,则进入主设备状态。Please refer to FIG. 4 , which is a method flowchart of the fourth embodiment of the Bluetooth low energy connection method provided by the embodiment of the present invention. The difference between this embodiment and the method shown in FIG. 3 is that this embodiment enters the master device state after finding that it is not the target device that needs to be connected after the connection.

该低功耗蓝牙的连接方法包括:The Bluetooth low energy connection methods include:

S400、获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备。S400. Obtain a master time slice of random length, and use the Bluetooth low energy protocol as the master device to scan the slave device.

S401、确定作为主设备与从设备建立连接后并中断,则获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备。S401. After determining that the connection between the master device and the slave device is interrupted, obtain a master time slice of random length, and use the low-power bluetooth protocol as the master device to scan the slave device.

当设备处于主设备状态时,扫描到从设备并与之建立连接,此时,随机时间片停止,连接后通过身份信息确认不是需要连接的目标设备,该设备则进入主设备状态。When the device is in the state of the master device, it scans the slave device and establishes a connection with it. At this time, the random time slice stops. After the connection, it is confirmed by the identity information that it is not the target device that needs to be connected, and the device enters the state of the master device.

当建立连接后进行身份确认时,用户可以通过触摸屏点击确认,也可以是使用预设动作进行体感确认。When the identity is confirmed after the connection is established, the user can click on the touch screen to confirm, or use a preset action to confirm the identity.

S402、确定在随机长度的主时间片内没有与从设备建立连接。S402. Determine that no connection is established with the slave device within the master time slice of random length.

S403、获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号。S403. Obtain a slave time slice of a random length, and use the Bluetooth low energy protocol as a slave device to send out a Bluetooth broadcast signal.

S404、确定在随机长度的从时间片内没有与主设备建立连接,返回步骤S400。S404. Determine that no connection is established with the master device within the slave time slice of random length, and return to step S400.

综上,本实施例中打开蓝牙功能后设备处于主设备状态,通过自动随机时间片的方式使设备轮番作为主设备及从设备,直到多个设备处于不同的状态而建立连接,判断出连接的设备不是目标设备,则继续随机时间片的循环,连接更加方便,简化了用户操作的复杂度,提升了用户体验,保证连接的准确性。To sum up, in this embodiment, after the Bluetooth function is turned on, the device is in the master device state, and the device will take turns as the master device and the slave device by means of automatic random time slices, until multiple devices are in different states and establish a connection, and the connection is determined. If the device is not the target device, the cycle of random time slices will continue, making the connection more convenient, simplifying the complexity of user operations, improving the user experience, and ensuring the accuracy of the connection.

请参考图5,其是本发明实施例提供的低功耗蓝牙的连接方法第五个实施例的方法流程图。本实施例与图2所示方法的不同之处在于,本实施例在连接后发现不是需要连接的目标设备则做出处理。Please refer to FIG. 5 , which is a method flowchart of the fifth embodiment of the Bluetooth low energy connection method provided by the embodiment of the present invention. The difference between this embodiment and the method shown in FIG. 2 is that, after the connection, the present embodiment finds that it is not the target device that needs to be connected, and then processes it.

S500、获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号。S500. Obtain a slave time slice of a random length, and send a Bluetooth broadcast signal as a slave device using the Bluetooth low energy protocol.

S501、确定作为从设备与主设备建立连接后并中断,则获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备。S501. After determining that the connection between the slave device and the master device is interrupted, obtain a master time slice of random length, and use the Bluetooth low energy protocol as the master device to scan the slave device.

当设备处于从设备状态时与主设备建立连接,此时,随机时间片停止,连接后通过身份信息确认不是需要连接的目标设备,该设备则进入主设备状态。When the device is in the slave device state, it establishes a connection with the master device. At this time, the random time slice stops. After the connection, it is confirmed through the identity information that it is not the target device that needs to be connected, and the device enters the master device state.

当建立连接后进行身份确认时,用户可以通过触摸屏点击确认,也可以是使用预设动作进行体感确认。When the identity is confirmed after the connection is established, the user can click on the touch screen to confirm, or use a preset action to confirm the identity.

S502、确定在随机长度的主时间片内没有与从设备建立连接,返回步骤S500。S502. Determine that no connection is established with the slave device within the random length of the master time slice, and return to step S500.

综上,本实施例中打开蓝牙功能后设备处于从设备状态,通过自动随机时间片的方式使设备轮番作为主设备及从设备,直到多个设备处于不同的状态而建立连接,判断出连接的设备不是目标设备,则继续随机时间片的循环,连接更加方便,简化了用户操作的复杂度,提升了用户体验,保证连接的准确性。To sum up, in this embodiment, after the Bluetooth function is turned on, the device is in the slave device state, and the device takes turns as the master device and the slave device by means of automatic random time slices, until multiple devices are in different states and establish a connection, and the connection is determined. If the device is not the target device, the cycle of random time slices will continue, making the connection more convenient, simplifying the complexity of user operations, improving the user experience, and ensuring the accuracy of the connection.

请参考图6,其是本发明实施例提供的低功耗蓝牙的连接方法第六个实施例的方法流程图。本实施例中与图5所示方法不同之处在于,本实施例在连接后发现不是需要连接的目标设备,则进入从设备状态。Please refer to FIG. 6 , which is a method flowchart of the sixth embodiment of the Bluetooth low energy connection method provided by the embodiment of the present invention. The difference between this embodiment and the method shown in FIG. 5 is that this embodiment enters the slave device state if it finds that it is not the target device to be connected after the connection.

S600、获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号。S600. Obtain a slave time slice of a random length, and use the Bluetooth low energy protocol as a slave device to send out a Bluetooth broadcast signal.

S601、确定作为从设备与主设备建立连接后并中断,则获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号。S601. After determining that the connection between the slave device and the master device is interrupted, obtain a slave time slice of random length, and use the Bluetooth low energy protocol as the slave device to send out a Bluetooth broadcast signal.

当设备处于从设备状态时与主设备建立连接,此时,随机时间片停止,连接后通过身份信息确认不是需要连接的目标设备,该设备则进入从设备状态。When the device is in the state of the slave device, it establishes a connection with the master device. At this time, the random time slice stops. After the connection, it is confirmed through the identity information that it is not the target device that needs to be connected, and the device enters the state of the slave device.

当建立连接后进行身份确认时,用户可以通过触摸屏点击确认,也可以是使用预设动作进行体感确认。When the identity is confirmed after the connection is established, the user can click on the touch screen to confirm, or use a preset action to confirm the identity.

S602、确定在随机长度的从时间片内没有与主设备建立连接。S602. Determine that no connection is established with the master device within the slave time slice of random length.

S603、获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备。S603. Obtain a master time slice of random length, and use the Bluetooth low energy protocol as the master device to scan the slave device.

S604、确定在随机长度的主时间片内没有与从设备建立连接,返回步骤S600。S604. Determine that no connection is established with the slave device within the random length of the master time slice, and return to step S600.

综上,本实施例中打开蓝牙功能后设备处于从设备状态,通过自动随机时间片的方式使设备轮番作为主设备及从设备,直到多个设备处于不同的状态而建立连接,判断出连接的设备不是目标设备,则继续随机时间片的循环,连接更加方便,简化了用户操作的复杂度,提升了用户体验,保证连接的准确性。To sum up, in this embodiment, after the Bluetooth function is turned on, the device is in the slave device state, and the device takes turns as the master device and the slave device by means of automatic random time slices, until multiple devices are in different states and establish a connection, and the connection is determined. If the device is not the target device, the cycle of random time slices will continue, making the connection more convenient, simplifying the complexity of user operations, improving the user experience, and ensuring the accuracy of the connection.

请参考图7,其是本发明实施例提供的低功耗蓝牙的连接装置第一个实施例的方法流程图。该低功耗蓝牙的连接装置包括:Please refer to FIG. 7 , which is a flow chart of the method of the first embodiment of the Bluetooth low energy connection device provided by the embodiment of the present invention. The Bluetooth low energy connection device includes:

主时间片获取单元10,用于获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备;The main time slice obtaining unit 10 is used to obtain the main time slice of random length, and uses the low power bluetooth protocol as the master device to scan the slave device;

第一连接确定单元20,用于确定在随机长度的主时间片内没有与从设备建立连接;The first connection determination unit 20 is configured to determine that no connection is established with the slave device within the master time slice of random length;

第一触发单元30,用于当在随机长度的主时间片内没有与从设备建立连接时,触发从时间片获取单元;The first trigger unit 30 is used to trigger the slave time slice acquisition unit when no connection is established with the slave device within the master time slice of random length;

从时间片获取单元40,用于获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号;From the time slice acquisition unit 40, used to obtain a random length from the time slice, as a slave device using the Bluetooth low power protocol to send a bluetooth broadcast signal;

第二连接确认单元50,用于确定在随机长度的从时间片内没有与主设备建立连接;The second connection confirming unit 50 is used to determine that no connection is established with the master device within the slave time slice of random length;

第二触发单元60,用于当在随机长度的从时间片内没有与主设备建立连接时,触发所述主时间片获取单元。The second trigger unit 60 is configured to trigger the master time slice acquisition unit when no connection is established with the master device within a slave time slice of random length.

装置的详细内容请参考图1及图2所述方法,此处不再赘述。For details of the device, please refer to the method described in FIG. 1 and FIG. 2 , which will not be repeated here.

综上,本实施例中打开蓝牙功能后通过自动随机时间片的方式使设备轮番作为主设备及从设备,避免多个设备同时为主设备或者同时为从设备而无法扫描到,时间片长度随机产生,当设备循环到处于不同的主从模式时则建立连接,连接更加方便,简化了用户操作的复杂度,提升了用户体验。To sum up, in this embodiment, after the Bluetooth function is turned on, the device will take turns as the master device and the slave device by means of automatic random time slices, so as to prevent multiple devices from being scanned at the same time as the master device or the slave device at the same time, and the length of the time slice is random. Generated, when the device cycles to different master-slave modes, the connection is established, the connection is more convenient, the complexity of user operation is simplified, and the user experience is improved.

在其他一些实施例中,还包括:In some other embodiments, also include:

第一连接中断单元,用于确定作为主设备与从设备建立连接后并中断,则获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号;或者,用于确定作为主设备与从设备建立连接后并中断,则获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备。The first connection interruption unit is used to determine that the connection between the master device and the slave device is interrupted, then obtain a slave time slice of random length, and send a Bluetooth broadcast signal as a slave device using the Bluetooth low-power protocol; After the master device establishes a connection with the slave device and is interrupted, it obtains a random length of the master time slice, and uses the low-power bluetooth protocol as the master device to scan the slave device.

具体地,当使用图3所示方法时,第一连接中断单元用于确定作为主设备与从设备建立连接后并中断,则获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号。Specifically, when the method shown in FIG. 3 is used, the first connection interruption unit is used to determine that the connection between the master device and the slave device is established and interrupted, then obtain a slave time slice of random length, and use the Bluetooth low energy protocol as a slave device Send out a Bluetooth broadcast signal.

当使用图4所示方法时,第一连接中断单元用于确定作为主设备与从设备建立连接后并中断,则获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备。通过验证连接的设备是否为目标设备,提高了连接的准确性。When using the method shown in Figure 4, the first connection interruption unit is used to determine that the connection between the master device and the slave device is interrupted, then obtain a random length of the master time slice, and use the low-power bluetooth protocol as the master device to scan the slave device . Improved connection accuracy by verifying that the connected device is the intended device.

在其他一些实施例中,还包括:In some other embodiments, also include:

第二连接中断单元,用于确定作为从设备与主设备建立连接后并中断,则获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备;或者,用于确定作为从设备与主设备建立连接后并中断,则获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号。The second connection interruption unit is used to determine that the connection between the slave device and the master device is interrupted, then obtain a random length of the master time slice, and use the low-power bluetooth protocol as the master device to scan the slave device; After the device establishes a connection with the master device and is interrupted, it obtains a slave time slice of random length, and uses the Bluetooth low energy protocol as a slave device to send out a Bluetooth broadcast signal.

具体地,当使用图5所示方法时,第二连接中断单元用于确定作为从设备与主设备建立连接后并中断,则获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备。Specifically, when the method shown in FIG. 5 is used, the second connection interruption unit is used to determine that the connection between the slave device and the master device is interrupted, then obtain a random length of the master time slice, and use the Bluetooth low energy protocol as the master device Scan slaves.

当使用图6所示方法时,第二连接中断单元用于确定作为从设备与主设备建立连接后并中断,则获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号。通过验证连接的设备是否为目标设备,提高了连接的准确性。When using the method shown in Figure 6, the second connection interruption unit is used to determine that the connection between the slave device and the master device is established and interrupted, then obtain a slave time slice of random length, and send out a Bluetooth broadcast as a slave device using the Bluetooth low energy protocol Signal. Improved connection accuracy by verifying that the connected device is the intended device.

优选地,还包括:Preferably, it also includes:

信号强度连接单元,用于若检测到至少两个从设备,将从设备的蓝牙信号强度进行排序,按蓝牙信号强度从强到弱依次进行连接。通过按蓝牙信号强度从强到弱依次与从设备进行连接,保证面对面进行信息交互时一次实现连接,提高连接效率。The signal strength connection unit is used to sort the bluetooth signal strengths of the slave devices if at least two slave devices are detected, and connect according to the bluetooth signal strength from strong to weak. By connecting with the slave devices in sequence according to the strength of the Bluetooth signal from strong to weak, it is ensured that the connection is realized at one time during face-to-face information exchange, and the connection efficiency is improved.

随机时间获取单元,用于由公式T2=((Rand()%N)+1)*T1获取所述随机长度的主时间片及随机长度的从时间片,其中,T1为低功耗蓝牙设备切换的最小时间单元,N为大于1并且小于20的整数。随机长度的主时间片与随机长度的从时间片均为随机时间片。The random time acquisition unit is used to obtain the master time slice of the random length and the slave time slice of the random length by the formula T2=((Rand()%N)+1)*T1, wherein T1 is a low-power bluetooth device The minimum time unit for switching, N is an integer greater than 1 and less than 20. Both the master time slice of random length and the slave time slice of random length are random time slices.

以上内容仅为本发明的较佳实施例,对于本领域的普通技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,本说明书内容不应理解为对本发明的限制。The above content is only a preferred embodiment of the present invention. For those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. limits.

Claims (6)

1.一种低功耗蓝牙的连接方法,其特征在于,包括主设备和从设备的转换;1. A connection method of bluetooth low power consumption, is characterized in that, comprises the conversion of main equipment and slave equipment; 主设备和从设备的转换包括:Master and slave transitions include: a.获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备;a. Obtain a master time slice of random length, and use the Bluetooth low energy protocol as the master device to scan the slave device; 确定作为主设备与从设备建立连接后并中断,则获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备;After it is determined that the connection between the master device and the slave device is established and interrupted, a random length of the master time slice is obtained, and the slave device is scanned using the Bluetooth low energy protocol as the master device; 确定在随机长度的主时间片内没有与从设备建立连接,或者确定作为主设备与从设备建立连接后并中断,则获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号;If it is determined that no connection has been established with the slave device within the master time slice of random length, or if it is determined that the connection between the master device and the slave device is interrupted, then obtain a slave time slice of random length, and use the Bluetooth low energy protocol as a slave device to send out Bluetooth broadcast signal; 确定在随机长度的从时间片内没有与主设备建立连接,返回步骤a;Determine that there is no connection with the master device within the slave time slice of random length, and return to step a; 或者,or, c.获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号;c. Obtain a slave time slice of random length, and send out a Bluetooth broadcast signal as a slave device using the Bluetooth low energy protocol; 确定作为从设备与主设备建立连接后并中断,则获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号;After it is determined that the connection between the slave device and the master device is established and interrupted, a slave time slice of random length is obtained, and the slave device uses the Bluetooth low energy protocol to send out a Bluetooth broadcast signal; 确定在随机长度的从时间片内没有与主设备建立连接,或者确定作为从设备与主设备建立连接后并中断,则获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备;If it is determined that no connection has been established with the master device within the slave time slice of random length, or if the connection between the slave device and the master device is determined to be interrupted, obtain a master time slice of random length, and use the Bluetooth low energy protocol as the master device to scan the slave device. equipment; 确定在随机长度的主时间片内没有与从设备建立连接,返回步骤c。Determine that no connection is established with the slave device within the random length of the master time slice, and return to step c. 2.根据权利要求1所述的方法,其特征在于,所述获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备之后,还包括:2. The method according to claim 1, wherein said acquisition of the master time slice of random length, after the slave device is scanned using the Bluetooth low energy protocol as the master device, further includes: 若检测到至少两个从设备,将从设备的蓝牙信号强度进行排序,按蓝牙信号强度从强到弱依次进行连接。If at least two slave devices are detected, sort the Bluetooth signal strengths of the slave devices, and connect according to the Bluetooth signal strength from strong to weak. 3.根据权利要求1或2所述的方法,其特征在于,所述随机长度的主时间片及随机长度的从时间片均是由公式T2=((Rand()%N)+1)*T1获取的随机时间片,其中,T1为低功耗蓝牙设备切换的最小时间单元,N为大于1并且小于20的整数。3. The method according to claim 1 or 2, characterized in that, the random-length master time slice and the random-length slave time slice are both determined by the formula T2=((Rand()%N)+1)* A random time slice obtained by T1, where T1 is the minimum time unit for switching the Bluetooth low energy device, and N is an integer greater than 1 and less than 20. 4.一种低功耗蓝牙的连接装置,其特征在于,包括:4. A connection device for bluetooth low power consumption, characterized in that, comprising: 主时间片获取单元,用于获取随机长度的主时间片,作为主设备使用低功耗蓝牙协议扫描从设备;The main time slice acquisition unit is used to obtain a random length of the main time slice, as the master device uses the Bluetooth low energy protocol to scan the slave device; 从时间片获取单元,用于获取随机长度的从时间片,作为从设备使用低功耗蓝牙协议发出蓝牙广播信号;The slave time slice acquisition unit is used to acquire a slave time slice of random length, as a slave device using a Bluetooth low energy protocol to send a Bluetooth broadcast signal; 第一连接确定单元,用于确定在随机长度的主时间片内没有与从设备建立连接;The first connection determining unit is used to determine that no connection is established with the slave device within the master time slice of random length; 第一触发单元,用于当在随机长度的主时间片内没有与从设备建立连接时,触发从时间片获取单元;The first trigger unit is used to trigger the slave time slice acquisition unit when no connection is established with the slave device within the random length of the master time slice; 第一连接中断单元,用于确定作为主设备与从设备建立连接后并中断,则触发从时间陪获取单元,或者触发主时间片获取单元;The first connection interruption unit is used to determine that the connection between the master device and the slave device is interrupted, and then trigger the slave time acquisition unit, or trigger the master time slice acquisition unit; 第二连接确认单元,用于确定在随机长度的从时间片内没有与主设备建立连接;The second connection confirmation unit is used to determine that no connection is established with the master device within the slave time slice of random length; 第二触发单元,用于当在随机长度的从时间片内没有与主设备建立连接时,触发所述主时间片获取单元;The second trigger unit is used to trigger the master time slice acquisition unit when no connection is established with the master device within a slave time slice of random length; 第二连接中断单元,用于确定作为从设备与主设备建立连接后并中断,则触发从时间陪获取单元,或者触发主时间片获取单元。The second connection interruption unit is used to determine that the connection between the slave device and the master device is interrupted, and then trigger the slave time acquisition unit, or trigger the master time slice acquisition unit. 5.根据权利要求4所述的低功耗蓝牙的连接装置,其特征在于,还包括:5. The connection device of Bluetooth Low Energy according to claim 4, further comprising: 信号强度连接单元,用于若检测到至少两个从设备,将从设备的蓝牙信号强度进行排序,按蓝牙信号强度从强到弱依次进行连接。The signal strength connection unit is used to sort the bluetooth signal strengths of the slave devices if at least two slave devices are detected, and connect according to the bluetooth signal strength from strong to weak. 6.根据权利要求4或5所述的低功耗蓝牙的连接装置,其特征在于,随机时间获取单元,用于由公式T2=((Rand()%N)+1)*T1获取所述随机长度的主时间片及随机长度的从时间片,其中,T1为低功耗蓝牙设备切换的最小时间单元,N为大于1并且小于20的整数。6. The low-power Bluetooth connection device according to claim 4 or 5, characterized in that the random time acquisition unit is used to acquire the A master time slice with a random length and a slave time slice with a random length, wherein T1 is the minimum time unit for switching a Bluetooth low energy device, and N is an integer greater than 1 and less than 20.
CN201510152785.9A 2015-04-01 2015-04-01 Connection method and device of low-power-consumption Bluetooth Active CN104811895B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510152785.9A CN104811895B (en) 2015-04-01 2015-04-01 Connection method and device of low-power-consumption Bluetooth
PCT/CN2016/074825 WO2016155444A1 (en) 2015-04-01 2016-02-29 Low-power consumption bluetooth connecting method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510152785.9A CN104811895B (en) 2015-04-01 2015-04-01 Connection method and device of low-power-consumption Bluetooth

Publications (2)

Publication Number Publication Date
CN104811895A CN104811895A (en) 2015-07-29
CN104811895B true CN104811895B (en) 2018-04-20

Family

ID=53696300

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510152785.9A Active CN104811895B (en) 2015-04-01 2015-04-01 Connection method and device of low-power-consumption Bluetooth

Country Status (2)

Country Link
CN (1) CN104811895B (en)
WO (1) WO2016155444A1 (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104811895B (en) * 2015-04-01 2018-04-20 石姗姗 Connection method and device of low-power-consumption Bluetooth
GB201516674D0 (en) 2015-09-21 2015-11-04 Nicoventures Holdings Ltd Topology
GB201516673D0 (en) 2015-09-21 2015-11-04 Nicoventures Holdings Ltd Topology
CN106559734B (en) * 2015-09-28 2020-03-20 展讯通信(上海)有限公司 Bluetooth data transmission method and device
CN105490712A (en) * 2015-12-31 2016-04-13 中科创达软件股份有限公司 Bluetooth device connection method and bluetooth device
CN105813010B (en) * 2016-05-05 2019-07-05 广东小天才科技有限公司 Method, system and NFC device for establishing connection based on NFC
CN106060962B (en) * 2016-06-22 2020-01-03 新华三技术有限公司 Communication method and device
KR102001366B1 (en) * 2017-03-02 2019-07-19 어보브반도체 주식회사 Method for connecting multiple smart bluetooth apparatus
CN110460985B (en) * 2017-03-23 2022-09-16 展讯通信(上海)有限公司 Bluetooth slave equipment and service configuration method
GB201707050D0 (en) 2017-05-03 2017-06-14 British American Tobacco Investments Ltd Data communication
GB201722278D0 (en) 2017-12-29 2018-02-14 British American Tobacco Investments Ltd Device identification and method
GB201722241D0 (en) 2017-12-29 2018-02-14 British American Tobacco Investments Ltd Data capture across devices
GB201801146D0 (en) 2018-01-24 2018-03-07 Nicoventures Trading Ltd Aerosol source for a vapour provision system
CN108811185B (en) * 2018-06-08 2021-10-26 东华大学 BLE-based session keeping method for multiple clients and single peripheral node
CN110830976B (en) * 2018-08-10 2022-08-12 炬力(珠海)微电子有限公司 Communication connection establishing method and device
CN111083746A (en) * 2018-10-18 2020-04-28 北京轩辕联科技有限公司 Mode-switchable Bluetooth device, Bluetooth connection system and Bluetooth connection method
CN110769406A (en) * 2019-10-31 2020-02-07 拉扎斯网络科技(上海)有限公司 Communication control method, communication control device, storage medium and electronic equipment
CN113382393B (en) * 2020-02-25 2024-05-03 炬芯科技股份有限公司 Bluetooth connection method and device, storage medium and electronic equipment
CN114980044B (en) * 2021-02-23 2025-09-19 广州视源电子科技股份有限公司 Bluetooth connection method, storage medium and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1223715A1 (en) * 2001-01-05 2002-07-17 Samsung Electronics Co., Ltd. Temporary master-slave switching in a Piconet in a Bluetooth communication system
CN101800575A (en) * 2009-11-19 2010-08-11 中南大学 Method and device for reducing document transmission energy consumption of bluetooth equipment
CN101938298A (en) * 2009-06-29 2011-01-05 上海易狄欧电子科技有限公司 Bluetooth equipment networking method, Bluetooth system and Bluetooth master equipment
CN104244170A (en) * 2014-09-28 2014-12-24 成都金海鼎盛科技有限公司 Low-power-consumption Bluetooth node independent networking method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060017576A (en) * 2003-06-02 2006-02-24 마쯔시다덴기산교 가부시키가이샤 Devices, Methods, and Programs Performing a Master / Slave Switching Process
CN104811895B (en) * 2015-04-01 2018-04-20 石姗姗 Connection method and device of low-power-consumption Bluetooth

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1223715A1 (en) * 2001-01-05 2002-07-17 Samsung Electronics Co., Ltd. Temporary master-slave switching in a Piconet in a Bluetooth communication system
CN101938298A (en) * 2009-06-29 2011-01-05 上海易狄欧电子科技有限公司 Bluetooth equipment networking method, Bluetooth system and Bluetooth master equipment
CN101800575A (en) * 2009-11-19 2010-08-11 中南大学 Method and device for reducing document transmission energy consumption of bluetooth equipment
CN104244170A (en) * 2014-09-28 2014-12-24 成都金海鼎盛科技有限公司 Low-power-consumption Bluetooth node independent networking method

Also Published As

Publication number Publication date
WO2016155444A1 (en) 2016-10-06
CN104811895A (en) 2015-07-29

Similar Documents

Publication Publication Date Title
CN104811895B (en) Connection method and device of low-power-consumption Bluetooth
CN104838558B (en) Apparatus and method for using a wireless charger in a wireless docking environment
CN101621314B (en) Bluetooth mobile phone and pairing and binding method thereof
JP7069175B2 (en) Wireless communication system
JP6174964B2 (en) Power transmission control device, power reception control device, power transmission control method, power reception control method, and program
TW201348970A (en) Devices and methods for facilitating direct pairing in a wireless docking system
CN105323824B (en) Electronic equipment assisting WIFI equipment in networking, WIFI equipment and method
EP2853084A1 (en) Apparatus and method for direct pairing in a wireless docking system
CN106030560A (en) Automatic internet sharing
CN103873342A (en) Method, terminal and system for joining social group
CN110832947B (en) A kind of networking method and equipment
CN105227594A (en) Document transmission method, Apparatus and system
CN103856374A (en) Data transmission method, terminal and home interconnected system
CN102271146B (en) The method and system that a kind of multiple people's net equipment collaboration is downloaded
CN105978940A (en) Friend adding method and system of intelligent wearable device
CN105959968A (en) Wifi configuration method and device
CN106851198B (en) Network camera operation method and network camera
JP6408690B2 (en) Near-field discovery method, user equipment, and storage medium
CN105323711A (en) A grouping method, device and system
CN103200527B (en) The means of communication of a kind of voice and/or video and device
CN104519034A (en) Multi-terminal collaboration entertainment control equipment and communication method for same
CN105379375A (en) A method and device for transmitting a synchronization signal
JP6250509B2 (en) File sharing system, server device, and file sharing method
CN110858965B (en) Data transmission method and device, terminal and storage medium
CN104168045A (en) Data transmission method and data transmission device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20160111

Address after: 523860 Guangdong Province, Dongguan city Changan Town Road No. 126 building two usha BBK

Applicant after: Shi Shanshan

Address before: 523860 Guangdong Province, Dongguan city Changan Town Road No. 126 building two usha BBK

Applicant before: Guangdong GENIUS Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20190531

Address after: 523860 No. 168 Dongmen Middle Road, Xiaobian Community, Chang'an Town, Dongguan City, Guangdong Province

Patentee after: Guangdong GENIUS Technology Co., Ltd.

Address before: 523860 Second Floor, 126 Wushabugao Avenue, Chang'an Town, Dongguan City, Guangdong Province

Patentee before: Shi Shanshan