CN106792461B - BLE-based relay concentrator and low-power topology networking method - Google Patents

BLE-based relay concentrator and low-power topology networking method Download PDF

Info

Publication number
CN106792461B
CN106792461B CN201611198996.7A CN201611198996A CN106792461B CN 106792461 B CN106792461 B CN 106792461B CN 201611198996 A CN201611198996 A CN 201611198996A CN 106792461 B CN106792461 B CN 106792461B
Authority
CN
China
Prior art keywords
capacitor
data
concentrator
data relay
ble
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.)
Expired - Fee Related
Application number
CN201611198996.7A
Other languages
Chinese (zh)
Other versions
CN106792461A (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.)
Shandong University
Original Assignee
Shandong University
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 Shandong University filed Critical Shandong University
Priority to CN201611198996.7A priority Critical patent/CN106792461B/en
Publication of CN106792461A publication Critical patent/CN106792461A/en
Application granted granted Critical
Publication of CN106792461B publication Critical patent/CN106792461B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION 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 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)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a BLE-based relay concentrator, which is characterized by being provided with a host BLE terminal node circuit module and a slave BLE terminal node circuit module, wherein the host BLE terminal node circuit module is connected with the slave terminal node circuit module through an I2C bus so as to be favorable for directly connecting with a BLE node through one relay concentrator to read and write star-shaped topological data, and then forming tree-shaped topological data reading and writing with an upper computer through a plurality of relay concentrators so as to form large-scale data transmission, break through the upper limit of 8 slaves in the original networking, achieve the effects of low power consumption and long wireless transmission distance, and have the advantages of quick connection, high self-networking capability, electromagnetic interference resistance, accurate data transmission and the like.

Description

基于BLE的中继集中器及低功耗拓扑组网方法BLE-based relay concentrator and low-power topology networking method

技术领域technical field

本发明涉及数据采集系统技术领域,具体地说是一种基于BLE4.0的中继集中器及低功耗拓扑组网方法。The invention relates to the technical field of data acquisition systems, in particular to a BLE4.0-based relay concentrator and a low-power-consumption topology networking method.

背景技术Background technique

传统的BLE4.0 Central—Peripheral通讯方式,只能进行单一的点对点传输和简单的星型拓扑连接,并且在连接过程之中需要进行“扫描——连接——配对——绑定——传输——断开”的繁琐过程,而且在其过程之中,容易存在扫描缺失,连接配对反应时间过长等问题。并且在星型拓扑的连接过程之中,主机最多只能连接8个从机,无法实现大规模的组网。而另一种传统的BLE4.0 Observer—Broadcaster的连接方式,虽然无需连接,但是无法进行大规模的数据传输采集。The traditional BLE4.0 Central-Peripheral communication method can only perform a single point-to-point transmission and a simple star topology connection, and in the connection process, it is necessary to perform "scanning-connection-pairing-binding-transmission- "Disconnect" is a cumbersome process, and in the process, there are prone to problems such as lack of scanning and too long response time for connection and pairing. And in the connection process of star topology, the master can only connect 8 slaves at most, which cannot realize large-scale networking. The other traditional BLE4.0 Observer-Broadcaster connection method, although no connection is required, cannot perform large-scale data transmission and collection.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于解决现有技术的不足,提供一种连接快速、自组网能力大、抗电磁干扰、数据传输精确的基于BLE的中继集中器及低功耗拓扑组网方法。The purpose of the present invention is to solve the deficiencies of the prior art, and to provide a BLE-based relay concentrator and a low-power topology networking method with fast connection, large self-organizing network capability, anti-electromagnetic interference, and accurate data transmission.

本发明解决其技术问题所采用的技术方案是:The technical scheme adopted by the present invention to solve its technical problems is:

一种基于BLE的中继集中器,其特点在于设有主机BLE终端节点电路模块、从机BLE终端节点电路模块和电源供电模块,电源供电模块分别为主机BLE终端节点电路模块和从机BLE终端节点电路模块供电,所述主机BLE终端节点电路模块通过USB_P与USB_M两端口与从机BLE终端节点电路模块相连接,并通过IIC方式进行通讯,所述主机BLE终端节点电路模块包括CC2540处理器U5,电容C29,C31,C33,C27,C25,C21,C22,C19,C17,C13,电阻R9,电感L5,L7,L9,L11,晶振Y3,Y5,PCB天线E2,其中U5,R9,C33以及由晶振Y5和电容C29,C31构成的32.768k晶振系统以及晶振Y3,电容C27,C25构成的32M晶振系统共同构成了单片机最小工作系统,即单片机CC2540正常工作所需的电路系统,由电容C13,C17,C21,C22和电感L5,L7,L9,L11构成巴伦支匹配电路,用于调制发射与接收信号的阻抗匹配,并由天线E2负责信号的接收与发送;A BLE-based relay concentrator is characterized in that it is provided with a host BLE terminal node circuit module, a slave BLE terminal node circuit module and a power supply module, and the power supply modules are the host BLE terminal node circuit module and the slave BLE terminal respectively. The node circuit module is powered, the host BLE terminal node circuit module is connected with the slave BLE terminal node circuit module through the USB_P and USB_M ports, and communicates through the IIC mode, and the host BLE terminal node circuit module includes the CC2540 processor U5 , capacitors C29, C31, C33, C27, C25, C21, C22, C19, C17, C13, resistor R9, inductor L5, L7, L9, L11, crystal oscillator Y3, Y5, PCB antenna E2, among which U5, R9, C33 and The 32.768k crystal oscillator system composed of crystal oscillator Y5 and capacitors C29 and C31 and the 32M crystal oscillator system composed of crystal oscillator Y3, capacitors C27 and C25 together constitute the minimum working system of the single-chip microcomputer, that is, the circuit system required for the normal operation of the single-chip microcomputer CC2540. C17, C21, C22 and inductors L5, L7, L9, L11 form a Barents matching circuit, which is used to modulate the impedance matching of the transmitted and received signals, and the antenna E2 is responsible for the reception and transmission of the signal;

