CN105827282A - Bluetooth equipment networking method and device and Bluetooth equipment - Google Patents

Bluetooth equipment networking method and device and Bluetooth equipment Download PDF

Info

Publication number
CN105827282A
CN105827282A CN 201610349303 CN201610349303A CN105827282A CN 105827282 A CN105827282 A CN 105827282A CN 201610349303 CN201610349303 CN 201610349303 CN 201610349303 A CN201610349303 A CN 201610349303A CN 105827282 A CN105827282 A CN 105827282A
Authority
CN
Grant status
Application
Patent type
Prior art keywords
bluetooth device
bluetooth
device
connection
same
Prior art date
Application number
CN 201610349303
Other languages
Chinese (zh)
Inventor
李志晨
Original Assignee
卧槽科技(深圳)有限公司
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

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive loop type
    • H04B5/0025Near field system adaptations
    • H04B5/0031Near field system adaptations for data transfer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATIONS 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 COMMUNICATIONS NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update
    • H04W40/246Connectivity information discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATIONS NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATIONS NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • 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 THIR OWN ENERGY USE
    • Y02D70/00Techniques for reducing energy consumption in wireless communication networks
    • Y02D70/10Techniques for reducing energy consumption in wireless communication networks according to the Radio Access Technology [RAT]
    • 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 THIR OWN ENERGY USE
    • Y02D70/00Techniques for reducing energy consumption in wireless communication networks
    • Y02D70/40According to the transmission technology
    • Y02D70/42Near-field transmission systems, e.g. inductive or capacitive coupling

Abstract

The invention relates to the field of Bluetooth equipment, in particular to a Bluetooth equipment networking method and device and Bluetooth equipment. The method comprises the following steps that: first Bluetooth equipment scans and is connected with second Bluetooth equipment, and transmits a connection request data packet to the second Bluetooth equipment, wherein the connection request data packet includes a target Bluetooth equipment identifier; the second Bluetooth equipment receives the connection request data packet, and judges whether the target Bluetooth equipment identifier is the same as a second Bluetooth equipment identifier or not; and if the target Bluetooth equipment identifier is the same as the second Bluetooth equipment identifier, the second Bluetooth equipment transmits a successful connection data packet to the first Bluetooth equipment, and the first Bluetooth equipment receives the successful connection data packet and adds the second Bluetooth equipment identifier and the target equipment identifier into corresponding fields of a routing table of the first Bluetooth equipment. According to the networking method, network access ways of all Bluetooth equipment are the same, namely the Bluetooth equipment has same roles and same protocols; pre-configuration is not needed; and a networking way is simple and feasible.

Description

-种蓝牙设备组网方法、装置及蓝牙设备 - kind of networking method Bluetooth devices, Bluetooth devices, and means

技术领域 FIELD

[0001] 本发明设及蓝牙设备领域,尤其设及一种蓝牙设备组网方法、装置及蓝牙设备。 [0001] The field of the present invention is provided a Bluetooth device and, in particular, is provided, and one Bluetooth device networking method, devices and Bluetooth devices.

背景技术 Background technique

[0002] 低功耗蓝牙(BLE)是Bluetooth SIG于2010年7月7日推出的新的蓝牙4.0规范。 [0002] Bluetooth low energy (BLE) is a Bluetooth SIG on July 7, 2010 launch of the new Bluetooth 4.0 specification. 其最重要的特性是功耗极低,距离短。 Its most important feature is the low power consumption, short distance. 组网连接方式采用微微网(Piconet)形式,每个微微网中有且仅有一个主设备,其他皆为从设备。 Network connection using the piconet (Piconet) form, each piconet has one and only one master device, are all from other devices. 主设备通过时分的方式依次与各从设备通讯。 Master in turn communicate by time division manner from each device. 连接建立后网络中蓝牙设备身份确定不可更改,更不可W与网络外的设备通讯。 Bluetooth devices in the network connection is established to determine the identity can not be changed, but can not communicate with the outside W network devices. 更为通俗的理解就是,在现实生活中,集成低功耗蓝牙忍片的智能手机,仅可与手机蓝牙范围内的1个或多个(少于7个)的蓝牙设备通讯,无法与范围外的蓝牙设备通讯。 More popular understanding, in real life, integrated low-power Bluetooth forbearance piece of smart phones, only with one or more of the phone's Bluetooth range (less than 7) Bluetooth communication device, not with range communication Bluetooth device away. 此外,在没有手机的情况下,蓝牙设备之间也无法交换信息。 In addition, in the absence of cell phone cases, between Bluetooth devices can not exchange information. 运就造成了低功耗蓝牙通讯协议与其他组网通讯协议如Zi浊ee,Zwave相比,在组网上的巨大劣势。 Transport and causing low-power Bluetooth communications protocol compared with other network communication protocols such as Zi cloud ee, Zwave, a huge disadvantage in the group online.

[0003] 2013年10月蓝牙标准组织修订了标准更新至蓝牙4.1规范,新的蓝牙规范允许一个蓝牙设备同时存在于多个微微网中,并且可W同时在不同的微微网中扮演不同的主从角色。 [0003] October 2013 revised its standard Bluetooth standard update to the Bluetooth 4.1 specification, the new Bluetooth specification allows a Bluetooth device simultaneously exist in multiple piconet, and W can simultaneously play different owners in different piconet from the role. 但是现有的蓝牙设备组网方法通常有W下缺点:1、通常采用树形组网方法,比较复杂, 同时需要预配置,不够灵活,无法自组网,如申请号为201510531029.7 W及申请号为200810045160.2的发明专利;2、蓝牙设备长期处于扫描或者监听状态,而有效的扫描状态或监听状态功耗很高,不适合低功耗场合。 But the existing Bluetooth device networking method usually W under the disadvantages: 1, usually a tree networking method, is more complex, and requires pre-configured, not flexible enough to ad hoc networks, such as the application number and application number 201510531029.7 W of invention patent 200810045160.2; 2, the Bluetooth device scans or listening state is long, and effective scanning or listening state high power consumption state, is not suitable for low power applications.

发明内容 SUMMARY

[0004] 本发明的目的在于提供了一种蓝牙设备组网方法、装置W及蓝牙设备,旨在解决蓝牙设备组网方法复杂不够灵活W及不适合低功耗场合的问题。 [0004] The object of the present invention to provide a networking method Bluetooth devices, Bluetooth devices, and W, Bluetooth networking method to solve complicated problems, and W are not flexible enough for low-power occasions.

[0005] 第一方面,本发明提供了一种蓝牙设备组网方法,所述方法包括: [0005] In a first aspect, the present invention provides a networking method Bluetooth device, the method comprising:

[0006] 第一蓝牙设备扫描连接第二蓝牙设备,并发送连接请求数据包给所述第二蓝牙设备,所述连接请求数据包包括目标蓝牙设备标识; [0006] The first Bluetooth device connected to the second scanning Bluetooth devices, and transmits a connection request packet to the second Bluetooth device, the connection request packet includes the Bluetooth device identification;

[0007] 所述第二蓝牙设备接收所述连接请求数据包并判断所述目标蓝牙设备标识是否与第二蓝牙设备标识相同; [0007] The second Bluetooth device receiving the connection request packet and determines whether the Bluetooth device identification is identical to the second Bluetooth device identification;

