Search

CN-121985236-A - Wireless gauge system based on BLE

CN121985236ACN 121985236 ACN121985236 ACN 121985236ACN-121985236-A

Abstract

The invention discloses a BLE-based wireless meter checking system, which comprises a core electric energy meter, at least two host electric energy meters and at least three slave electric energy meters. And a BLE communication module with double-role capability is integrated in the core electric energy meter, and can be used as a master device to connect a plurality of slave electric energy meters at the same time, and used as a slave device to establish connection with a plurality of master electric energy meters, so that a're-master three-slave' multilink parallel communication structure is formed. The host computer electric energy meter scans to find out the core electric energy meter and establishes uplink connection, sends a meter checking instruction to the core electric energy meter, analyzes the instruction, and transmits the instruction to the corresponding slave computer electric energy meter according to the target address, and the slave computer electric energy meter acquires electric energy data and transmits the electric energy data back to the host computer electric energy meter through the core electric energy meter. The system adopts GAP/GATT event mechanism to realize the processing of broadcasting, scanning, connection and service communication, and completes instruction analysis and data forwarding through serial port interrupt. The system can realize wireless collaborative meter checking and data centralized management among multiple electric energy meters.

Inventors

  • CHEN ZHIJUN
  • LI ZIJIAN
  • MA DINGXIN
  • HAN XINJIE

Assignees

  • 古桥信息科技(郑州)有限公司

Dates

Publication Date
20260505
Application Date
20260202

Claims (10)

  1. 1. A BLE-based wireless meter checking system, comprising: the system comprises a core electric energy meter, at least two host electric energy meters and at least three slave electric energy meters, wherein the host electric energy meters and the slave electric energy meters are in wireless communication with the core electric energy meter; the core electric energy meter is internally integrated with a low-power consumption Bluetooth BLE communication module, and the host electric energy meter and the slave electric energy meter are both integrated with a BLE module compatible with the BLE communication module; the core electric energy meter is configured to be used as a slave device of the host electric energy meter and a master device of the slave electric energy meter at the same time, can establish uplink connection with two host electric energy meters and downlink connection with three slave electric energy meters at the same time, so that a 'multi-to-multi communication topological structure of a new host and a new slave' is formed, and wireless meter checking data forwarding and sharing among the host electric energy meters and between the host electric energy meters and the slave electric energy meters are realized.
  2. 2. The system of claim 1, wherein the core electric energy meter comprises an electric energy metering unit, a master processing unit, and a BLE communication module electrically connected to the master processing unit; and the master control processing unit and the BLE communication module transmit and receive data through a serial port UART1, and interaction of the meter checking data and the configuration instruction is completed by taking a serial port data frame as a basic unit.
  3. 3. The system of claim 1, wherein the host electric energy meter is configured as a master device with active scanning and connection capability, and a BLE module thereof works in a master device role to periodically initiate scanning, find nearby core electric energy meters, initiate connection requests thereto, issue meter checking instructions, and receive power consumption data returned by the core electric energy meters; The slave electric energy meter is configured to be a slave device with connected and response capability, and a BLE module of the slave device works in a slave device role and is used for receiving a connection request initiated by the core electric energy meter, receiving a meter checking task and returning locally collected electric energy data.
  4. 4. The system according to claim 1, wherein a transparent communication mechanism module is arranged in the core electric energy meter and is used for transparent forwarding of data between the master electric energy meter and the slave electric energy meter; The transparent communication mechanism module is configured to forward the data frame to the corresponding other BLE connection under the condition of not changing the data content according to the target equipment address or the connection index contained in the data frame when receiving the serial data frame uploaded by any established BLE connection, so that real-time cascade communication between the host electric energy meter and the slave electric energy meter is realized.
  5. 5. The system of claim 1, wherein the BLE communication module has a BLE protocol stack event handling module built-in, the event handling module comprising: the GAP event processing unit is used for processing access control related events; The GATT event processing unit is used for processing attribute protocols and service communication related events; And a plurality of event callback functions respectively connected with the GAP event processing unit and the GATT event processing unit, and the event callback functions are used for triggering a pre-registered processing flow when the corresponding event occurs.
  6. 6. The system of claim 5, wherein the GAP event processing unit is configured to divide the received GAP event into at least one of a broadcast event, a scan event, a connect event, and an encrypt and pair event; For broadcast events, calling a broadcast event callback function to set or update broadcast parameters and broadcast data; for a scanning event, calling a scanning event callback function to process an external device scanning result and select a device to be connected; for a connection event, calling a connection event callback function to complete connection establishment, connection parameter updating and connection disconnection processing; And for the encryption and pairing event, calling an encryption and pairing event callback function to complete key negotiation, pairing information storage and security level setting.
  7. 7. The system of claim 5, wherein the GATT event processing unit is configured to invoke a service communication event callback function to complete reading and writing of a data characteristic value of the electric energy meter, reporting of an operation state of the electric energy meter and remote parameter configuration when service discovery, characteristic reading, characteristic writing or notification and indication service communication events are detected.
  8. 8. The system of claim 1, further comprising an interrupt handling module for handling serial communications between the power meter and the BLE module, the interrupt handling module configured to: when the UART1 interrupt is detected, reading data in a serial port receiving buffer area, performing frame synchronization and verification, and analyzing command words in the data frame if the received data frame is judged to be complete; If the command word is a transparent data instruction, searching a corresponding connection index and a corresponding connection role according to address information in a data frame, forwarding data to the corresponding host electric energy meter when the identification target is the host electric energy meter, and forwarding data to the corresponding slave electric energy meter when the identification target is the slave electric energy meter.
  9. 9. The system of claim 8, wherein the interrupt processing module, upon determining that the command word is a configuration control class instruction, performs a corresponding operation according to a pre-stored Realtek instruction set, the operation comprising at least one of: Setting or reading device pairing parameters, setting or reading device addresses, setting or reading device Bluetooth working parameters, setting or reading host Bluetooth connection information, actively disconnecting a host, switching into a slave connection mode, setting or reading a link datagram reception mode, setting or reading uploading message format information, setting device firmware version information, setting device custom flags, turning on or off a broadcasting function, turning on or off a scanning function, setting target device address parameters of broadcasting filtration, setting device type parameters of broadcasting filtration, setting broadcasting flag bits, setting or reading broadcasting data, setting a broadcasting reception data processing mode, setting or reading extended reporting parameters, reading real-time link quality or channel information, reading or setting device serial numbers, bluetooth authorization turning on or off, and setting or reading main link wireless channel timeout time.
  10. 10. A BLE-based wireless meter checking method, applied to the system of any one of claims 1-9, comprising: Starting scanning at the side of the host electric energy meter, finding out the core electric energy meter, and establishing BLE uplink connection with the core electric energy meter according to a scanning result; the core electric energy meter establishes BLE downlink connection with at least three slave electric energy meters according to the connection logic of're-master three slave'; The host electric energy meter transmits a meter checking instruction to the core electric energy meter through uplink connection, and the core electric energy meter transmits the meter checking instruction to the corresponding slave electric energy meter; The slave electric energy meters collect local electric energy metering data according to the received meter checking instructions and transmit the data back to the core electric energy meter, and the core electric energy meter gathers data from a plurality of slave electric energy meters and transmits the data back to at least one host electric energy meter through uplink connection after necessary format conversion, so that multi-meter combined wireless meter checking operation is completed.