所述从机BLE终端节点电路模块包括CC2540处理器U6,电容C30,C32,C34,C28,C26,C24,C23,C20,C18,C14,电阻R10,R11,R12,R13,R14,电感L6,L8,L9,L12,晶振Y4,Y6,PCB天线E3,LED指示灯D5,D6,D7,D8,其中U6,R10,C34以及由晶振Y6和电容C30,C32构成的32.768k晶振系统以及晶振Y4,电容C28,C26构成的32M晶振系统共同构成了单片机最小工作系统,即单片机CC2540正常工作所需的电路系统,由电容C14,C18,C23,C24和电感L6,L8,L10,L12构成巴伦支匹配电路,用于调制发射与接收信号的阻抗匹配,并由天线E2负责信号的接收与发送,电阻R11,R12,R13,R14和LED指示灯D5,D6,D7,D8构成指示灯系统,用以显示中继器工作状态,以利于通过若干中继集中器与上位机形成树状拓扑数据读写,使之形成大规模的数据传输,再通过中继集中器与若干BLE节点装置形成星形拓扑数据读写,突破了原先组网的8个从机的上限,省略了不必要的“扫描-连接-配对-绑定”的繁琐过程,使连接时长缩减为3ms,大大降低了功耗,并使得无线传输距离更远。The slave BLE terminal node circuit module includes CC2540 processor U6, capacitors C30, C32, C34, C28, C26, C24, C23, C20, C18, C14, resistors R10, R11, R12, R13, R14, inductor L6, L8, L9, L12, crystal oscillator Y4, Y6, PCB antenna E3, LED indicators D5, D6, D7, D8, among which U6, R10, C34 and the 32.768k crystal oscillator system composed of crystal oscillator Y6 and capacitors C30, C32 and crystal oscillator Y4 , The 32M crystal oscillator system composed of capacitors C28 and C26 together constitutes the minimum working system of the single-chip microcomputer, that is, the circuit system required for the normal operation of the single-chip microcomputer CC2540. A matching circuit is used to modulate the impedance matching of the transmitted and received signals, and the antenna E2 is responsible for the reception and transmission of the signal. The resistors R11, R12, R13, R14 and the LED indicators D5, D6, D7, and D8 constitute the indicator system. It is used to display the working status of the repeater, so as to facilitate the formation of tree topology data reading and writing through several relay concentrators and the host computer, so as to form a large-scale data transmission, and then form a star through the relay concentrator and several BLE node devices. Shape topology data reading and writing, breaking through the upper limit of 8 slaves in the original network, omitting the unnecessary cumbersome process of "scanning-connecting-pairing-binding", reducing the connection time to 3ms, greatly reducing power consumption , and make the wireless transmission distance longer.

本发明所述中继集中器采用半双工的工作方式,以利于避免BLE节点之间的电磁干扰,达到数据传输精确的作用。The relay concentrator of the present invention adopts a half-duplex working mode, so as to avoid electromagnetic interference between BLE nodes and achieve accurate data transmission.

本发明所述中继集中器中的的数据包信息都带有经节点的ID号与报头报尾封装,以利于方便判别信息来源。The data packet information in the relay concentrator of the present invention is encapsulated with the ID number of the node and the header and tail, so as to facilitate the identification of the source of the information.

本发明所述电源供电模块包括直流稳压芯片AMS-1117 U4,钽电容C15,C16,电源外置接口P1,其中U4负责将外部电源降压为3.3V,C15,C16为稳压作用。The power supply module of the present invention includes a DC voltage regulator chip AMS-1117 U4, tantalum capacitors C15 and C16, and an external power supply interface P1, wherein U4 is responsible for stepping down the external power supply to 3.3V, and C15 and C16 are used for voltage regulation.

一种基于BLE4.0的中继集中器的低功耗拓扑组网方法,其特征在于组网方法步骤包括采用RSSI强度判断组建网拓扑结构和系统数据采集,采用RSSI强度判断组建网拓扑结构的步骤具体为;A low-power topology networking method based on a BLE4.0 relay concentrator, characterized in that the networking method steps include using RSSI strength to determine the network topology structure and system data collection, and using RSSI strength to determine the network topology structure. The steps are as follows;

1)上位机通过调用协议栈和盲连接的方式逐个向所有数据中继集中器发出搜索组网命令,以达到省去传统的BLE连接过程中不必要的繁琐等待时间;1) The host computer sends a search networking command to all data relay concentrators one by one by calling the protocol stack and blind connection, so as to save unnecessary cumbersome waiting time in the traditional BLE connection process;

2)数据中继集中器收到搜索组网命令后,开始启动扫描从机,并将读取到的从机IEEE地址和信号RSSI值存储;2) After the data relay concentrator receives the search networking command, it starts to scan the slave and stores the read slave IEEE address and signal RSSI value;

3)上位机逐个读取数据中继集中器中存储的IEEE地址和其信号RSSI数值;3) The host computer reads the IEEE address and its signal RSSI value stored in the data relay concentrator one by one;

上位机将读取的BLE节点的IEEE地址和自身的对照表进行比对,与其数据库中的ID号进行映射,确定唯一关系;The host computer compares the read IEEE address of the BLE node with its own comparison table, maps it with the ID number in the database, and determines the unique relationship;

4)上位机判断,是否有同一BLE节点的IEEE地址出现在不同的中继集中器返还的数据之中,如果有,则判断哪一个数据中继集中器返还的RSSI值更强,保证唯一性;4) The host computer judges whether the IEEE address of the same BLE node appears in the data returned by different relay concentrators, and if so, judges which data relay concentrator returns a stronger RSSI value to ensure uniqueness ;

5)上位机确定BLE节点和数据集中器的从属关系,并映射BLE节点与数据集中器的ID号,建表,完成自组网;5) The host computer determines the affiliation between the BLE node and the data concentrator, maps the ID numbers of the BLE node and the data concentrator, builds a table, and completes the ad hoc network;

所述系统数据采集的步骤具体为:The steps of the system data collection are as follows:

1)上位机确定所采集的BLE终端节点与数据中继集中器的从属关系,并向其中一个数据中继集中器发起忙连接;1) The host computer determines the affiliation between the collected BLE terminal node and the data relay concentrator, and initiates a busy connection to one of the data relay concentrators;

2)上位机向一个数据中继集中器发布采集命令,命令中包含要信息采集的种类,采集BLE终端的节点数,采集BLE终端的IEEE地址;2) The host computer issues a collection command to a data relay concentrator. The command includes the type of information to be collected, the number of nodes of the BLE terminal, and the IEEE address of the BLE terminal;

3)数据中继集中器向上位机返回确认信息;3) The data relay concentrator returns confirmation information to the upper computer;

4)上位机与数据中继集中采集器断开连接;4) The host computer is disconnected from the data relay centralized collector;

5)上位机重复本步骤中的(1)—(4)过程,直到与所有通讯节点所属的数据中继集中器完成采集命令发布通讯;5) The upper computer repeats the process (1)-(4) in this step until the communication with the data relay concentrator to which all communication nodes belong to complete the acquisition command and release communication;

6)数据中继集中器对其中一个BLE终端节点发起盲连接;6) The data relay concentrator initiates a blind connection to one of the BLE terminal nodes;

7)数据中继集中器向BLE终端节点发布数据采集命令;7) The data relay concentrator issues a data collection command to the BLE terminal node;

8)BLE终端节点回复数据,数据中包含自身的BLE节点ID号;8) The BLE terminal node replies with data, and the data contains its own BLE node ID number;

9)数据中继集中器将回复的数据添加报头报尾封装,并在数据中添加自身的数据集中采集器ID号;9) The data relay concentrator adds header and tail encapsulation to the reply data, and adds its own data collector ID number to the data;

10)数据中继集中器与BLE终端节点断开连接;10) The data relay concentrator is disconnected from the BLE terminal node;

11)数据中继集中器重复本步骤中的(6)—(10)过程,直到完成对所有BLE终端节点的信息采集;11) The data relay concentrator repeats the process (6)-(10) in this step until the information collection of all BLE terminal nodes is completed;

12)上位机再次向数据中继集中器发起盲连接;12) The host computer initiates a blind connection to the data relay concentrator again;

13)上位机向数据中继集中器发布数据返还命令;13) The host computer issues a data return command to the data relay concentrator;

14)数据中继集中器向上位机逐条发送所采集到的数据;14) The data relay concentrator sends the collected data to the upper computer one by one;

15)数据中继集中器向上位机发送数据传输完成信息;15) The data relay concentrator sends the data transmission completion information to the upper computer;

16)上位机与数据中继集中器断开连接;16) The host computer is disconnected from the data relay concentrator;

17)上位机重复本步骤中的(12)—(16)过程,直到所有数据采集完毕。17) The upper computer repeats the process (12)-(16) in this step until all data collection is completed.

本发明所述组网方法还包括数据中继集中器判忙机制,其步骤具体为:The networking method of the present invention also includes a busy judgment mechanism for the data relay concentrator, and the steps are specifically:

1)上位机与数据中继集中器发起连接,并与数据中继集中器的BLE从机部分相连接;1) The host computer initiates a connection with the data relay concentrator, and connects with the BLE slave part of the data relay concentrator;

2)连接建立后,数据中继集中器的BLE从机部分自动通过I2C总线与数据中继集中器的BLE主机部分相通讯,询问主机工作状态;2) After the connection is established, the BLE slave part of the data relay concentrator automatically communicates with the BLE master part of the data relay concentrator through the I2C bus to inquire about the working status of the host;

3)数据中继集中器的BLE主机部分若忙,则回复忙。若处于正常工作状态,则回复正常;3) If the BLE host part of the data relay concentrator is busy, it will reply busy. If it is in normal working state, it will return to normal;

4)数据中继集中器BLE从机部分,在收到主机工作状态后,将主机工作状态回复上位机;4) The BLE slave part of the data relay concentrator, after receiving the working status of the host, returns the working status of the host to the upper computer;

5)上位机在收到数据中继集中器工作状态后,若数据中继集中器处于正常状态,则正常进行数据读取工作;5) After the host computer receives the working status of the data relay concentrator, if the data relay concentrator is in a normal state, the data reading work will be carried out normally;

6)若上位机收到数据中继集中器工作状态为忙,则立刻断开连接,并添加备注事件;6) If the host computer receives that the working status of the data relay concentrator is busy, it will immediately disconnect and add a remark event;

7)在上位机与其他数据中继集中器通讯完成之后,查看备注事件,与备注事件中尚未通讯完成的数据中继集中器重复(1)—(6)过程;7) After the communication between the host computer and other data relay concentrators is completed, check the remark event, and repeat the process (1)-(6) with the data relay concentrator whose communication has not been completed in the remark event;