[000引若所述目标蓝牙设备标识是否与第二蓝牙设备标识相同,则所述第二蓝牙设备发送连接成功数据包给所述第一蓝牙设备,所述第一蓝牙设备接收连接成功数据包并将所述第二蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中; [000 incorporated if the Bluetooth device and the second Bluetooth device identifies whether the same identification, the second Bluetooth device transmits the connection success data packet to the first Bluetooth device, the Bluetooth device receiving the first packet data connection is successful and said second Bluetooth device identification, a target device identifier added to the corresponding fields in its own routing table;

[0009] 优选的,所述方法还包括若目标蓝牙设备标识与第二蓝牙设备标识不相同,则所述第二蓝牙设备检查自身的路由表中是否有与所述目标蓝牙设备标识相同的标识; [0009] Preferably, the method further comprising identifying if the Bluetooth device and the second Bluetooth device identity is not the same, whether there is a Bluetooth device identifier to the target identifier is the same as the second Bluetooth device checks its routing table ;

[0010] 若第二蓝牙设备的路由表中没有与所述目标蓝牙设备标识相同的标识,则第二蓝牙设备扫描连接第=蓝牙设备,并将所述连接请求数据包发送给所述第=蓝牙设备,所述第=蓝牙设备接收所述连接请求数据包并判断所述目标蓝牙设备标识是否与自身标识相同,若相同,则所述第=蓝牙设备发送连接成功数据包给所述第二蓝牙设备,所述第二蓝牙设备接收连接成功数据包并将所述连接成功数据包转发给所述第一蓝牙设备,同时第二蓝牙设备将第=蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中;第一蓝牙设备接收第二蓝牙设备转发的连接成功数据包并将所述第二蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中。 [0010] If the second Bluetooth device in the routing table with the Bluetooth device does not identify the same identifier, the second Bluetooth device connected to the first scan = Bluetooth device, and the connection request data packet to said second = Bluetooth devices, the first device receives the Bluetooth = connection request packet and determines whether the Bluetooth device identifies itself with the same identifier, if yes, the first Bluetooth device transmits = success packet to said second connection Bluetooth device, the Bluetooth device receiving the second packet data connection is successful and the connection success data packet to the first Bluetooth device, the first Bluetooth device while a second Bluetooth device identity =, is added to identify the target device itself route the corresponding field in the table; connected to a first Bluetooth device successfully receiving a second Bluetooth device to forward a packet identification and the second Bluetooth device, a target device identifier added to the corresponding fields in its own routing table.

[0011] 优选的,所述方法还包括:若第二蓝牙设备的路由表中有与所述目标蓝牙设备标识相同的标识,则所述第二蓝牙设备发送连接成功数据包给所述第一蓝牙设备,所述第一蓝牙设备接收连接成功数据包并将所述第二蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中。 [0011] Preferably, the method further comprising: if the target has the same Bluetooth device identifier identifying the second Bluetooth device in the routing table, then the second Bluetooth device transmits data packets to the first connection is successful Bluetooth device, the Bluetooth device receiving the first packet data connection is successful and the second Bluetooth device identification, a target device identifier added to the corresponding fields in its own routing table.

[0012] 优选的,所述第一蓝牙设备接收连接成功数据包之后,还包括:自动断开第一蓝牙设备与第二蓝牙设备的连接。 After [0012] Preferably, the first Bluetooth device successfully receives a data packet connection, further comprising: automatically disconnects a first Bluetooth device and the second Bluetooth device.

[0013] 优选的,第二蓝牙设备接收连接成功数据包之后,还包括: After [0013] Preferably, the second Bluetooth device receives a data packet successfully connected, further comprising:

[0014] 自动断开第=蓝牙设备与第二蓝牙设备的连接。 [0014] automatically disconnect the first connector and the second Bluetooth device = Bluetooth device.

[0015] 优选的,所述路由表包括W下字段:目标设备标识、下一跳设备标识、跳数W及使用频次。 [0015] Preferably, the W field of the routing table comprising: a target device identifier, a device identifier next hop, hop count W and frequency of use.

[0016] 优选的,所述方法还包括:判断路由表大小是否大于预设阔值,若是,则删除一定周期内使用频次最低的路由信息。 [0016] Preferably, the method further comprising: determining whether the routing table size is larger than a preset width value, if yes, deleting a certain period of the lowest frequency of use of the routing information.

[0017] 第二方面,本发明还提供了一种蓝牙设备组网装置,所述装置包括: [0017] a second aspect, the present invention also provides a Bluetooth device networking apparatus, said apparatus comprising:

[0018] 扫描模块,用于扫描连接蓝牙设备; [0018] The scanning module configured to scan connecting Bluetooth devices;

[0019] 发送接收模块,用于发送或接收连接请求数据包给蓝牙设备,所述连接请求数据包包括目标蓝牙设备标识;W及用于接收连接成功数据包; [0019] transmitting and receiving means for transmitting or receiving a connection request packet to the Bluetooth device, the connection request packet includes the Bluetooth device identification; W is successful and a connection for receiving data packets;

[0020] 判断模块,用于在接收到连接请求数据包后,判断所述目标蓝牙设备标识是否与自身设备标识相同; [0020] The determining module, configured to, after receiving the connection request packet, the Bluetooth device determines whether the target device identifies itself with the same identifier;

[0021] 添加模块,用于在接收连接成功数据包后,将发送连接成功数据包对应的蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中。 [0021] adding module, configured to, after receiving a successful connection packet, transmits the packet data connection is successful identification corresponding Bluetooth device, a target device identifier added to the corresponding fields in its own routing table.

[0022] 优选的,所述装置还包括: [0022] Preferably, the apparatus further comprising:

[0023] 检查模块,用于当目标蓝牙设备标识与自身设备标识不相同,检查自身的路由表中是否有与所述目标蓝牙设备标识相同的标识; [0023] checking module, configured to, when the Bluetooth device identifier and the device identifier itself is not the same, check the Bluetooth device with the same identification to identify itself in the routing table;

[0024] 断开模块,用于在接收连接成功数据包后,断开与发送连接成功数据包对应的蓝牙设备之间的连接。 [0024] disconnect module, configured to, after receiving a successful data packet connection, the connection between the success of the Bluetooth device corresponding to the data packet transmission is disconnected.

[0025] 第=方面的,本发明还提供了一种蓝牙设备,所述蓝牙设备包括上述的蓝牙设备组网装置。 [0025] = a first aspect, the present invention also provides a Bluetooth device, the Bluetooth device comprising a Bluetooth device networking apparatus described above.

[0026] 有益效果:本发明的提供了一种蓝牙设备组网方法,第一蓝牙设备通过扫描连接蓝牙设备后直接发送连接请求数据包给第二蓝牙设备,第二蓝牙设备接收所述连接请求数据包并判断目标蓝牙设备标识是否与第二蓝牙设备标识相同,若相同则第二蓝牙设备发送连接成功数据包给所述第一蓝牙设备,第一蓝牙设备接收连接成功数据包并将所述第二蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中。 [0026] Advantageous Effects: The present invention provides a networking method Bluetooth device, the Bluetooth device transmits a first Bluetooth device is connected directly to the connection request data packet by scanning the second Bluetooth device, the second Bluetooth device receiving the connection request packet and determines whether the Bluetooth device and the second Bluetooth device identifier identifying the same, if the same is connected to the second Bluetooth device successfully transmits a data packet to the first Bluetooth device, the first Bluetooth device receiving the connection success data packet and the second Bluetooth device identification, a target device identifier added to the corresponding fields in its own routing table. 该组网方法中所有蓝牙设备入网方式相同即各个蓝牙设备角色相同,协议也相同,无需预配置,组网方式简单易行;同时在适当时候才进行扫描,且蓝牙设备发送数据处于广播状态而非监听状态,因此功耗低。 The networking method of any Bluetooth device in the same network i.e. the same manner as the respective role of the Bluetooth device, the same protocols, without pre-arranged, simple networking; simultaneously scanning only at the appropriate time, and the Bluetooth device transmits data in the broadcasting state non-listening state, and thus low power consumption.

附图说明 BRIEF DESCRIPTION

[0027] 为了更清楚地说明本发明实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可W根据运些附图获得其他的附图。 [0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings briefly described embodiments or the prior art needed to be used in describing the embodiments. Apparently, the drawings described below are merely Some embodiments of the present invention, those of ordinary skill in the art is concerned, without any creative effort, and W may be transported in accordance with these drawings other drawings.

[0028] 图1是本发明一实施例提供的蓝牙设备组网方法流程图; [0028] FIG. 1 is a flowchart of the Bluetooth device networking method of the present invention is provided a embodiment;

[0029] 图2是本发明一实施例提供的蓝牙设备组网方法流程图; [0029] FIG 2 is a flowchart of the Bluetooth device networking method of the present invention is provided a embodiment;

[0030] 图3是本发明实施例提供的一应用场景示意图; [0030] FIG. 3 is a schematic view of an application scenario according to an embodiment of the present invention;

[0031 ]图4是本发明实施例提供的另一应用场景示意图; [0031] FIG. 4 is a schematic diagram of another application scenario according to an embodiment of the present invention;

[0032] 图5是本发明一实施例提供的蓝牙设备组网装置结构框图。 [0032] FIG. 5 is a block diagram showing a network apparatus according to the present invention, the structure of a Bluetooth device according to an embodiment.

具体实施方式 detailed description

[0033] 为了使本发明的目的、技术方案及优点更加清楚明白,W下结合附图及实施例,对本发明进行进一步详细说明。 [0033] To make the objectives, technical solutions and advantages of the present invention will become more apparent from, the accompanying drawings and embodiments W, of the present invention will be further described in detail. 应当理解,此处所描述的具体实施例仅仅用W解释本发明,并不用于限定本发明。 It should be understood that the specific embodiments described herein are only used to explain the present invention W, not intended to limit the present invention.

[0034] 图1为本发明实施例提供的一种蓝牙设备组网方法流程图,参照图1,该法包括W 下步骤: [0034] Figure 1 a flowchart of a Bluetooth device networking method according to an embodiment of the present invention, with reference to FIG. 1, W which comprises the steps of:

[0035] 步骤101、第一蓝牙设备扫描连接第二蓝牙设备,并发送连接请求数据包给所述第二蓝牙设备,所述连接请求数据包包括目标蓝牙设备标识。 [0035] Step 101, the first Bluetooth device connected to the second scanning Bluetooth devices, and transmits a connection request packet to the second Bluetooth device, the connection request packet includes a target identification Bluetooth device.

[0036] 具体的,当第一蓝牙设备需要发送数据给目标蓝牙设备时,第一蓝牙设备检查自身的路由表是否有目标蓝牙设备标识,如果自身的路由表中没有目标蓝牙设备标识,则第一蓝牙设备扫描其区域范围内的正在广播的第二蓝牙设备,当扫描到第二蓝牙设备时,贝U 连接第二蓝牙设备,并发送连接请求数据包给第二蓝牙设备。 [0036] Specifically, when the first Bluetooth device needs to send data to the Bluetooth device, the first Bluetooth device checks its routing table whether the Bluetooth device identification target, if the routing table does not own Bluetooth device identifier, the first a second Bluetooth device scanning Bluetooth devices are within its broadcast range of the region, when scanning the second Bluetooth device, a Bluetooth device connected to the second shell U, and transmits the connection request packet to the second Bluetooth device. 该连接请求数据包包括目标蓝牙设备标识,所述标识可W为蓝牙设备的ID或者是蓝牙设备的MAC地址。 The connection request packet includes the Bluetooth device identifier, the identifier may be W MAC address of the Bluetooth device or Bluetooth device ID. 需要说明的,若扫描到多个第二蓝牙设备,则第一蓝牙设备综合RSSI(蓝牙信号强弱)W及历史参数选择最优的第二蓝牙设备进行连接。 Incidentally, if a plurality of scanning a second Bluetooth device, the first Bluetooth device integrated RSSI (signal strength Bluetooth) W and historical parameter selecting an optimal second Bluetooth devices are connected.

[0037] 本发明实施例所描述的每个蓝牙设备自身的路由表包括W下字段:目标设备标识、下一跳设备标识、跳数W及使用频次。 Each Bluetooth device embodiments described embodiment [0037] The present invention own routing table includes fields under W: target device identifier, a device identifier next hop, hop count W and frequency of use. 同样目标设备标识可W为目标设备的ID或者MAC 地址,下一跳设备标识可W为吓一跳设备的ID或者MAC地址。 W may be the same target device identifier for the target device ID or MAC address, next hop identifier ID may be surprised and W is the MAC address or device. 跳数指的是从本设备到目标设备一共需要中转的次数。 Refers to the number of hops from the device to the target device needs a total transit. 使用频次指的是该路由条目的使用频次。 Frequency of use refers to the frequency of use of the routing entries.

[0038] 步骤102、所述第二蓝牙设备接收所述连接请求数据包。 [0038] Step 102, the second Bluetooth device receiving the connection request packet.

[0039] 步骤103、所述第二蓝牙设备判断所述目标蓝牙设备标识是否与第二蓝牙设备标识相同。 [0039] Step 103, the second Bluetooth device said Bluetooth device determines whether the same identification and the second Bluetooth device identification.

[0040] 步骤104、若所述目标蓝牙设备标识与第二蓝牙设备标识相同,所述第二蓝牙设备发送连接成功数据包给所述第一蓝牙设备。 [0040] Step 104, if the Bluetooth device and the second Bluetooth device identifier identifying the same, said second Bluetooth device transmits data packets to the first connection is successful Bluetooth device.

[0041 ]当目标蓝牙设备标识与第二蓝牙设备标识相同,说明第二蓝牙设备就是目标蓝牙设备,第二蓝牙设备发送连接成功数据包给所述第一蓝牙设备,告知第一蓝牙设备链路连接成功。 [0041] When the Bluetooth device and the second Bluetooth device identifier identifying the same, a second Bluetooth device that the Bluetooth device, the Bluetooth device transmits a second data packet to said first connection is successful Bluetooth device, the Bluetooth device notifies the first link connection succeeded.

[0042] 步骤105、所述第一蓝牙设备接收连接成功数据包并将所述第二蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中。 [0042] Step 105, the first Bluetooth device receives the connection success data packet and the second Bluetooth device identification, a target device identifier added to the corresponding fields in its own routing table.

[0043] 第一蓝牙设备将第二蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中,也即将新的路由信息添加到自身的路由表中。 [0043] The first Bluetooth device to a second Bluetooth device identification, the target device identification field itself added to the corresponding routing table, it is also to be added to the new routing information in its routing table. 优选的,第一蓝牙设备接收连接成功数据包之后,还包括:自动断开第一蓝牙设备与第二蓝牙设备的连接,运样可W大大减少功耗。 Preferably, after the first Bluetooth device successfully receives a data packet connection, further comprising: automatically disconnects a first Bluetooth device and the second Bluetooth device, a sample transport W can greatly reduce power consumption.

[0044] 该蓝牙设备组网方法,第一蓝牙设备通过扫描连接蓝牙设备后直接发送连接请求数据包给第二蓝牙设备,第二蓝牙设备接收所述连接请求数据包并判断目标蓝牙设备标识是否与第二蓝牙设备标识相同,若相同则第二蓝牙设备发送连接成功数据包给所述第一蓝牙设备,第一蓝牙设备接收连接成功数据包并将所述第二蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中。 [0044] The Bluetooth device networking method, the first Bluetooth-enabled device transmits a connection request packet to the second Bluetooth connection device by scanning a Bluetooth device, a second Bluetooth device receiving the connection request packet and determines whether the Bluetooth device identification the same with the second Bluetooth device identification, if the same is connected to the second Bluetooth device successfully transmits a data packet to the first Bluetooth device, the first Bluetooth device receives the connection success data packet and the second Bluetooth device identification, device identification target added to the corresponding fields in its own routing table. 该组网方法中所有蓝牙设备入网方式相同即各个蓝牙设备角色相同,组网时各蓝牙设备通过扫描连接该蓝牙设备蓝牙范围内的蓝牙设备,每个蓝牙设备都可W是主设备也可W是从设备,运样网内的节点个数理论上没有上限,实现了蓝牙设备的mesh自组网。 The networking method of any Bluetooth device in the same network i.e. the same manner as the respective role of the Bluetooth device, each Bluetooth device connected to the Bluetooth device Bluetooth devices within range of the Bluetooth network via scanning, each Bluetooth master device may also be W is W there is no upper limit from the device, the number of nodes in the theoretical sample transport network, to achieve a mesh ad hoc network of Bluetooth devices. 各个节点协议也相同,蓝牙设备的mesh网络内所有的节点互相沟通组网,无需预配置,组网方式简单易行;同时在适当时候才进行扫描,且蓝牙设备发送数据处于广播状态而非监听状态,因此功耗低。 Each node is also the same protocol, all network nodes within the mesh network to communicate with each other Bluetooth devices, without pre-arranged, simple networking; simultaneously scanning only at the appropriate time, and the Bluetooth device to transmit data broadcasting is not listening state state, the power consumption is low.

[0045] 图2为本发明实施例提供的又一蓝牙设备组网方法流程图,参照图2,该法包括W 下步骤: [0045] FIG 2 is a flowchart further Bluetooth networking method according to an embodiment of the present invention, with reference to FIG. 2, W which comprises the steps of:

[0046] 步骤201、第一蓝牙设备扫描连接第二蓝牙设备,并发送连接请求数据包给所述第二蓝牙设备,所述连接请求数据包包括目标蓝牙设备标识。 [0046] Step 201, the first Bluetooth device connected to the second scanning Bluetooth devices, and transmits a connection request packet to the second Bluetooth device, the connection request packet includes a target identification Bluetooth device.

[0047] 具体的,当第一蓝牙设备需要发送数据给目标蓝牙设备时,第一蓝牙设备检查自身的路由表是否有目标蓝牙设备标识,如果自身的路由表中没有目标蓝牙设备标识,则第一蓝牙设备扫描其区域范围内的正在广播的第二蓝牙设备,当扫描到第二蓝牙设备时,贝U 连接第二蓝牙设备,并发送连接请求数据包给第二蓝牙设备。 [0047] Specifically, when the first Bluetooth device needs to send data to the Bluetooth device, the first Bluetooth device checks its routing table whether the Bluetooth device identification target, if the routing table does not own Bluetooth device identifier, the first a second Bluetooth device scanning Bluetooth devices are within its broadcast range of the region, when scanning the second Bluetooth device, a Bluetooth device connected to the second shell U, and transmits the connection request packet to the second Bluetooth device. 该连接请求数据包包括目标蓝牙设备标识,所述标识可W为蓝牙设备的ID或者是蓝牙设备的MAC地址。 The connection request packet includes the Bluetooth device identifier, the identifier may be W MAC address of the Bluetooth device or Bluetooth device ID. 需要说明的,若扫描到多个第二蓝牙设备,则第一蓝牙设备综合RSSI(蓝牙信号强弱)W及历史参数选择最优的第二蓝牙设备进行连接。 Incidentally, if a plurality of scanning a second Bluetooth device, the first Bluetooth device integrated RSSI (signal strength Bluetooth) W and historical parameter selecting an optimal second Bluetooth devices are connected.

[0048] 本发明实施例所描述的每个蓝牙设备自身的路由表包括W下字段:目标设备标识、下一跳设备标识、跳数W及使用频次。 [0048] Each Bluetooth device embodiments described embodiments of the present invention is its routing table includes fields at W: target device identifier, a device identifier next hop, hop count W and frequency of use. 同样目标设备标识可W为目标设备的ID或者MAC 地址,下一跳设备标识可W为吓一跳设备的ID或者MAC地址。 W may be the same target device identifier for the target device ID or MAC address, next hop identifier ID may be surprised and W is the MAC address or device. 跳数指的是从本设备到目标设备一共需要中转的次数。 Refers to the number of hops from the device to the target device needs a total transit. 使用频次指的是该路由条目的使用频次。 Frequency of use refers to the frequency of use of the routing entries.

[0049] 步骤202、所述第二蓝牙设备接收所述连接请求数据包。 [0049] Step 202, the second Bluetooth device receiving the connection request packet.

[0050] 步骤203、所述第二蓝牙设备判断所述目标蓝牙设备标识是否与第二蓝牙设备标识相同。 [0050] Step 203, the second Bluetooth device said Bluetooth device determines whether the same identification and the second Bluetooth device identification. 若所述目标蓝牙设备标识与第二蓝牙设备标识相同,则执行步骤204;若目标蓝牙设备标识与第二蓝牙设备标识不相同,则执行步骤205; If the Bluetooth device and the second Bluetooth device identifier identifying the same, step 204 is performed; if the Bluetooth device identity and the second Bluetooth device identity is not the same, step 205 is executed;

[0051] 步骤204、所述第二蓝牙设备发送连接成功数据包给所述第一蓝牙设备,所述第一蓝牙设备接收连接成功数据包并将所述第二蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中。 [0051] Step 204, the second Bluetooth device transmits the connection success data packet to the first Bluetooth device, the Bluetooth device receiving the first packet data connection is successful and the second Bluetooth device identification, device identification target added field itself corresponds to the routing table.

[0052] 当目标蓝牙设备标识与第二蓝牙设备标识相同,说明第二蓝牙设备就是目标设备,第二蓝牙设备发送连接成功数据包给所述第一蓝牙设备,告知第一蓝牙设备链路连接成功,第一蓝牙设备将第二蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中, 也即将新的路由信息添加到自身的路由表中。 [0052] When the Bluetooth device and the second Bluetooth device identifier identifying the same, a second Bluetooth device is the target device, the second Bluetooth device is connected successfully transmitting a first data packet to the Bluetooth device, the Bluetooth device notifies the first link connection success, the first Bluetooth device will be the second Bluetooth device identification, device identification target itself added to the corresponding fields in the routing table, will soon add new routes to its routing table.

[0053] 步骤205、所述第二蓝牙设备检查自身的路由表中是否有与所述目标蓝牙设备标识相同的标识。 [0053] Step 205, whether there is the same Bluetooth device identifier identifying the second Bluetooth device checks its routing table. 若第二蓝牙设备自身的路由表中存在与所述目标蓝牙设备标识相同的标识,则执行步骤206,否则执行步骤207。 If the second Bluetooth device said Bluetooth device is present with the same identity to identify itself in the routing table, step 206 is performed, otherwise, step 207 is executed.

[0054] 当目标蓝牙设备标识与第二蓝牙设备标识不相同时,说明目标设备不是第二蓝牙设备,运时第二蓝牙设备会检查自身的路由表中是否有与所述目标蓝牙设备标识相同的标识,也即检查第二蓝牙设备到目标蓝牙设备的链路是否已经建立。 [0054] When the Bluetooth device identity and the second Bluetooth device identity is not the same, whether target device is not the second Bluetooth device, the Bluetooth device when the second operation checks its routing table with the same target Bluetooth device identification logo, ie check whether the link to the second Bluetooth device Bluetooth device has been established.

[0055] 步骤206、第二蓝牙设备发送连接成功数据包给所述第一蓝牙设备,第一蓝牙设备接收连接成功数据包并将第二蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中。 [0055] Step 206, the second Bluetooth device transmits the connection success data packet to the first Bluetooth device, the first Bluetooth device receives the connection success data packet and the second Bluetooth device identification, device identification target itself added to the corresponding routing table field.

[0056] 若第二蓝牙设备自身的路由表中存在与所述目标蓝牙设备标识相同的标识,则说明第二蓝牙设备到目标设备的路由链接已存在,不需要重新建立,那么第二蓝牙设备可W 发送连接成功数据包给所述第一蓝牙设备,告知第一蓝牙设备链路连接成功,第一蓝牙设备将第二蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中。 [0056] If there exists the same Bluetooth device identifier identifying the second Bluetooth apparatus itself in the routing table, then the second Bluetooth device to a target device routing link already exists, no re-established, then the second Bluetooth device W can be successfully transmitted data packet to said first connector Bluetooth device, the Bluetooth device notifies the first link connection is successful, the first Bluetooth device to a second Bluetooth device identification, a target device identifier added to the corresponding fields in its own routing table. 从而第一蓝牙设备到目标蓝牙设备的链路建立成功。 So that the first Bluetooth device to link the target Bluetooth device is successfully established.

[0057] 步骤207、第二蓝牙设备扫描连接第=蓝牙设备,并将所述连接请求数据包发送给所述第=蓝牙设备;所述第=蓝牙设备接收所述连接请求数据包并判断所述目标蓝牙设备标识是否与自身标识相同。 [0057] Step 207, the second Bluetooth device connected to the first scan = Bluetooth device, and the connection request data packet to the second Bluetooth device =; = the first Bluetooth device receiving the connection request packet and determines whether the said target Bluetooth device identification is the same as its own identity.

[0058] 若第二蓝牙设备的路由表中没有与所述目标蓝牙设备标识相同的标识,说明第二蓝牙设备与目标设备的链路没有建立,此时第二蓝牙设备会扫描自身蓝牙范围内的正在广播的其他蓝牙设备,继续查找自身蓝牙范围的其他蓝牙设备是否存在目标蓝牙设备从而建立新的链路。 [0058] If the second Bluetooth device and the routing table does not identify the same target Bluetooth device identifier, the link of the second Bluetooth device and the target device is not established, then a second Bluetooth Bluetooth device itself scans range other Bluetooth devices is being broadcast, continue to find their Bluetooth range of other Bluetooth devices if there is targeted Bluetooth device to establish a new link. 具体的,第二蓝牙设备扫描连接第=蓝牙设备,并将所述连接请求数据包发送给所述第=蓝牙设备,所述第=蓝牙设备接收所述连接请求数据包并判断所述目标蓝牙设备标识是否与自身标识相同。 Specifically, the second Bluetooth device connected to the first scan = Bluetooth device, and the connection request data packet to the second Bluetooth device =, = the first Bluetooth device receiving the connection request packet and determines whether the target Bluetooth device identification is the same as its own identity.

[0059] 步骤208、当目标蓝牙设备标识与第=蓝牙设备标识相同时,第=蓝牙设备发送连接成功数据包给所述第二蓝牙设备,所述第二蓝牙设备接收连接成功数据包并将所述连接成功数据包转发给所述第一蓝牙设备,同时第二蓝牙设备将第=蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中;第一蓝牙设备接收第二蓝牙设备转发的连接成功数据包并将所述第二蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中。 [0059] Step 208, when the Bluetooth device identifier and the second identifier are the same = Bluetooth device, the Bluetooth device transmits a first connection is successful = data packet to the second Bluetooth device, the Bluetooth device receiving the second packet data connection is successful and the connection success data packet to the first Bluetooth device, the first Bluetooth device while a second Bluetooth device identifier = target device identifier added to the corresponding fields in its own routing table; first Bluetooth device receiving the second Bluetooth device forwards connection success data packet and said second Bluetooth device identification, a target device identifier added to the corresponding fields in its own routing table.

[0060] 当目标蓝牙设备标识与第=蓝牙设备标识相同时,说明第=蓝牙设备就是目标蓝牙设备,此时第=蓝牙设备会发送连接成功数据包给所述第二蓝牙设备,告知第二蓝牙设备链路建立成功,同时第二蓝牙设备会将连接成功数据包发送给第一蓝牙设备告知第一蓝牙设备链路建立成功。 [0060] When the Bluetooth device identifier and the second identifier are the same = Bluetooth device, the Bluetooth device is described with reference = Bluetooth device, when the first Bluetooth device will send a connection = successful data packet to the second Bluetooth device, informing the second Bluetooth link is successfully established, while a second Bluetooth device will successfully connect data packet to a first device to inform the Bluetooth link is successfully established the first Bluetooth device. 并且第二蓝牙设备W及第一蓝牙设备会将目标设备标识W及下一跳设备标识添加到对应的路由表字段中。 W and the second Bluetooth device and a first Bluetooth device will target device identifier identifying the device W and the next-hop routing table corresponding to the added fields.

[0061] 需要说明的是,当目标蓝牙设备标识与第=蓝牙设备标识不相同时,此时第=蓝牙设备会检查自身的路由表中是否有与所述目标蓝牙设备标识相同的标识,重复步骤205 中第二蓝牙设备的动作,运样直到与目标设备连接成功为止。 [0061] Incidentally, when the Bluetooth device identifier and the second identifier = Bluetooth device is not the same, at this time whether the Bluetooth device with the same identifier of the first identifier = Bluetooth device checks its routing table, repeat in step 205, the second Bluetooth device operation, sample transport device until a connection to the target date. 当然,具体实现时,也可W设定组网预设时间,若预设时间内链路还未成功建立,则会往上一节点反馈链路建立失败信息,告知链路建立失败。 Of course, the specific implementation, but also W to set the default network time, if a preset time the link has not been successfully established, it will build up a node failure information feedback link, link establishment fails to inform. 同时当上述蓝牙设备扫描连接其蓝牙范围内的其他蓝牙设备时,如果该蓝牙范围内没有其他蓝牙设备,该蓝牙设备会中断扫描,并反馈链路建立失败信息给上一跳蓝牙设备。 At the same time when said scanning Bluetooth devices connected to other Bluetooth devices within its Bluetooth range if no other Bluetooth devices within range of the Bluetooth, the Bluetooth device scans interrupted, and the feedback link setup failure message to the previous hop Bluetooth device.

[0062] 优选的,上述组网方法中,所述第一蓝牙设备接收连接成功数据包之后,还包括: 自动断开第一蓝牙设备与第二蓝牙设备的连接。 After [0062] Preferably, in the networking method, the first Bluetooth device successfully receives a data packet connection, further comprising: automatically disconnects a first Bluetooth device and the second Bluetooth device. 第二蓝牙设备接收连接成功数据包之后, 还包括:自动断开第=蓝牙设备与第二蓝牙设备的连接,运样在没有数据发送时,断开连接,设备处于不工作状态,可W大大节省功耗。 After successfully receiving the data packet of the second Bluetooth device is connected, further comprising: automatically disconnecting the first connector and the second Bluetooth device = a Bluetooth device, the sample transport when no data is sent, is disconnected, the device is in an inactive state, can greatly W save power.

[0063] 优选的,所述方法还包括:判断路由表的大小是否大于预设阔值,若是,则删除一定周期内使用频次最低的路由信息。 [0063] Preferably, the method further comprising: determining whether the routing table is larger than the width preset value, if yes, deleting a certain period of the lowest frequency of use of the routing information. 蓝牙设备每次通过路由表的路径发送数据时,都会记录相应路径的使用频次。 Bluetooth device transmits data over each path routing table, are recorded using the corresponding frequency path. 当路由表比较大时,比如超过硬件内存了,则删除一定周期内使用频次最低的路由f胃息,W减少内存。 When the routing table is relatively large, such as more than a hardware memory, delete certain period using frequency f route with the lowest interest rates stomach, W reduce memory.

[0064] 按照上述实施例组网方法进行蓝牙设备组网后,后续蓝牙设备都可W按照路由表中的路径进行数据发送。 [0064] After the Bluetooth device network networking method according to the above embodiment, the Bluetooth device can follow W data transmission path according to the routing table. 该组网方法中所有蓝牙设备入网方式相同即各个蓝牙设备角色相同,组网时各蓝牙设备通过扫描连接该蓝牙设备蓝牙范围内的蓝牙设备,每个蓝牙设备都可W是主设备也可W是从设备,运样网内的节点个数理论上没有上限,实现了蓝牙设备的mesh自组网。 The networking method of any Bluetooth device in the same network i.e. the same manner as the respective role of the Bluetooth device, each Bluetooth device connected to the Bluetooth device Bluetooth devices within range of the Bluetooth network via scanning, each Bluetooth master device may also be W is W there is no upper limit from the device, the number of nodes in the theoretical sample transport network, to achieve a mesh ad hoc network of Bluetooth devices. 各个节点协议也相同,蓝牙设备的mesh网络内所有的节点互相沟通组网,无需预配置,组网方式简单易行;同时在适当时候才进行扫描,且蓝牙设备发送数据处于广播状态而非监听状态,因此功耗低。 Each node is also the same protocol, all network nodes within the mesh network to communicate with each other Bluetooth devices, without pre-arranged, simple networking; simultaneously scanning only at the appropriate time, and the Bluetooth device to transmit data broadcasting is not listening state state, the power consumption is low.

[0065] 需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可W采用其他顺序或者同时进行。 [0065] Incidentally, the foregoing embodiments of the methods for, for ease of description, it is described as a series combination of actions, those skilled in the art should understand that the present invention is not described in the operation sequence It limited since according to the present invention, some steps may be performed in other sequences or W simultaneously.

[0066] 为了更好地说明上述实施例所描述的蓝牙设备组网方法,下面通过一应用场景具体说明:如图3所示, [0066] To better illustrate the Bluetooth networking method described in the above embodiments, by following a specific application scenario Description: 3,

[0067] 设备A的蓝牙信号范围内仅能扫描到B,A和C互相都无法发现对方,B可W扫描到A 和C。 [0067] A within Bluetooth signal range of the device only scans to B, A and C to each other can not find each other, B may be scanned W A and C. 现在A需要传输一条f曰息给C。 A now needs to transmit a message to said C. f

[006引1. A检索自己的路由表,没有关于设备C的条目。 [Cited 1. A 006 retrieving its own routing table, there is no entry for device C.

[00例2.A发起周边设备扫描,扫描到B,与B建立主从连接,A为主设备,B为从设备。 [00 cases initiated peripherals 2.A scanning, scanning to B, B to establish the connection from the main master, A device, B from the device. 同时, 因为连接的建立A设备不再广播。 Meanwhile, since the establishment of the connection device A is no longer broadcast.

[0070] 3.B收到数据包后,提取出目标设备C地址,与自己地址比对不相同。 After [0070] 3.B received packet, extracts the address of the target device C, the same as the own address does not match. 然后检查自己的路由表,同样没有C地址的信息。 Then check its routing table, and there is no information C addresses. 于是B发起扫描,扫描到设备C,与C建立主从连接,B为主设备,C为从设备。 B then initiate a scan, the scanning device to C, and C is connected to establish a master-slave master, device B, C from the device. 此时B同时担任AB连接的从设备和BC连接的主设备。 At this time, the same time as the master device B from the device connected to the connector and BC AB.

[0071] 4.C收到数据包后,提取出目标设备C地址,与自己地址比对相同。 After [0071] 4.C received packet, extracts the address of the target device C, and the same ratio of the own address. 返回链接建立成功数据包给B,B添加目标设备C,下一跳设备C,跳转次数1,的路由条目。 Return route entry link is established successfully packet to B, B to add the target device C, the next hop device C, number of hops 1, of. 邮角认后也返回链接建立成功数据包给AdA添加目标设备C,下一跳设备B,跳转次数1,的路由条目。 After the horn Post identified also links back to the establishment of a successful data packet to the target device AdA add C, the next hop device B, jump number 1, route entry. 至此,ABC之间的数据链路建立成功。 So far, the data link established between the ABC success.

[0072] 图4为另一应用场景示意图,参照图4, [0072] FIG. 4 is a schematic view of another application scenario, with reference to FIG. 4,

[0073] 如果网络情况如上图所示,A需要发送一个数据包给D,最开始A的路由表没有D的路由信息,他会先连接B请求建立链路,B扫描周围有C和D,即找到了D,那么会回复链接建立成功并且返回BD 1跳的路由信息。 [0073] If the network conditions as shown above, A needs to send a packet to D, the beginning of the routing table of the routing information A D is not, he will first connection request to establish a link B, and C around the B-scan with a D, that is, to find a D, then will return link is established successfully and returns routing information BD 1 hop. 在给B,C和给D传递信息的后,A收到后建立路由表,如表I所示: After giving the B, C and D to the transmission of information, to establish the routing table after receipt of A, as shown in Table I:

[0074] 表1 A建立的路由表 [0074] Table 1 A establish a routing table

Figure CN105827282AD00101

[0076] 同时B也建立了如下路由表,如表2所示: [0076] B is also established at the same time as the routing table, as shown in Table 2:

[0077] 表1 B建立的路由表「nn~7Ql [0077] Table 1 B establish a routing table, "nn ~ 7Ql

Figure CN105827282AD00102

[0079] 路由表建立成功后,所有的数据将参照远种路由表发送而不需扫描。 After the [0079] routing table successfully established, all kinds of data with reference to the routing table sent away without scanning. 当硬件条件不足W存储过长的路由表时,将剔除使用频次最低的路由表ADB-2。 When the conditions of insufficient hardware routing table W stored too long, it will eliminate the lowest frequency of use of the routing table ADB-2.

[0080] 如A要再给D发送数据包,查找路由表,将链路请求发给下一跳B,B查找自己的路由表,将请求转发给D,链路建立完成。 [0080] The transmission data A to D to give the packet, the routing table, the next hop link request to B, B to find its own routing table, forwards the request to D, the link establishment completion. 不会遍历不相干的节点。 Not traverse the node irrelevant.

[0081] 另外,如上述组网方法所述,A之所W需要通过B转发数据包,是因为C和D都不在自己的无线范围内,如在自己的范围内比如E则直接转发无需中继。 [0081] Further, networking method as described in the above, the need of B W A forwarding packets, because C and D are not within its wireless range, such as within the scope of their forwards such directly without neutralization E following. 同理,C和D都在B的蓝牙范围内,所WB直接给D发数据包而不需管C。 Similarly, C and D are within the Bluetooth range B, the WB directly send data packets to the D without tube C.

[0082] 第二方面,本发明实施例还提供了一种蓝牙设备组网装置1,该装置了用于各种蓝牙设备中,包括当不限于手机、蓝牙耳机、IPAD等,参照图5,所该装置包括: [0082] a second aspect, embodiments of the present invention further provides a Bluetooth device networking apparatus 1, the apparatus for the various Bluetooth-enabled device, including when limited to mobile phones, Bluetooth headsets, IPAD the like, with reference to FIG. 5, the the apparatus comprising:

[0083] 扫描模块11,用于扫描蓝牙设备; [0083] 11 scanning module for scanning Bluetooth devices;

[0084] 发送接收模块12,用于发送或接收连接请求数据包给蓝牙设备,所述连接请求数据包包括目标蓝牙设备标识;W及用于接收连接成功数据包; [0084] The transceiver module 12 for transmitting or receiving a connection request packet to the Bluetooth device, the connection request packet includes the Bluetooth device identification; W is successful and a connection for receiving data packets;

[0085] 判断模块13,用于在接收到连接请求数据包后,判断所述目标蓝牙设备标识是否与自身设备标识相同; [0085] The determining module 13, configured to, after receiving the connection request packet, the Bluetooth device determines whether the target device identifies itself with the same identifier;

[0086] 检查模块14,用于当目标蓝牙设备标识与自身设备标识不相同,检查自身的路由表中是否有与所述目标蓝牙设备标识相同的标识; [0086] checking module 14, configured to, when the Bluetooth device identifier and the device identifier itself is not the same, check the Bluetooth device with the same identification to identify itself in the routing table;

[0087] 添加模块15,用于在接收连接成功数据包后,将发送连接成功数据包对应的蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中。 [0087] adding module 15, configured to, after receiving a successful connection packet, transmits the packet data connection is successful identification corresponding Bluetooth device, a target device identifier added to the corresponding fields in its own routing table.

[0088] 优选的,所述装置还包括: [0088] Preferably, the apparatus further comprising:

[0089] 断开模块16,用于在接收连接成功数据包后,断开与发送连接成功数据包对应的蓝牙设备之间的连接。 [0089] The disconnect module 16, configured to, after receiving a successful data packet connection, disconnect the connection between the success of the transmission packet corresponding to Bluetooth devices.

[0090] 优选的,所述判断模块还用于判断路由表的大小是否大于预设阔值,若是,则删除一定周期内使用频次最低的路由信息。 [0090] Preferably, the determining module is further configured to determining whether the size of the routing table is greater than a preset width value, if yes, deleting a certain period of the lowest frequency of use of the routing information.

[0091] 本实施例中的装置与前述实施例中的蓝牙设备组网方法是基于同一发明构思下的两个方面,在前面已经对方法实施过程作了详细的描述,所W本领域技术人员可根据前述描述清楚地了解本实施中的系统的结构及实施过程,为了说明书的简洁,在此就不再寶述。 [0091] The Bluetooth device of the present embodiment networking method is based on two aspects of the same concept of the invention, a method of implementation have already been described in detail the process and apparatus of the foregoing embodiment in the embodiment, those skilled in the W clearly understand the structure and implementation of the system of the present embodiment in accordance with the foregoing description, for brevity of description, this will not be described later treasure.

[0092] 第=方面的,本发明实施例还提供了一种蓝牙设备,所述蓝牙设备包括上述的蓝牙设备组网装置1。 [0092] = a first aspect, the present invention provides a further embodiment of the Bluetooth device, the Bluetooth device comprising a Bluetooth device networking apparatus described above 1.

[0093] W上所述仅为本发明的较佳实施例而已,并不用W限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。 [0093] W the embodiments of the invention only the preferred embodiments only, not to limit the invention by W, any modifications within the spirit and principle of the present invention, equivalent substitutions and improvements should be included in the within the scope of the present invention.

Claims (10)

  1. 1. 一种蓝牙设备组网方法,其特征在于,所述方法包括: 第一蓝牙设备扫描连接第二蓝牙设备,并发送连接请求数据包给所述第二蓝牙设备, 所述连接请求数据包包括目标蓝牙设备标识; 所述第二蓝牙设备接收所述连接请求数据包并判断所述目标蓝牙设备标识是否与第二蓝牙设备标识相同; 若所述目标蓝牙设备标识与第二蓝牙设备标识相同,则所述第二蓝牙设备发送连接成功数据包给所述第一蓝牙设备,所述第一蓝牙设备接收连接成功数据包并将所述第二蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中。 A Bluetooth device networking method, wherein the method comprises: scanning a first Bluetooth device connected to a second Bluetooth device, and transmits a connection request packet to the second Bluetooth device, the connection request packet Bluetooth device includes a target identification; the second Bluetooth device receives the connection request packet and determines whether the Bluetooth device identification is identical to the second Bluetooth device identifier; if the same target Bluetooth device identity and the second Bluetooth device identification , then the second Bluetooth device transmits data packet to said first connection is successful Bluetooth device, the Bluetooth device receiving the first packet data connection is successful and the second Bluetooth device identification, device identification target itself is added to the routing table in the corresponding field.
  2. 2. 根据权利要求1所述的蓝牙设备组网方法,其特征在于,所述方法还包括: 若目标蓝牙设备标识与第二蓝牙设备标识不相同,则所述第二蓝牙设备检查自身的路由表中是否有与所述目标蓝牙设备标识相同的标识; 若第二蓝牙设备的路由表中没有与所述目标蓝牙设备标识相同的标识,则第二蓝牙设备扫描连接第三蓝牙设备,并将所述连接请求数据包发送给所述第三蓝牙设备,所述第三蓝牙设备接收所述连接请求数据包并判断所述目标蓝牙设备标识是否与自身标识相同,若相同,则所述第三蓝牙设备发送连接成功数据包给所述第二蓝牙设备,所述第二蓝牙设备接收连接成功数据包并将所述连接成功数据包转发给所述第一蓝牙设备,同时第二蓝牙设备将第三蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中;第一蓝牙设备接收第二蓝牙设备 The Bluetooth device networking method according to claim 1, wherein said method further comprises: if the Bluetooth device identity and the second Bluetooth device identity is not the same, then the second Bluetooth device checks its routing whether there is the same identification Bluetooth device identity table; if not, the second Bluetooth device connected to the third scanning Bluetooth devices and Bluetooth device to the same identifications of the second Bluetooth device in the routing table, and the connection request packet to the third Bluetooth device, the third Bluetooth device receiving the connection request packet and determines whether the Bluetooth device identification identifies itself with the same, if the same, then the third Bluetooth device transmits the connection success data packet to the second Bluetooth device, the Bluetooth device receiving the second packet data connection is successful and the connection success data packet to the first Bluetooth device, the first device while the second Bluetooth three Bluetooth device ID, a target device identifier added to the corresponding fields in its own routing table; first Bluetooth device receiving the second Bluetooth device 发的连接成功数据包并将所述第二蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中。 Hair connection success data packet and the second Bluetooth device identification, a target device identifier added to the corresponding fields in its own routing table.
  3. 3. 根据权利要求2所述的蓝牙设备组网方法,其特征在于,所述方法还包括:若第二蓝牙设备的路由表中有与所述目标蓝牙设备标识相同的标识,则所述第二蓝牙设备发送连接成功数据包给所述第一蓝牙设备,所述第一蓝牙设备接收连接成功数据包并将所述第二蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中。 The Bluetooth device networking method according to claim 2, wherein said method further comprises: if the target has the same Bluetooth device identifier identifying the second Bluetooth device in the routing table, then the second two Bluetooth devices connected successfully transmitted data packet to the first Bluetooth device, the Bluetooth device receiving the first packet data connection is successful and the second Bluetooth device identification, a target device identifier added to the corresponding fields in its own routing table.
  4. 4. 根据权利要求3所述的蓝牙设备组网方法,其特征在于,所述第一蓝牙设备接收连接成功数据包之后,还包括:自动断开第一蓝牙设备与第二蓝牙设备的连接。 After the Bluetooth device according to claim networking method of claim 3, wherein said first Bluetooth device receives the connection success data packet, further comprising: automatically disconnects a first Bluetooth device and the second Bluetooth device.
  5. 5. 根据权利要求3所述的蓝牙设备组网方法,其特征在于,第二蓝牙设备接收连接成功数据包之后,还包括: 自动断开第三蓝牙设备与第二蓝牙设备的连接。 After the Bluetooth device according to claim networking method of claim 3, wherein the second Bluetooth device receives the connection success data packet, further comprising: automatically disconnects the third Bluetooth device and the second Bluetooth device.
  6. 6. 根据权利要求1所述的蓝牙设备组网方法,其特征在于,所述路由表包括以下字段: 目标设备标识、下一跳设备标识、跳数以及使用频次。 The Bluetooth device networking method according to claim 1, wherein the routing table includes the following fields: destination device identifier, a device identifier next hop, hop number and frequency of use.
  7. 7. 根据权利要求6所述的蓝牙设备组网方法,其特征在于,所述方法还包括: 判断路由表大小是否大于预设阈值,若是,则删除一定周期内使用频次最低的路由信息。 The Bluetooth device networking method according to claim 6, wherein said method further comprises: determining whether the routing table size is greater than a preset threshold, if yes, deleting a certain period of the lowest frequency of use of the routing information.
  8. 8. -种蓝牙设备组网装置,其特征在于,所述装置包括: 扫描模块,用于扫描蓝牙设备; 发送接收模块,用于发送或接收连接请求数据包给蓝牙设备,所述连接请求数据包包括目标蓝牙设备标识;以及用于接收连接成功数据包; 判断模块,用于在接收到连接请求数据包后,判断所述目标蓝牙设备标识是否与自身设备标识相同; 添加模块,用于在接收连接成功数据包后,将发送连接成功数据包对应的蓝牙设备标识、目标设备标识添加到自身路由表的对应字段中。 8. - Species Bluetooth device networking device, characterized in that said apparatus comprising: a scanning module for scanning Bluetooth devices; transmitting and receiving means for transmitting or receiving a connection request packet to the Bluetooth device, the connection request data identification packet includes the Bluetooth device; and means for receiving a packet data connection is successful; determining module, configured to, after receiving the connection request packet, it is determined whether the Bluetooth device identification device identifies itself with the same; adding module, configured to after receiving a successful connection packet, it transmits the packet data connection is successful identification corresponding Bluetooth device, a target device identifier added to the corresponding fields in its own routing table.
  9. 9. 根据权利要求7所述的蓝牙设备组网装置,其特征在于,所述装置还包括: 检查模块,用于当目标蓝牙设备标识与自身设备标识不相同,检查自身的路由表中是否有与所述目标蓝牙设备标识相同的标识; 断开模块,用于在接收连接成功数据包后,断开与发送连接成功数据包对应的蓝牙设备之间的连接。 9. The apparatus according to the Bluetooth networking apparatus according to claim 7, characterized in that said apparatus further comprising: a checking module configured to, when the Bluetooth device identifier and the device identifier itself is not the same, check its routing table Bluetooth device identifier to the target identifier of the same; disconnect module, configured to, after receiving a successful data packet connection, disconnect the data packet successfully to the transmission device corresponding to a Bluetooth connection.
  10. 10. -种蓝牙设备,其特征在于,所述蓝牙设备包括权利要求8或9之一所述的蓝牙设备组网装置。 10. - kind of the Bluetooth device, characterized in that, the Bluetooth device comprising a Bluetooth device networking device of claim 8 or 9 of one.
CN 201610349303 2016-05-24 2016-05-24 Bluetooth equipment networking method and device and Bluetooth equipment CN105827282A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201610349303 CN105827282A (en) 2016-05-24 2016-05-24 Bluetooth equipment networking method and device and Bluetooth equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201610349303 CN105827282A (en) 2016-05-24 2016-05-24 Bluetooth equipment networking method and device and Bluetooth equipment

Publications (1)

Publication Number Publication Date
CN105827282A true true CN105827282A (en) 2016-08-03

Family

ID=56530487

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201610349303 CN105827282A (en) 2016-05-24 2016-05-24 Bluetooth equipment networking method and device and Bluetooth equipment

Country Status (1)

Country Link
CN (1) CN105827282A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1453963A (en) * 2002-04-25 2003-11-05 三星电子株式会社 Method of bluetooth routing according to request and network formation and communication method of bluetooth group network
US20040223475A1 (en) * 2003-05-09 2004-11-11 Institute For Information Industry Data transfer method for a bluetooth scatternet
US20090201907A1 (en) * 2004-02-09 2009-08-13 Qualcomm Incorporated Multi-hop communications in a wireless network
CN101909012A (en) * 2010-08-02 2010-12-08 深圳中兴力维技术有限公司 Route addressing method based on tree network
CN102761351A (en) * 2011-04-27 2012-10-31 比亚迪股份有限公司 Information transfer method and system based on Bluetooth technology
CN102811076A (en) * 2011-06-03 2012-12-05 希姆通信息技术(上海)有限公司 Bluetooth connecting method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1453963A (en) * 2002-04-25 2003-11-05 三星电子株式会社 Method of bluetooth routing according to request and network formation and communication method of bluetooth group network
US20040223475A1 (en) * 2003-05-09 2004-11-11 Institute For Information Industry Data transfer method for a bluetooth scatternet
US20090201907A1 (en) * 2004-02-09 2009-08-13 Qualcomm Incorporated Multi-hop communications in a wireless network
CN101909012A (en) * 2010-08-02 2010-12-08 深圳中兴力维技术有限公司 Route addressing method based on tree network
CN102761351A (en) * 2011-04-27 2012-10-31 比亚迪股份有限公司 Information transfer method and system based on Bluetooth technology
CN102811076A (en) * 2011-06-03 2012-12-05 希姆通信息技术(上海)有限公司 Bluetooth connecting method

Similar Documents

Publication Publication Date Title
US20080002610A1 (en) Transmission of management messages for relay networks
US20130316705A1 (en) Method, apparatus, and computer program product for efficient network discovery
US20080062945A1 (en) Selecting a leader node for an ad hoc network based on services
US20130109313A1 (en) Method, apparatus, and computer program product for discovery of wireless networks
US20090086689A1 (en) Capwap/lwapp multicast flood control for roaming clients
US20090097428A1 (en) Apparatus, method, and computer program product providing improved power management in wireless networks
US7653011B2 (en) Spanning tree protocol for wireless networks
US20120057518A1 (en) Bluetooth networking
US20050157749A1 (en) System and method for communication with an external network in an IPv6 MANET network
US20050041628A1 (en) Apparatus and method for transparent layer 2 routing in a mobile ad hoc network
US7502354B1 (en) Mesh networking using point coordination function
US7835301B1 (en) Extended service set mesh topology representation
US7606175B1 (en) Extended service set mesh path selection
US7522540B1 (en) Extended service set mesh topology discovery
US20060092939A1 (en) Apparatus and method for extending mobility in a mobile ad hoc network
US20060205409A1 (en) Method and apparatus for network formation
US20090046614A1 (en) Method and system for updating a multicast state of a multicast group
US7376097B2 (en) Method of associating an IP address with a plurality of link layer addresses in a wireless communication network
US20080117823A1 (en) Detection and Handling of Lost Messages During Load-Balancing Routing Protocols
JP2004282270A (en) Radio ad hoc communication system, terminal, processing method therein, and program for making terminal to execute the method
US20130235792A1 (en) Systems and methods for establishing a connection setup through relays
JP2008533809A (en) Hybrid mesh routing protocol
Casetti et al. Content-centric routing in Wi-Fi direct multi-group networks
US20130281146A1 (en) Methods and systems for peer-to-peer network discovery using multi-user diversity
JP2005203991A (en) Wireless communication system, wireless communication terminal, and base station

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination