CN113645603A - BLE Bluetooth gateway communication method, system and computer equipment - Google Patents
BLE Bluetooth gateway communication method, system and computer equipment Download PDFInfo
- Publication number
- CN113645603A CN113645603A CN202111073909.6A CN202111073909A CN113645603A CN 113645603 A CN113645603 A CN 113645603A CN 202111073909 A CN202111073909 A CN 202111073909A CN 113645603 A CN113645603 A CN 113645603A
- Authority
- CN
- China
- Prior art keywords
- terminal
- bluetooth gateway
- target terminal
- configuration information
- target
- 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.)
- Pending
Links
- 230000006854 communication Effects 0.000 title claims abstract description 90
- 238000004891 communication Methods 0.000 title claims abstract description 88
- 238000000034 method Methods 0.000 title claims abstract description 34
- 230000004044 response Effects 0.000 claims description 42
- 238000004590 computer program Methods 0.000 claims description 7
- 230000005540 biological transmission Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 4
- QVFWZNCVPCJQOP-UHFFFAOYSA-N chloralodol Chemical compound CC(O)(C)CC(C)OC(O)C(Cl)(Cl)Cl QVFWZNCVPCJQOP-UHFFFAOYSA-N 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 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
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W88/00—Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
- H04W88/16—Gateway arrangements
-
- 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)
Abstract
The invention provides a BLE Bluetooth gateway communication method, a system and computer equipment, wherein the communication method comprises the following steps: the method comprises the steps that a Bluetooth gateway is bound with a plurality of terminals in a binding mode to generate a binding table, wherein the binding table comprises an MAC address of each terminal, a working time slot of each terminal and working parameters of each terminal; the method comprises the steps that when a Bluetooth gateway enters an awakening mode at a preset moment, first configuration information sent by a cloud end is received; the Bluetooth gateway establishes communication connection with a corresponding target terminal according to the first configuration information, the MAC address of each terminal and the working time slot of each terminal, and receives reported data sent by the target terminal; the Bluetooth gateway sends the reported data of all target terminals to the cloud end and then enters a sleep mode, and waits for the next preset moment to enter a wake-up mode; the problem that the outdoor gateway in the prior art cannot realize long-distance and low-power-consumption communication at the same time is solved, low-power-consumption communication is realized, and transmission efficiency is improved.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a BLE Bluetooth gateway communication method, a BLE Bluetooth gateway communication system and a BLE Bluetooth gateway communication computer device.
Background
With the rapid development of the internet of things, various embedded terminal devices come out endlessly, low-power-consumption terminal devices generally adopt batteries for power supply, application scenes are limited to a certain extent, in order to achieve communication between the low-power-consumption terminal devices and the cloud, a common low-power-consumption terminal product needs to be matched with a gateway for use, and data reporting and state control uploading of the low-power-consumption terminal devices to the cloud are achieved through the gateway. In the open air, the condition of power supply and confession net depends on its arrangement environment, and when there is not limited network and wired mains operated in arranging the environment, ordinary non-low-power consumption gateway does not possess service environment, for realizing that low-power consumption terminal equipment realizes the low-power consumption communication with the high in the clouds in the open air, reduces the assembly condition of gateway, and the gateway need satisfy two conditions: firstly, long-distance communication can be realized; and secondly, the gateway can realize low power consumption. In the prior art, a LoRa gateway is usually used outdoors to implement communication between a low-power-consumption terminal and a cloud.
Although the LoRa gateway can realize long-distance communication, it still requires a wired power supply, cannot realize low power consumption, has a high assembly cost of a working environment, and has very low transmission efficiency.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a BLE Bluetooth gateway communication method, a BLE Bluetooth gateway communication system and a BLE Bluetooth gateway communication computer device, which solve the problem that an outdoor gateway in the prior art cannot realize long-distance and low-power-consumption communication at the same time.
In a first aspect, the present invention provides a BLE bluetooth gateway communication method, which is applied to a bluetooth gateway, and the communication method includes: the Bluetooth gateway is bound with a plurality of terminals in a binding mode to generate a binding table, wherein the binding table comprises the MAC address of each terminal, the working time slot of each terminal and the working parameters of each terminal; the method comprises the steps that when the Bluetooth gateway enters an awakening mode at a preset moment, first configuration information sent by a cloud end is received; the Bluetooth gateway establishes communication connection with a corresponding target terminal according to the first configuration information, the MAC address of each terminal and the working time slot of each terminal, and receives reported data sent by the target terminal; and the Bluetooth gateway sends the reported data of all the target terminals to the cloud end and then enters a sleep mode, and waits for the next preset moment to enter a wake mode.
Optionally, the binding the bluetooth gateway with the plurality of terminals in the binding mode to generate a binding table, including: when the Bluetooth gateway enters a binding mode, scanning a broadcast packet sent by a current terminal, and analyzing the content of the broadcast packet; the Bluetooth gateway judges whether the current terminal is an effective terminal or not according to the content of the broadcast packet; and if the current terminal is an effective terminal, the Bluetooth gateway generates a binding table by the MAC address of the current terminal, the working time slot of the current terminal and the working parameters of the current terminal.
Optionally, the establishing, by the bluetooth gateway, a communication connection with a corresponding target terminal according to the MAC address of each terminal and the working timeslot of each terminal includes: the Bluetooth gateway receives a connection broadcast packet sent by a target terminal in the working time slot of the target terminal, wherein the connection broadcast packet comprises an MAC address of the target terminal; the Bluetooth gateway judges whether the MAC address of the target terminal exists in the binding table or not; and when the MAC address of the target terminal exists in the binding table, establishing communication connection with the target terminal.
Optionally, the receiving, by the bluetooth gateway, the reported data sent by the target terminal according to the first configuration information includes: the Bluetooth gateway generates second configuration information of the target terminal according to the first configuration information, wherein the first configuration information comprises a working time period of the Bluetooth gateway, a working parameter of the terminal and RTC time of the terminal, and the second configuration information comprises a working time slot of the terminal, the working parameter of the terminal and RTC time of the terminal; the target terminal is awakened in the working time slot of the terminal; the Bluetooth gateway sends a data reporting request to the target terminal, so that the target terminal sends a first response data packet according to the data reporting request; the Bluetooth gateway responds to the first response data packet, and sends second configuration information to the target terminal, so that the target terminal works according to the second configuration information and sends a second response data packet to the Bluetooth gateway; the Bluetooth gateway responds to the second response data packet and sends a data reporting request to the target terminal, so that the target terminal sends reporting data according to the data reporting request; and the Bluetooth gateway receives the reported data sent by the target terminal.
Optionally, after sending the second configuration information to the target terminal, the bluetooth gateway further includes, before receiving the report data sent by the target terminal, a step of: the Bluetooth gateway receives a second response data packet sent by the target terminal, wherein the second response data packet is a response data packet sent by the target terminal in response to the second configuration information; the Bluetooth gateway judges whether to terminate the communication connection with the target terminal according to the second response data packet; and if the communication with the target terminal is terminated, disconnecting the communication with the target terminal.
Optionally, when the bluetooth gateway does not receive the first response data packet or the second response data packet, the bluetooth gateway retransmits the data reporting request to the target terminal, and if the retransmission exceeds a preset number of times, the bluetooth gateway disconnects communication with the target terminal.
Optionally, if the bluetooth gateway fails to send the reported data of all the target terminals to the cloud, the reported data of all the target terminals are stored in a storage medium, and retransmission is performed when communication with the cloud is performed at the next preset time.
In a second aspect, the present invention provides a communication system of a BLE bluetooth gateway, the system including: the Bluetooth gateway is also used for receiving first configuration information sent by a cloud terminal when entering an awakening mode at a preset moment; the Bluetooth gateway is further used for establishing communication connection with a corresponding target terminal according to the first configuration information, the MAC address of each terminal and the working time slot of each terminal, and receiving reported data sent by the target terminal; the Bluetooth gateway is further used for sending the reported data of all the target terminals to the cloud end and then entering a sleep mode, and waiting for the next preset moment to enter a wake-up mode. The bluetooth gateway includes: MCU, 4G module, battery, storage module and/or temperature and humidity sensor.
In a third aspect, the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: the Bluetooth gateway is bound with a plurality of terminals in a binding mode to generate a binding table, wherein the binding table comprises the MAC address of each terminal, the working time slot of each terminal and the working parameters of each terminal; the method comprises the steps that when the Bluetooth gateway enters an awakening mode at a preset moment, first configuration information sent by a cloud end is received; the Bluetooth gateway establishes communication connection with a corresponding target terminal according to the first configuration information, the MAC address of each terminal and the working time slot of each terminal, and receives reported data sent by the target terminal; and the Bluetooth gateway sends the reported data of all the target terminals to the cloud end and then enters a sleep mode, and waits for the next preset moment to enter a wake mode.
Compared with the prior art, the invention has the following beneficial effects:
the Bluetooth gateway is bound with a plurality of terminals in a binding mode to generate a binding table, wherein the binding table comprises the MAC address of each terminal, the working time slot of each terminal and the working parameters of each terminal; by setting the working time slot of each terminal, each terminal is awakened to work at different moments, communication between the Bluetooth gateway and a plurality of terminals is realized in a short time, and when the Bluetooth gateway enters an awakening mode at a preset moment, configuration information sent by a cloud end is received; establishing communication with a corresponding target terminal according to the configuration information, the MAC of each terminal and the working time slot of each terminal, and receiving reported data sent by the target terminal; sending the reported data of all target terminals to a cloud end and then entering a sleep mode; the Bluetooth gateway is awakened at the preset moment, the reported data of all the target terminals are sent to the cloud end and then enter the sleep mode, and the Bluetooth gateway is awakened at the next preset moment, so that low-power-consumption work of the Bluetooth gateway is realized, and the assembly cost of the working environment is greatly reduced. Compared with the prior art in which a Rola gateway is adopted, the Bluetooth gateway adopting the BLE technology not only realizes long-distance communication, but also realizes low-power-consumption communication, and has high transmission efficiency.
Drawings
Figure 1 is a schematic flow chart of a BLE bluetooth gateway communication method according to an embodiment of the present invention;
figure 2 is a flowchart of a binding process between a terminal and a BLE bluetooth gateway according to another embodiment of the present invention;
FIG. 3 is a timing diagram illustrating operation of a terminal according to another embodiment of the present invention;
fig. 4 is a detailed flowchart of communication between a terminal and a BLE bluetooth gateway according to another embodiment of the present invention;
figure 5 is a block diagram of a BLE bluetooth gateway according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the BLE bluetooth gateway is always in a sleep mode after leaving the factory, the bluetooth gateway is activated by a key, operates in a 2.4G frequency band, and can realize long-distance communication between the terminal and the gateway when the bluetooth gateway is set to operate in a LongRang mode; the Bluetooth gateway is connected through the mobile APP, RTC time (the RTC time is used for calibrating working time reference of the BLE Bluetooth gateway) and an address of the cloud server are configured for the Bluetooth gateway, and the Bluetooth gateway acquires working configuration of the Bluetooth gateway from the cloud server according to the address of the cloud server and works according to the working configuration; the binding mode of the BLE Bluetooth gateway is activated through a key.
Fig. 1 is a schematic flow chart of a BLE bluetooth gateway communication method according to an embodiment of the present invention, as shown in fig. 1, and is applied to a bluetooth gateway, where the communication method specifically includes the following steps:
step S101, the Bluetooth gateway binds with a plurality of terminals in a binding mode to generate a binding table, wherein the binding table comprises the MAC address of each terminal, the working time slot of each terminal and the working parameters of each terminal;
in this embodiment of the present invention, fig. 2 is a flowchart of a binding process between a terminal and a BLE bluetooth gateway according to an embodiment of the present invention, and as shown in fig. 2, the binding between the bluetooth gateway and a plurality of terminals in a binding mode, and the generating of the binding table specifically includes the following steps:
when the bluetooth gateway enters a binding mode, executing step S201, where the bluetooth gateway scans a broadcast packet sent by a current terminal;
step S202, analyzing the content of the broadcast packet;
step S203, judging whether the current terminal is an effective terminal according to the content of the broadcast packet;
and if the current terminal is an effective terminal, executing step S204, and the bluetooth gateway generating a binding table from the MAC address of the current terminal, the working time slot of the current terminal, and the working parameters of the current terminal.
It should be noted that the MAC address of each terminal, the working time slot of each terminal, and the working parameters of each terminal are obtained from the cloud through the gateway. And judging whether the current terminal is a valid terminal or not according to the content of the broadcast packet, namely judging whether the communication data format of the current terminal equipment is the communication data format supported by the current BLE Bluetooth gateway or whether the communication data format of the current BLE Bluetooth gateway is the communication data format supported by the current terminal equipment or not, and if the communication data format of the current BLE Bluetooth gateway is invalid, not binding the BLE to the current terminal by the current BLE Bluetooth gateway.
Step S102, when the Bluetooth gateway enters an awakening mode at a preset moment, receiving first configuration information sent by a cloud end;
step S103, the Bluetooth gateway establishes communication connection with a corresponding target terminal according to the first configuration information, the MAC address of each terminal and the working time slot of each terminal, and receives reported data sent by the target terminal;
in another embodiment of the present invention, the establishing, by the bluetooth gateway, a communication connection with a corresponding target terminal according to the MAC address of each terminal and the working timeslot of each terminal includes: the Bluetooth gateway receives a connection broadcast packet sent by a target terminal in the working time slot of the target terminal, wherein the connection broadcast packet comprises an MAC address of the target terminal; judging whether the MAC address of the target terminal exists in the binding table or not; and when the MAC address of the target terminal exists in the binding table, establishing communication connection with the target terminal.
In another embodiment of the present invention, the receiving, by the bluetooth gateway, the report data sent by the target terminal according to the first configuration information includes: the Bluetooth gateway generates second configuration information of the target terminal according to the first configuration information, wherein the first configuration information comprises a working time period of the Bluetooth gateway, working parameters of the terminal and RTC time of the terminal (the working time of the terminal is calibrated, and the phenomenon that the terminal and the Bluetooth gateway cannot be awakened at the same time in the same time period due to inaccurate long-time running of the terminal is avoided), and the second configuration information comprises a working time slot of the terminal, the working parameters of the terminal and the RTC time of the terminal; the Bluetooth gateway sends a data reporting request to the target terminal, so that the target terminal sends a first response data packet (including basic information of the terminal and the like) according to the data reporting request; the Bluetooth gateway responds to the first response data packet, and sends second configuration information to the target terminal, so that the target terminal works according to the second configuration information and sends a second response data packet to the Bluetooth gateway; the Bluetooth gateway responds to the second response data packet and sends a data reporting request to the target terminal, so that the target terminal sends reporting data according to the data reporting request; and the Bluetooth gateway receives the reported data sent by the target terminal.
It should be noted that the working time slot of the terminal is the time when the terminal is awakened, the terminal performs communication at the time of awakening, after the terminal is bound in the bluetooth gateway, the terminal allocates the time to be awakened to all terminals according to the working time required by each terminal, in this embodiment, an end-to-end staggered type awakening terminal is adopted, as shown in fig. 3, fig. 3 is a working timing diagram of the terminal in this embodiment, each terminal is awakened in a time period immediately before communication, for example, the 3 rd terminal is awakened immediately before the 2 nd terminal finishes working, and by the end-to-end staggered type awakening, the bluetooth gateway can utilize the scanning time to the maximum extent, reduce the time for the bluetooth gateway to open the scanning terminal to broadcast, and implement low-power communication.
In another embodiment of the present invention, when the bluetooth gateway does not receive the first response packet or the second response packet, the bluetooth gateway retransmits a data reporting request to the target terminal, and if the retransmission exceeds a preset number of times, the bluetooth gateway disconnects communication with the target terminal.
In another embodiment of the present invention, after sending the second configuration information to the target terminal, before receiving the reporting data sent by the target terminal, the method further includes: receiving a second response data packet sent by the target terminal, wherein the second response data packet is a response data packet sent by the target terminal in response to the second configuration information; judging whether to terminate the communication connection with the target terminal according to the second response data packet; and if the communication with the target terminal is terminated, disconnecting the communication with the target terminal.
In another embodiment of the present invention, when the bluetooth gateway does not receive the first response packet or the second response packet, the bluetooth gateway retransmits the data reporting request to the target terminal, and if the retransmission exceeds a preset number of times, the bluetooth gateway disconnects communication with the target terminal. The terminal equipment does not receive the reported data request of the Bluetooth gateway within the overtime time, the target terminal disconnects the communication with the Bluetooth gateway, stores the data needing to be reported into the storage medium, and retransmits the data when the data are communicated next time, so that the invalid communication time of the Bluetooth gateway and the terminal can be reduced, and the power consumption of the Bluetooth gateway and the terminal can be reduced. In the communication process, after receiving the terminal equipment response information sent by the terminal equipment, if the terminal equipment response information is not legal, the Bluetooth gateway terminates the communication and disconnects the connection; if the connection between the Bluetooth gateway and the terminal is disconnected in the communication process, the Bluetooth gateway restarts to scan the terminal and reestablish the connection.
And step S104, the reported data of the terminal is sent to the cloud end and then enters a sleep mode, and the terminal waits for the next preset moment to enter a wake-up mode.
Specifically, fig. 4 is a specific flowchart of communication between the terminal and the BLE bluetooth gateway, and as shown in fig. 4, the bluetooth gateway sends a terminal configuration request to the terminal device; the terminal equipment responds to the terminal configuration request and sends a first response data packet to the Bluetooth gateway; the Bluetooth gateway responds to the first response data packet, sends second configuration information to the terminal equipment, and the terminal works according to the received second configuration information and sends a second response data packet to the Bluetooth gateway; the Bluetooth gateway judges whether the second response data packet continues communication or not, if the second response data packet continues communication, a data reporting request is sent to the terminal, the terminal responds to the data reporting request and sends reporting data to the Bluetooth gateway, after the Bluetooth gateway receives the reporting data, the data is stored in a storage medium, Bluetooth is actively disconnected, the terminal enters a sleep mode after Bluetooth is disconnected, and the second configuration information comprises the working time slot of the terminal, namely the terminal is awakened at the next preset moment.
In another embodiment of the present invention, if the bluetooth gateway fails to send the reported data of all the target terminals to the cloud, the reported data of all the target terminals are stored in a storage medium, and are retransmitted when communicating with the cloud at the next preset time, so that the bluetooth gateway does not need to be re-uploaded at this time, thereby reducing the power consumption of the bluetooth gateway.
In another embodiment of the present invention, a communication system of a BLE bluetooth gateway includes: the system comprises a Bluetooth gateway, a plurality of terminals and a cloud end; the Bluetooth gateway is used for binding with a plurality of terminals in a binding mode to generate a binding table, wherein the binding table comprises the MAC address of each terminal, the working time slot of each terminal and the working parameters of each terminal; the Bluetooth gateway is also used for receiving first configuration information sent by a cloud terminal when entering an awakening mode at a preset moment; the Bluetooth gateway is further used for establishing communication connection with a corresponding target terminal according to the first configuration information, the MAC address of each terminal and the working time slot of each terminal, and receiving reported data sent by the target terminal; the Bluetooth gateway is further used for sending the reported data of all the target terminals to the cloud end and then entering a sleep mode, and waiting for the next preset moment to enter a wake-up mode.
In another embodiment of the present invention, fig. 5 is a block diagram of a BLE bluetooth gateway according to another embodiment of the present invention, as shown in fig. 5, the bluetooth gateway further includes: the device comprises an MCU, a 4G module, a battery, a storage medium and/or a temperature and humidity sensor; the LED lamp also comprises a key and an LED lamp. The low-power consumption work of the Bluetooth gateway is realized by adopting a battery for power supply; the Bluetooth gateway is communicated with a cloud end through a 4G module, the configuration of terminal equipment is obtained from the cloud end, and the reported data of the terminal is uploaded to the cloud end; an interactive control interface with a user is realized through an LED lamp and a key; the temperature and humidity sensor is used for detecting the internal state of the gateway structure, and can report to the cloud when water enters the gateway or the temperature is abnormal, so that the gateway can be maintained conveniently; the Bluetooth gateway also provides a Bluetooth interface for the access of a mobile phone APP, and can be used for debugging and checking the state information of the Bluetooth gateway and the terminal equipment and the like.
It should be noted that, when the configuration of the working period of the modified terminal is issued, if the bluetooth gateway occurs and the communication failure of the terminal device occurs, the terminal device will not work with the new working period configuration, so the gateway needs to maintain the working period configuration information of the terminal device in the binding table, the bluetooth gateway needs to wake up before the terminal device wakes up next time, and establish connection with the terminal device to ensure that the new working period configuration can be issued to the device that failed in communication before, so that the problem that the next wake-up time is never in the working period of the gateway due to one communication failure of the terminal device and is lost with the gateway can be effectively prevented. For a lost terminal device, the gateway will remove it from the binding table after a period of time.
In another embodiment of the present invention, the bluetooth gateway and the terminal device may take 11s from the beginning of scanning to the end of communication when the distance between the bluetooth gateway and the terminal device is 300m, and considering that some devices may need to be retransmitted, and each device takes 15s on average, and the bluetooth gateway may communicate with 240 devices in an operating period of one hour, that is, the gateway may bind 240 terminal devices at most. The Bluetooth gateway working in the LongRange mode has the advantages that the transmitting power is 8dBm, 200 devices are bound, the Bluetooth gateway works for two periods every day, each period works for 1 hour, two batteries of 19Ah are used, and the Bluetooth gateway can work for at least 1 year in a standby mode. Aiming at the control of the environment monitoring terminal equipment and the low-power-consumption embedded terminal equipment, the low-power-consumption long-distance Bluetooth gateway can completely work. When the Bluetooth gateway reports data at every time, temperature and humidity data acquisition and ADC voltage acquisition can be carried out, the temperature and humidity data and electric quantity information collected by the Bluetooth gateway are reported to the cloud, and the Bluetooth gateway can be maintained in time through the information.
In another embodiment of the present invention, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: the Bluetooth gateway is bound with a plurality of terminals in a binding mode to generate a binding table, wherein the binding table comprises the MAC address of each terminal, the working time slot of each terminal and the working parameters of each terminal; the method comprises the steps that when the Bluetooth gateway enters an awakening mode at a preset moment, first configuration information sent by a cloud end is received; the Bluetooth gateway establishes communication connection with a corresponding target terminal according to the first configuration information, the MAC address of each terminal and the working time slot of each terminal, and receives reported data sent by the target terminal; and the Bluetooth gateway sends the reported data of all the target terminals to the cloud end and then enters a sleep mode, and waits for the next preset moment to enter a wake mode.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Finally, the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all of them should be covered in the claims of the present invention.
Claims (10)
1. A BLE Bluetooth gateway communication method is applied to a Bluetooth gateway, and comprises the following steps:
the Bluetooth gateway is bound with a plurality of terminals in a binding mode to generate a binding table, wherein the binding table comprises the MAC address of each terminal, the working time slot of each terminal and the working parameters of each terminal;
the method comprises the steps that when the Bluetooth gateway enters an awakening mode at a preset moment, first configuration information sent by a cloud end is received;
the Bluetooth gateway establishes communication connection with a corresponding target terminal according to the first configuration information, the MAC address of each terminal and the working time slot of each terminal, and receives reported data sent by the target terminal;
and the Bluetooth gateway sends the reported data of all the target terminals to the cloud end and then enters a sleep mode, and waits for the next preset moment to enter a wake mode.
2. The BLE bluetooth gateway communication method of claim 1, wherein the bluetooth gateway binds with a plurality of terminals in a binding mode, and generates a binding table, comprising:
when the Bluetooth gateway enters a binding mode, scanning a broadcast packet sent by a current terminal, and analyzing the content of the broadcast packet;
the Bluetooth gateway judges whether the current terminal is an effective terminal or not according to the content of the broadcast packet;
and if the current terminal is an effective terminal, the Bluetooth gateway generates a binding table by the MAC address of the current terminal, the working time slot of the current terminal and the working parameters of the current terminal.
3. The BLE Bluetooth gateway communication method according to claim 1, wherein the Bluetooth gateway establishes a communication connection with a corresponding target terminal according to the MAC address of each terminal and the working time slot of each terminal, and the method comprises the following steps:
the Bluetooth gateway receives a connection broadcast packet sent by a target terminal in the working time slot of the target terminal, wherein the connection broadcast packet comprises an MAC address of the target terminal;
the Bluetooth gateway judges whether the MAC address of the target terminal exists in the binding table or not;
and when the MAC address of the target terminal exists in the binding table, establishing communication connection with the target terminal.
4. The BLE bluetooth gateway communication method according to claim 1, wherein the receiving, by the bluetooth gateway according to the first configuration information, the reported data sent by the target terminal includes:
the Bluetooth gateway generates second configuration information of the target terminal according to the first configuration information, wherein the first configuration information comprises a working time period of the Bluetooth gateway, a working parameter of the terminal and RTC time of the terminal, and the second configuration information comprises a working time slot of the terminal, the working parameter of the terminal and RTC time of the terminal; the target terminal is awakened in the working time slot of the terminal;
the Bluetooth gateway sends a data reporting request to the target terminal, so that the target terminal sends a first response data packet according to the data reporting request;
the Bluetooth gateway responds to the first response data packet, and sends second configuration information to the target terminal, so that the target terminal works according to the second configuration information and sends a second response data packet to the Bluetooth gateway;
the Bluetooth gateway responds to the second response data packet and sends a data reporting request to the target terminal, so that the target terminal sends reporting data according to the data reporting request;
and the Bluetooth gateway receives the reported data sent by the target terminal.
5. The BLE Bluetooth gateway communication method of claim 4, wherein after the Bluetooth gateway sends the second configuration information to the target terminal, before receiving the reporting data sent by the target terminal, the method further comprises:
the Bluetooth gateway receives a second response data packet sent by the target terminal, wherein the second response data packet is a response data packet sent by the target terminal in response to the second configuration information;
the Bluetooth gateway judges whether to terminate the communication connection with the target terminal according to the second response data packet;
and if the communication with the target terminal is terminated, disconnecting the communication with the target terminal.
6. The BLE bluetooth gateway communication method according to claim 4 or 5, wherein when the bluetooth gateway does not receive the first response packet or the second response packet, the bluetooth gateway retransmits the data reporting request to the target terminal, and if the retransmission exceeds a preset number of times, the bluetooth gateway disconnects communication with the target terminal.
7. The BLE bluetooth gateway communication method according to claim 1, wherein if the bluetooth gateway fails to send the reported data of all the target terminals to the cloud, the reported data of all the target terminals are stored in a storage medium, and are retransmitted when communicating with the cloud at a next preset time.
8. A communication system of a BLE bluetooth gateway, the system comprising:
the system comprises a Bluetooth gateway, a plurality of terminals and a cloud end;
the Bluetooth gateway is used for binding with a plurality of terminals in a binding mode to generate a binding table, wherein the binding table comprises the MAC address of each terminal, the working time slot of each terminal and the working parameters of each terminal;
the Bluetooth gateway is also used for receiving first configuration information sent by a cloud terminal when entering an awakening mode at a preset moment;
the Bluetooth gateway is further used for establishing communication connection with a corresponding target terminal according to the first configuration information, the MAC address of each terminal and the working time slot of each terminal, and receiving reported data sent by the target terminal;
the Bluetooth gateway is further used for sending the reported data of all the target terminals to the cloud end and then entering a sleep mode, and waiting for the next preset moment to enter a wake-up mode.
9. The communication system of claim 8, wherein the Bluetooth gateway comprises: MCU, 4G module, battery, storage module and/or temperature and humidity sensor.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented by the processor when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111073909.6A CN113645603A (en) | 2021-09-14 | 2021-09-14 | BLE Bluetooth gateway communication method, system and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111073909.6A CN113645603A (en) | 2021-09-14 | 2021-09-14 | BLE Bluetooth gateway communication method, system and computer equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113645603A true CN113645603A (en) | 2021-11-12 |
Family
ID=78425737
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111073909.6A Pending CN113645603A (en) | 2021-09-14 | 2021-09-14 | BLE Bluetooth gateway communication method, system and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113645603A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114498951A (en) * | 2021-12-13 | 2022-05-13 | 浙江零跑科技股份有限公司 | Method for displaying wireless charging state electric quantity of mobile phone in intelligent cabin |
CN114697359A (en) * | 2022-03-04 | 2022-07-01 | 青岛海尔科技有限公司 | Data collection method and device, storage medium and electronic device |
CN115038051A (en) * | 2022-08-12 | 2022-09-09 | 北京智芯微电子科技有限公司 | Information reporting method, receiving method, device, equipment and medium based on Bluetooth |
CN116017412A (en) * | 2022-12-27 | 2023-04-25 | 苏州融硅新能源科技有限公司 | Gateway equipment, method and system for acquiring equipment information |
CN117693001A (en) * | 2023-11-27 | 2024-03-12 | 青岛登云智谷科技有限公司 | Low-power distribution network and operation monitoring system and method based on BLE protocol |
CN118102245A (en) * | 2023-12-15 | 2024-05-28 | 北京暖流科技有限公司 | Underground pipe network data acquisition system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180206187A1 (en) * | 2015-07-10 | 2018-07-19 | Nokia Technologies Oy | Method and apparatus for saving power in a gateway network |
CN111273951A (en) * | 2020-01-19 | 2020-06-12 | 努比亚技术有限公司 | Electronic price tag management method, electronic terminal and computer readable storage medium |
CN112601209A (en) * | 2020-12-22 | 2021-04-02 | 苏州光格科技股份有限公司 | Intermittent near-field communication method and device of power detection equipment |
CN113163345A (en) * | 2021-03-23 | 2021-07-23 | 深圳云里物里科技股份有限公司 | Broadcast communication method, system, gateway equipment and electronic price tag |
-
2021
- 2021-09-14 CN CN202111073909.6A patent/CN113645603A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180206187A1 (en) * | 2015-07-10 | 2018-07-19 | Nokia Technologies Oy | Method and apparatus for saving power in a gateway network |
CN111273951A (en) * | 2020-01-19 | 2020-06-12 | 努比亚技术有限公司 | Electronic price tag management method, electronic terminal and computer readable storage medium |
CN112601209A (en) * | 2020-12-22 | 2021-04-02 | 苏州光格科技股份有限公司 | Intermittent near-field communication method and device of power detection equipment |
CN113163345A (en) * | 2021-03-23 | 2021-07-23 | 深圳云里物里科技股份有限公司 | Broadcast communication method, system, gateway equipment and electronic price tag |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114498951A (en) * | 2021-12-13 | 2022-05-13 | 浙江零跑科技股份有限公司 | Method for displaying wireless charging state electric quantity of mobile phone in intelligent cabin |
CN114697359A (en) * | 2022-03-04 | 2022-07-01 | 青岛海尔科技有限公司 | Data collection method and device, storage medium and electronic device |
CN114697359B (en) * | 2022-03-04 | 2024-03-22 | 青岛海尔科技有限公司 | Data collection method and device, storage medium and electronic device |
CN115038051A (en) * | 2022-08-12 | 2022-09-09 | 北京智芯微电子科技有限公司 | Information reporting method, receiving method, device, equipment and medium based on Bluetooth |
CN116017412A (en) * | 2022-12-27 | 2023-04-25 | 苏州融硅新能源科技有限公司 | Gateway equipment, method and system for acquiring equipment information |
CN116017412B (en) * | 2022-12-27 | 2024-04-16 | 苏州融硅新能源科技有限公司 | Gateway equipment, method and system for acquiring equipment information |
CN117693001A (en) * | 2023-11-27 | 2024-03-12 | 青岛登云智谷科技有限公司 | Low-power distribution network and operation monitoring system and method based on BLE protocol |
CN117693001B (en) * | 2023-11-27 | 2024-05-17 | 青岛登云智谷科技有限公司 | Low-power distribution network and operation monitoring system and method based on BLE protocol |
CN118102245A (en) * | 2023-12-15 | 2024-05-28 | 北京暖流科技有限公司 | Underground pipe network data acquisition system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113645603A (en) | BLE Bluetooth gateway communication method, system and computer equipment | |
CN111836277B (en) | Lora communication method, lora node and Lora communication system | |
US9442555B2 (en) | Method of control of an access point of a home gateway of a home network | |
EP2728948B1 (en) | Method, device and storage medium for adjusting wake-up period of terminal | |
EP3182766B1 (en) | Hybrid monitoring-sleeping method of wireless sensor and wireless sensor | |
US11785542B2 (en) | Downlink scheduling data monitoring method, downlink scheduling data sending method, and apparatus | |
US20210143896A1 (en) | Method and apparatus of communication between terminal and base station, and network access method and apparatus of a terminal | |
CN104968037A (en) | Low-power-consumption Internet of Things realizing method based on proxy equipment | |
US9826501B2 (en) | Paging method, apparatus, and system | |
US20130163495A1 (en) | Scheduling method for machine-to-machine communication | |
CN110537390B (en) | Data transmission method, device and storage medium based on unlicensed uplink scheduling | |
CN103843418A (en) | Method of service agent, modem and terminal | |
CN110149369B (en) | Rotary reporting method and remote control system of terminal equipment based on Internet of things | |
CN106332159A (en) | WIFI abnormity automatic reconnection device, system and method | |
CN112738755B (en) | Method for interaction between wireless communication module and sensor in electric power Internet of things field | |
US20220353813A1 (en) | Scheduling method, access point, and station | |
CN108712773B (en) | Parameter setting method, device and base station | |
CN103313303A (en) | Wireless access point, wireless work station and work method of wireless access point and wireless work station | |
CN113098988B (en) | Data transmission method and data transmission system | |
US20240196332A1 (en) | Wireless communication method and related apparatus | |
CN113207160B (en) | Terminal awakening method and device, computer equipment and storage medium | |
AU2007202879A1 (en) | Communication method in a home-automation installation | |
CN110475321B (en) | Power-saving optimization method and device for wireless local area network (AP) | |
CN204836236U (en) | Low -power consumption thing networking framework based on act on behalf of equipment | |
CN104243110A (en) | Wireless sensor network data transmission method based on non-real-time response mechanism |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20211112 |