8)若上位机对某一数据中继集中器判断始终处于忙的状态,则发出报警,以利于及时判断中继集中器的正常使用状态。8) If the host computer judges that a certain data relay concentrator is always in a busy state, it will issue an alarm to facilitate timely judgment of the normal use state of the relay concentrator.

本发明由于采用上述结构和方法,具有连接快速、自组网能力大、抗电磁干扰、数据传输精确等优点。Due to the adoption of the above structure and method, the present invention has the advantages of fast connection, large self-organizing network capability, anti-electromagnetic interference, accurate data transmission, and the like.

附图说明Description of drawings

图1是本发明中继集中器的电气原理图。FIG. 1 is an electrical schematic diagram of the relay concentrator of the present invention.

图2是图1中主机BLE终端节点电路模块的放大图。FIG. 2 is an enlarged view of the circuit module of the host BLE terminal node in FIG. 1 .

图3是图1中从机BLE终端节点电路模块的放大图。FIG. 3 is an enlarged view of the circuit module of the slave BLE terminal node in FIG. 1 .

图4是RSSI强度判断组建网拓扑结构的流程图。FIG. 4 is a flowchart of RSSI strength judging to build a network topology.

图5是系统数据采集的流程图。Figure 5 is a flow chart of system data acquisition.

图6是数据中继集中器判忙机制的流程图。FIG. 6 is a flow chart of the busy judgment mechanism of the data relay concentrator.

具体实施方式Detailed ways

下面结合附图对本发明进行说明。The present invention will be described below with reference to the accompanying drawings.

如附图所示,一种基于BLE的中继集中器,其特点在于设有主机BLE终端节点电路模块1、从机BLE终端节点电路模块2和电源供电模块3,电源供电模块3分别为主机BLE终端节点电路模块1和从机BLE终端节点电路模块2供电,所述主机BLE终端节点电路模块1通过USB_P与USB_M两端口与从机BLE终端节点电路模块2相连接,并通过IIC方式进行通讯,所述主机BLE终端节点电路模块包括CC2540处理器U5,电容C29,C31,C33,C27,C25,C21,C22,C19,C17,C13,电阻R9,电感L5,L7,L9,L11,晶振Y3,Y5,PCB天线E2,其中U5,R9,C33以及由晶振Y5和电容C29,C31构成的32.768k晶振系统以及晶振Y3,电容C27,C25构成的32M晶振系统共同构成了单片机最小工作系统,即单片机CC2540正常工作所需的电路系统,由电容C13,C17,C21,C22和电感L5,L7,L9,L11构成巴伦支匹配电路,用于调制发射与接收信号的阻抗匹配,并由天线E2负责信号的接收与发送;As shown in the drawings, a BLE-based relay concentrator is characterized in that it is provided with a host BLE terminal node circuit module 1, a slave BLE terminal node circuit module 2 and a power supply module 3, and the power supply module 3 is the host respectively. The BLE terminal node circuit module 1 and the slave BLE terminal node circuit module 2 are powered, and the host BLE terminal node circuit module 1 is connected to the slave BLE terminal node circuit module 2 through the USB_P and USB_M ports, and communicates by means of IIC , the host BLE terminal node circuit module includes CC2540 processor U5, capacitors C29, C31, C33, C27, C25, C21, C22, C19, C17, C13, resistor R9, inductor L5, L7, L9, L11, crystal oscillator Y3 , Y5, PCB antenna E2, of which U5, R9, C33 and the 32.768k crystal oscillator system composed of crystal oscillator Y5 and capacitors C29, C31 and the 32M crystal oscillator system composed of crystal oscillator Y3, capacitor C27, C25 constitute the minimum working system of the single-chip microcomputer, that is The circuit system required for the normal operation of the single-chip microcomputer CC2540 is composed of capacitors C13, C17, C21, C22 and inductors L5, L7, L9, L11 to form a Balents matching circuit, which is used to modulate the impedance matching of the transmitting and receiving signals, and is connected by the antenna E2 Responsible for the reception and transmission of signals;

所述从机BLE终端节点电路模块包括CC2540处理器U6,电容C30,C32,C34,C28,C26,C24,C23,C20,C18,C14,电阻R10,R11,R12,R13,R14,电感L6,L8,L9,L12,晶振Y4,Y6,PCB天线E3,LED指示灯D5,D6,D7,D8,其中U6,R10,C34以及由晶振Y6和电容C30,C32构成的32.768k晶振系统以及晶振Y4,电容C28,C26构成的32M晶振系统共同构成了单片机最小工作系统,即单片机CC2540正常工作所需的电路系统,由电容C14,C18,C23,C24和电感L6,L8,L10,L12构成巴伦支匹配电路,用于调制发射与接收信号的阻抗匹配,并由天线E2负责信号的接收与发送,电阻R11,R12,R13,R14和LED指示灯D5,D6,D7,D8构成指示灯系统,用以显示中继器工作状态,以利于通过若干中继集中器与上位机形成树状拓扑数据读写,使之形成大规模的数据传输,再通过中继集中器与若干BLE节点装置形成星形拓扑数据读写,突破了原先组网的8个从机的上限,省略了不必要的“扫描-连接-配对-绑定”的繁琐过程,使连接时长缩减为3ms,大大降低了功耗,并使得无线传输距离更远。The slave BLE terminal node circuit module includes CC2540 processor U6, capacitors C30, C32, C34, C28, C26, C24, C23, C20, C18, C14, resistors R10, R11, R12, R13, R14, inductor L6, L8, L9, L12, crystal oscillator Y4, Y6, PCB antenna E3, LED indicators D5, D6, D7, D8, among which U6, R10, C34 and the 32.768k crystal oscillator system composed of crystal oscillator Y6 and capacitors C30, C32 and crystal oscillator Y4 , The 32M crystal oscillator system composed of capacitors C28 and C26 together constitutes the minimum working system of the single-chip microcomputer, that is, the circuit system required for the normal operation of the single-chip microcomputer CC2540. A matching circuit is used to modulate the impedance matching of the transmitted and received signals, and the antenna E2 is responsible for the reception and transmission of the signal. The resistors R11, R12, R13, R14 and the LED indicators D5, D6, D7, and D8 constitute the indicator system. It is used to display the working status of the repeater, so as to facilitate the formation of tree topology data reading and writing through several relay concentrators and the host computer, so as to form a large-scale data transmission, and then form a star through the relay concentrator and several BLE node devices. Shape topology data reading and writing, breaking through the upper limit of 8 slaves in the original network, omitting the unnecessary cumbersome process of "scanning-connecting-pairing-binding", reducing the connection time to 3ms, greatly reducing power consumption , and make the wireless transmission distance longer.

