CN106792461B - BLE-based relay concentrator and low-power topology networking method - Google Patents
BLE-based relay concentrator and low-power topology networking method Download PDFInfo
- 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
Links
- 230000006855 networking Effects 0.000 title claims abstract description 21
- 238000000034 method Methods 0.000 title claims description 36
- 230000005540 biological transmission Effects 0.000 claims abstract description 20
- 239000003990 capacitor Substances 0.000 claims description 71
- 239000013078 crystal Substances 0.000 claims description 33
- 230000008569 process Effects 0.000 claims description 20
- 238000004891 communication Methods 0.000 claims description 15
- 230000007246 mechanism Effects 0.000 claims description 4
- 238000012790 confirmation Methods 0.000 claims description 3
- 238000005538 encapsulation Methods 0.000 claims description 3
- 230000009286 beneficial effect Effects 0.000 claims 1
- 230000000694 effects Effects 0.000 abstract 1
- 230000002349 favourable effect Effects 0.000 abstract 1
- 238000013480 data collection Methods 0.000 description 8
- 230000015572 biosynthetic process Effects 0.000 description 2
- 229910052715 tantalum Inorganic materials 0.000 description 2
- GUVRBAGPIYLISA-UHFFFAOYSA-N tantalum atom Chemical compound [Ta] GUVRBAGPIYLISA-UHFFFAOYSA-N 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/18—Self-organising networks, e.g. ad-hoc networks or sensor networks
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing 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
Description
技术领域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
所述从机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)
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)
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)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6401459B2 (en) * | 2014-02-14 | 2018-10-10 | キヤノン株式会社 | Image processing apparatus and image processing method |
-
2016
- 2016-12-22 CN CN201611198996.7A patent/CN106792461B/en not_active Expired - Fee Related
Patent Citations (4)
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 |