Description

Wireless gauge system based on BLE Technical Field The invention relates to the technical field of electric energy metering and Internet of things communication, in particular to a BLE-based wireless meter checking system. Background Along with the development of intelligent power systems, the number of acquisition terminals of the electric energy meter is continuously increased, and the field installation environment is also gradually complicated. The traditional electric energy meters mostly adopt an RS485 or wired bus mode for data interaction, and the mode has obvious limitation in practical use although the structure is simple. On one hand, the serial communication link formed by the physical lines is depended on, when the line distance is longer or the number of nodes is larger, the signal attenuation is obvious, the anti-interference capability is reduced, the problems of interruption, error code, packet loss and the like in the communication process are easily caused, on the other hand, the reliability of the traditional serial topology is greatly influenced by the quality of the nodes, and the whole communication link is possibly paralyzed due to the occurrence of faults of any node, so that the expansibility, maintainability and fault tolerance of the system are greatly reduced. In addition, on-site wiring often needs to pass through a wall body, a bridge or a narrow space, the whole construction workload is large, the maintenance cost is high, and the actual deployment flexibility is poor. To ameliorate the above problems, some systems have begun to attempt to utilize wireless communication techniques instead of wireline. However, in a low-power wireless scenario, most of the conventional wireless schemes have limited communication distance, and most schemes adopt a point-to-point or point-to-multipoint structure, once the network topology structure is complex or the number of terminals is large, phenomena such as unstable connection, node conflict, data congestion and the like easily occur, so that the requirements of multi-electric energy meter, long-distance and multi-node parallel communication are difficult to meet. In an electric energy meter centralized meter reading system, particularly in a scene that data acquisition, task issuing and state monitoring are required to be carried out on a plurality of electric energy meters at the same time, the existing wireless scheme is difficult to simultaneously meet the requirements of high reliability, high concurrency communication, low power consumption operation and the like. Meanwhile, the rapid development of the Internet of things technology and the Bluetooth Low Energy (BLE) technology provides a new idea for wireless communication of the electric energy meter. The BLE has the advantages of low power consumption, low delay, high equipment discovery speed, rapid connection establishment, low hardware cost and the like, and the broadcasting mechanism, the connection mechanism and the GATT data interaction model are all suitable for short-distance high-frequency communication scenes. However, most of the existing BLE applications are based on a one-to-one or one-master-multi-slave simple communication structure, and in a multi-table collaborative reading scene, the service requirements of simultaneously connecting a plurality of hosts and a plurality of slaves cannot be met, and synchronous acquisition and multi-table cascade communication of multi-source data are difficult to realize. Based on the drawbacks of these approaches, there is an urgent need for a BLE-based wireless meter system to address these issues. Disclosure of Invention The invention aims to solve the technical problems in the background art, and provides a wireless meter checking system based on BLE, which comprises: the system comprises a core electric energy meter, at least two host electric energy meters and at least three slave electric energy meters, wherein the host electric energy meters and the slave electric energy meters are in wireless communication with the core electric energy meter; the core electric energy meter is internally integrated with a low-power consumption Bluetooth BLE communication module, and the host electric energy meter and the slave electric energy meter are both integrated with a BLE module compatible with the BLE communication module; the core electric energy meter is configured to be used as a slave device of the host electric energy meter and a master device of the slave electric energy meter at the same time, can establish uplink connection with two host electric energy meters and downlink connection with three slave electric energy meters at the same time, so that a 'multi-to-multi communication topological structure of a new host and a new slave' is formed, and wireless meter checking data forwarding and sharing among the host electric energy meters and between the host electric energy meters and the slave electric energy meters are reali