本发明所述中继集中器采用半双工的工作方式,以利于避免BLE节点之间的电磁干扰,达到数据传输精确的作用。The relay concentrator of the present invention adopts a half-duplex working mode, so as to avoid electromagnetic interference between BLE nodes and achieve accurate data transmission.

本发明所述中继集中器中的的数据包信息都带有经节点的ID号与报头报尾封装,以利于方便判别信息来源。The data packet information in the relay concentrator of the present invention is encapsulated with the ID number of the node and the header and tail, so as to facilitate the identification of the source of the information.

本发明所述电源供电模块包括直流稳压芯片AMS-1117 U4,钽电容C15,C16,电源外置接口P1,其中U4负责将外部电源降压为3.3V,C15,C16为稳压作用。The power supply module of the present invention includes a DC voltage regulator chip AMS-1117 U4, tantalum capacitors C15 and C16, and an external power supply interface P1, wherein U4 is responsible for stepping down the external power supply to 3.3V, and C15 and C16 are used for voltage regulation.

一种基于BLE4.0的中继集中器的低功耗拓扑组网方法,其特征在于组网方法步骤包括采用RSSI强度判断组建网拓扑结构和系统数据采集,采用RSSI强度判断组建网拓扑结构的步骤具体为;A low-power topology networking method based on a BLE4.0 relay concentrator, characterized in that the networking method steps include using RSSI strength to determine the network topology structure and system data collection, and using RSSI strength to determine the network topology structure. The steps are as follows;

1)上位机通过调用协议栈和盲连接的方式逐个向所有数据中继集中器发出搜索组网命令,以达到省去传统的BLE连接过程中不必要的繁琐等待时间;1) The host computer sends a search networking command to all data relay concentrators one by one by calling the protocol stack and blind connection, so as to save unnecessary cumbersome waiting time in the traditional BLE connection process;

2)数据中继集中器收到搜索组网命令后,开始启动扫描从机,并将读取到的从机IEEE地址和信号RSSI值存储;2) After the data relay concentrator receives the search networking command, it starts to scan the slave and stores the read slave IEEE address and signal RSSI value;

3)上位机逐个读取数据中继集中器中存储的IEEE地址和其信号RSSI数值;3) The host computer reads the IEEE address and its signal RSSI value stored in the data relay concentrator one by one;

上位机将读取的BLE节点的IEEE地址和自身的对照表进行比对,与其数据库中的ID号进行映射,确定唯一关系;The host computer compares the read IEEE address of the BLE node with its own comparison table, maps it with the ID number in the database, and determines the unique relationship;

4)上位机判断,是否有同一BLE节点的IEEE地址出现在不同的中继集中器返还的数据之中,如果有,则判断哪一个数据中继集中器返还的RSSI值更强,保证唯一性;4) The host computer judges whether the IEEE address of the same BLE node appears in the data returned by different relay concentrators, and if so, judges which data relay concentrator returns a stronger RSSI value to ensure uniqueness ;

5)上位机确定BLE节点和数据集中器的从属关系,并映射BLE节点与数据集中器的ID号,建表,完成自组网;5) The host computer determines the affiliation between the BLE node and the data concentrator, maps the ID numbers of the BLE node and the data concentrator, builds a table, and completes the ad hoc network;

所述系统数据采集的步骤具体为:The steps of the system data collection are as follows:

1)上位机确定所采集的BLE终端节点与数据中继集中器的从属关系,并向其中一个数据中继集中器发起盲连接;1) The host computer determines the affiliation between the collected BLE terminal node and the data relay concentrator, and initiates a blind connection to one of the data relay concentrators;

2)上位机向一个数据中继集中器发布采集命令,命令中包含要信息采集的种类,采集BLE终端的节点数,采集BLE终端的IEEE地址;2) The host computer issues a collection command to a data relay concentrator. The command includes the type of information to be collected, the number of nodes of the BLE terminal, and the IEEE address of the BLE terminal;

3)数据中继集中器向上位机返回确认信息;3) The data relay concentrator returns confirmation information to the upper computer;

4)上位机与数据中继集中采集器断开连接;4) The host computer is disconnected from the data relay centralized collector;

5)上位机重复本步骤中的(1)—(4)过程,直到与所有通讯节点所属的数据中继集中器完成采集命令发布通讯;5) The upper computer repeats the process (1)-(4) in this step until the communication with the data relay concentrator to which all communication nodes belong to complete the acquisition command and release communication;

6)数据中继集中器对其中一个BLE终端节点发起盲连接;6) The data relay concentrator initiates a blind connection to one of the BLE terminal nodes;

7)数据中继集中器向BLE终端节点发布数据采集命令;7) The data relay concentrator issues a data collection command to the BLE terminal node;

8)BLE终端节点回复数据,数据中包含自身的BLE节点ID号;8) The BLE terminal node replies with data, and the data contains its own BLE node ID number;

9)数据中继集中器将回复的数据添加报头报尾封装,并在数据中添加自身的数据集中采集器ID号;9) The data relay concentrator adds header and tail encapsulation to the reply data, and adds its own data collector ID number to the data;

10)数据中继集中器与BLE终端节点断开连接;10) The data relay concentrator is disconnected from the BLE terminal node;

11)数据中继集中器重复本步骤中的(6)—(10)过程,直到完成对所有BLE终端节点的信息采集;11) The data relay concentrator repeats the process (6)-(10) in this step until the information collection of all BLE terminal nodes is completed;

12)上位机再次向数据中继集中器发起盲连接;12) The host computer initiates a blind connection to the data relay concentrator again;

13)上位机向数据中继集中器发布数据返还命令;13) The host computer issues a data return command to the data relay concentrator;

14)数据中继集中器向上位机逐条发送所采集到的数据;14) The data relay concentrator sends the collected data to the upper computer one by one;

15)数据中继集中器向上位机发送数据传输完成信息;15) The data relay concentrator sends the data transmission completion information to the upper computer;

16)上位机与数据中继集中器断开连接;16) The host computer is disconnected from the data relay concentrator;

17)上位机重复本步骤中的(12)—(16)过程,直到所有数据采集完毕。17) The upper computer repeats the process (12)-(16) in this step until all data collection is completed.

本发明所述组网方法还包括数据中继集中器判忙机制,其步骤具体为:The networking method of the present invention also includes a busy judgment mechanism for the data relay concentrator, and the steps are specifically:

1)上位机与数据中继集中器发起连接,并与数据中继集中器的BLE从机部分相连接;1) The host computer initiates a connection with the data relay concentrator, and connects with the BLE slave part of the data relay concentrator;

2)连接建立后,数据中继集中器的BLE从机部分自动通过I2C总线与数据中继集中器的BLE主机部分相通讯,询问主机工作状态;2) After the connection is established, the BLE slave part of the data relay concentrator automatically communicates with the BLE master part of the data relay concentrator through the I2C bus to inquire about the working status of the host;

3)数据中继集中器的BLE主机部分若忙,则回复忙。若处于正常工作状态,则回复正常;3) If the BLE host part of the data relay concentrator is busy, it will reply busy. If it is in normal working state, it will return to normal;

4)数据中继集中器BLE从机部分,在收到主机工作状态后,将主机工作状态回复上位机;4) The BLE slave part of the data relay concentrator, after receiving the working status of the host, returns the working status of the host to the upper computer;

5)上位机在收到数据中继集中器工作状态后,若数据中继集中器处于正常状态,则正常进行数据读取工作;5) After the host computer receives the working status of the data relay concentrator, if the data relay concentrator is in a normal state, the data reading work will be carried out normally;

6)若上位机收到数据中继集中器工作状态为忙,则立刻断开连接,并添加备注事件;6) If the host computer receives that the working status of the data relay concentrator is busy, it will immediately disconnect and add a remark event;

7)在上位机与其他数据中继集中器通讯完成之后,查看备注事件,与备注事件中尚未通讯完成的数据中继集中器重复(1)—(6)过程;7) After the communication between the host computer and other data relay concentrators is completed, check the remark event, and repeat the process (1)-(6) with the data relay concentrator whose communication has not been completed in the remark event;

8)若上位机对某一数据中继集中器判断始终处于忙的状态,则发出报警,以利于及时判断中继集中器的正常使用状态。8) If the host computer judges that a certain data relay concentrator is always in a busy state, it will issue an alarm to facilitate timely judgment of the normal use state of the relay concentrator.

本发明由于采用上述结构和方法,具有连接快速、自组网能力大、抗电磁干扰、数据传输精确等优点。Due to the adoption of the above structure and method, the present invention has the advantages of fast connection, large self-organizing network capability, anti-electromagnetic interference, accurate data transmission, and the like.

Claims (1)

1. The BLE-based relay concentrator is characterized by comprising a host BLE terminal node circuit module, a slave BLE terminal node circuit module and a power supply module, wherein the power supply module is used for supplying power for the host BLE terminal node circuit module and the slave BLE terminal node circuit module respectively; the host BLE terminal node circuit module comprises a CC2540 processor U5, a capacitor C29, a capacitor C31, a capacitor C33, a capacitor C27, a capacitor C25, a capacitor C21, a capacitor C22, a capacitor C19, a capacitor C17, a capacitor C13, a resistor R9, an inductor L5, an inductor L7, an inductor L9, an inductor L11, a crystal oscillator Y3, a crystal oscillator Y5 and a PCB antenna E2; a 32 th pin of the CC2540 processor U5 is grounded through a capacitor C29, a 33 th pin is grounded through a capacitor C31, a 40 th pin is grounded through a capacitor C33, a 22 th pin is grounded through a capacitor C27, a 23 th pin is grounded through a capacitor C25, and a 30 th pin is grounded through a resistor R9; a crystal oscillator Y3 is connected between a 22 th pin and a 23 rd pin of a CC2540 processor U5, a crystal oscillator Y5 is connected between a 32 th pin and a 33 th pin of a CC2540 processor U5, a capacitor C17 and a capacitor C21 are connected in series, an inductor L9 and a capacitor C22 are connected in series, a 26 th pin of a CC2540 processor U5 is connected with a capacitor C21, a 25 th pin of a CC2540 processor U5 is connected with a capacitor C22, a node between the capacitor C17 and the capacitor C21 is grounded through an inductor L11, a node before the inductor L9 and the capacitor C22 is grounded through the capacitor C19, one end of the inductor L7 is simultaneously connected with the capacitor C17 and the inductor L9, the other end of the inductor L7 is connected with a PCB antenna E2 through an inductor L5, and a node between the inductor L7 and the inductor L5 is grounded through a capacitor C13; the slave BLE terminal node circuit module comprises a CC2540 processor U6, a capacitor C30, a capacitor C32, a capacitor C34, a capacitor C28, a capacitor C26, a capacitor C24, a capacitor C23, a capacitor C20, a capacitor C18, a capacitor C14, a resistor R10, an inductor L6, an inductor L8, an inductor L9, an inductor L12, a crystal oscillator Y4, a crystal oscillator Y6 and a PCB antenna E3, wherein a 32 th pin of a CC2540 processor U6 is grounded through a capacitor C30, a 33 th pin is grounded through a capacitor C32, a 40 th pin is grounded through a capacitor C34, a 22 th pin is grounded through a capacitor C28, a 23 th pin is grounded through a capacitor C26, and a 30 th pin is grounded through a resistor R10; a crystal oscillator Y4 is connected between a 22 th pin and a 23 rd pin of a CC2540 processor U6, a crystal oscillator Y6 is connected between a 32 th pin and a 33 th pin of a CC2540 processor U6, a capacitor C18 and a capacitor C23 are connected in series, an inductor L10 and a capacitor C24 are connected in series, a 26 th pin of a CC2540 processor U6 is connected with a capacitor C23, a 25 th pin of a CC2540 processor U6 is connected with a capacitor C24, a node between the capacitor C18 and the capacitor C23 is grounded through an inductor L12, a node before the inductor L10 and the capacitor C24 is grounded through the capacitor C20, one end of the inductor L8 is simultaneously connected with the capacitor C18 and the inductor L10, the other end of the inductor L8 is connected with a PCB antenna E3 through an inductor L6, and a node between the inductor L6 and the inductor L8 is grounded through a capacitor C14; the slave BLE terminal node circuit module comprises a CC2540 processor U, capacitors C, C, C, C, C, C, C, C, C, C, resistor R, R, R, R, inductance L, L, L, crystal oscillator Y, Y, a PCB antenna E, LED indicator lamps D, D, D and D, wherein the U, R, C, a 32.768k crystal oscillator system formed by the crystal oscillator Y and the capacitors C and C, and a 32M crystal oscillator system formed by the crystal oscillator Y, the capacitors C and C together form a minimum working system of the singlechip, namely a circuit system required by the normal working of the singlechip CC2540, a balun matching circuit formed by the capacitors C, C, C and the inductors L, L, L and L is used for modulating impedance matching of transmitting and receiving signals, and an antenna E is used for receiving and transmitting signals, and the resistors R, R, R, R, R, R and LED indicator lamps D, D, D, D and D form an indicator lamp system, the relay is used for displaying the working state of the relay; the networking method comprises the steps of judging a networking topological structure and system data acquisition by adopting RSSI (received signal strength indicator) strength, wherein the step of judging the networking topological structure by adopting the RSSI strength is specifically;
1) the upper computer sends a searching networking command to all the data relay concentrators one by one in a mode of calling a protocol stack and blind connection;
2) after receiving the searching networking command, the data relay concentrator starts to scan the slave machines and stores the read IEEE addresses and signal RSSI values of the slave machines;
3) the upper computer reads the IEEE addresses and the signal RSSI values thereof stored in the data relay concentrator one by one;
the upper computer compares the read IEEE address of the BLE node with a comparison table of the upper computer, and maps the read IEEE address with the ID number in the database of the upper computer to determine a unique relationship;
4) the upper computer judges whether the IEEE address of the same BLE node appears in the data returned by different relay concentrators, and if yes, the upper computer judges which data relay concentrator has a stronger RSSI value returned, so that the uniqueness is ensured;
5) the upper computer determines the subordination relation between the BLE nodes and the data concentrator, maps ID numbers of the BLE nodes and the data concentrator, and establishes a table to complete the ad hoc network;
the system data acquisition steps are specifically as follows:
1) the upper computer determines the acquired subordination relation between the BLE terminal nodes and the data relay concentrators and initiates busy connection to one of the data relay concentrators;
2) the upper computer issues an acquisition command to a data relay concentrator, wherein the command comprises the type of information acquisition, the number of nodes of an acquired BLE terminal and the IEEE address of the acquired BLE terminal;
3) the data relay concentrator returns confirmation information to the upper computer;
4) the upper computer is disconnected with the data relay centralized collector;
5) the upper computer repeats the processes (1) to (4) in the steps until the upper computer completes acquisition command issuing communication with the data relay concentrators to which all the communication nodes belong;
6) the data relay concentrator initiates blind connection to one BLE terminal node;
7) the data relay concentrator issues a data acquisition command to the BLE terminal node;
8) the BLE terminal node replies data, wherein the data comprises the ID number of the BLE node;
9) the data relay concentrator adds header and trailer encapsulation to the replied data, and adds the ID number of the self data concentrator collector in the data;
10) the data relay concentrator is disconnected with the BLE terminal node;
11) the data relay concentrator repeats the processes from (6) to (10) in the step until the information acquisition of all BLE terminal nodes is completed;
12) the upper computer initiates blind connection to the data relay concentrator again;
13) the upper computer issues a data return command to the data relay concentrator;
14) the data relay concentrator sends the acquired data to the upper computer one by one;
15) the data relay concentrator sends data transmission completion information to the upper computer;
16) the upper computer is disconnected with the data relay concentrator;
17) the upper computer repeats the processes (12) - (16) in the step until all data are acquired;
the networking method also comprises a busy judgment mechanism of the data relay concentrator, and the steps are as follows:
1) the upper computer is connected with the data relay concentrator and connected with a BLE slave part of the data relay concentrator;
2) after the connection is established, the BLE slave part of the data relay concentrator automatically communicates with the BLE host part of the data relay concentrator through an I2C bus to inquire the working state of the host;
3) if the BLE host part of the data relay concentrator is busy, returning to busy;
4) the BLE slave part of the data relay concentrator restores the working state of the host to the upper computer after receiving the working state of the host;
5) after receiving the working state of the data relay concentrator, the upper computer normally reads data if the data relay concentrator is in a normal state;
6) if the upper computer receives that the working state of the data relay concentrator is busy, the connection is immediately disconnected, and a remarking event is added;
7) after the upper computer finishes communication with other data relay concentrators, checking the remark event, and repeating the processes from (1) to (6) with the data relay concentrator which is not finished in communication in the remark event;
8) if the upper computer judges that a certain data relay concentrator is always in a busy state, an alarm is sent out so as to be beneficial to judging the normal use state of the relay concentrator in time;
the relay concentrator adopts a half-duplex working mode;
and the data packet information in the relay concentrator is encapsulated by the ID number and the header and the tail of the node.
CN201611198996.7A 2016-12-22 2016-12-22 BLE-based relay concentrator and low-power topology networking method Expired - Fee Related CN106792461B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611198996.7A CN106792461B (en) 2016-12-22 2016-12-22 BLE-based relay concentrator and low-power topology networking method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611198996.7A CN106792461B (en) 2016-12-22 2016-12-22 BLE-based relay concentrator and low-power topology networking method

Publications (2)

Publication Number Publication Date
CN106792461A CN106792461A (en) 2017-05-31
CN106792461B true CN106792461B (en) 2020-10-16

Family

ID=58897184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611198996.7A Expired - Fee Related CN106792461B (en) 2016-12-22 2016-12-22 BLE-based relay concentrator and low-power topology networking method

Country Status (1)

Country Link
CN (1) CN106792461B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350637A (en) * 2008-09-05 2009-01-21 清华大学 Networking method of dual-channel wireless sensor terminals based on Zigbee
CN102035667A (en) * 2009-09-27 2011-04-27 华为技术有限公司 Method, device and system for evaluating network reliability
CN105451290A (en) * 2014-08-20 2016-03-30 北京南瑞智芯微电子科技有限公司 Micropower wireless network self-organizing method and micropower wireless network
CN105511429A (en) * 2015-12-01 2016-04-20 上海斐讯数据通信技术有限公司 Household IOT (Internet of Things) control system, application method, and building method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6401459B2 (en) * 2014-02-14 2018-10-10 キヤノン株式会社 Image processing apparatus and image processing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350637A (en) * 2008-09-05 2009-01-21 清华大学 Networking method of dual-channel wireless sensor terminals based on Zigbee
CN102035667A (en) * 2009-09-27 2011-04-27 华为技术有限公司 Method, device and system for evaluating network reliability
CN105451290A (en) * 2014-08-20 2016-03-30 北京南瑞智芯微电子科技有限公司 Micropower wireless network self-organizing method and micropower wireless network
CN105511429A (en) * 2015-12-01 2016-04-20 上海斐讯数据通信技术有限公司 Household IOT (Internet of Things) control system, application method, and building method

Also Published As

Publication number Publication date
CN106792461A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN103596294A (en) Smart home wireless sensor network based on ZigBee
CN111833578B (en) Electricity consumption information collection system and NB-IoT communication module and communication method thereof
CN104615103A (en) Motor control system and method using ZigBee and CAN bus
CN208766825U (en) A kind of LoRa meeting southern network mark standard and carrier wave dual mode communication module
CN203219503U (en) Wireless sensor network system
CN1953378A (en) A communication device for wireless sensor network communication base station
CN108234562A (en) A kind of apparatus control method, control device and controlled plant
CN103167635A (en) ZigBee wireless sensor network system and method for monitoring greenhouse environment
CN103906172A (en) Method for networking low-power-dissipation small wireless sensor networks based on oil field application
CN203251459U (en) Lighting control device based on Internet of Things technology
CN106792461B (en) BLE-based relay concentrator and low-power topology networking method
CN112822174A (en) Intelligent data acquisition module, data acquisition box and data acquisition method
CN206236267U (en) Internet of things intelligent transportation gateway and its system
CN204666186U (en) Based on the storage environment monitoring system of wireless network
CN204989938U (en) Wireless many sensings monitored control system
CN209659346U (en) A/D capture card based on NB-iot technology
CN206440977U (en) 4G data acquisition transmission control unit (TCU)s with GPS location function
CN206948633U (en) A kind of wireless networking management equipment in taiwan area identification
CN206117627U (en) Take touch intelligence switch of wireless wiFi function
CN203445909U (en) Intercom terminal parameter configuration system
CN211183988U (en) Novel P L C wireless gateway device
CN107426829A (en) A kind of remote environment-monitoring system
CN204576242U (en) Based on MESH network, electrical network electric energy is implemented to the management system of remote monitoring
CN202488773U (en) Gateway circuit of wireless sensor network
CN209250628U (en) An Optimized Sensor Node Deployment Structure for Manufacturing Data Sensing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201016

Termination date: 20211222