Disclosure of Invention
In order to solve the defects of the prior art, the invention provides a data transmission system and a data transmission method based on dual-mode Bluetooth in an underground tunnel. The underground comprehensive pipe gallery inspection system has the advantages of low operation power consumption, high response speed, high transmission rate, safety and reliability, and can solve the problem that the engineering personnel cannot communicate with the outside during inspection operation in the underground comprehensive pipe gallery.
In order to achieve the purpose, the invention adopts the following technical scheme:
a data transmission system based on dual-mode Bluetooth in an underground tunnel comprises a mobile terminal and a plurality of Bluetooth devices in the underground tunnel, wherein each Bluetooth device is connected with a target client through a server;
the plurality of Bluetooth devices are arranged in the underground tunnel at intervals of a certain distance, and the distance meets the distance requirement of the mobile terminal adopting Bluetooth transmission;
the mobile terminal is used for searching the Bluetooth equipment in the Bluetooth Low Energy mode by adopting an automatic intermittent scanning mode, establishing a communication link with the Bluetooth equipment in the Bluetooth Low Energy mode, and sending an instruction for switching to a Serial Port Profile mode to the Bluetooth equipment establishing the communication link; the mobile terminal is also used for establishing a communication link with the Bluetooth equipment in the Serial Port Profile mode, transmitting the acquired data to be transmitted to the server through the Bluetooth equipment in the Serial Port Profile mode, and transmitting the data to the target client through the server.
The invention adopts the low-power-consumption Bluetooth and the standard Bluetooth to share the MAC address and the intelligent switching technology, has the advantages of low operation power consumption, high response speed, high transmission rate, safety and reliability, and solves the problem that the engineering personnel can not communicate with the outside during the routing inspection operation in the underground comprehensive pipe gallery.
A data transmission method based on dual-mode Bluetooth in an underground tunnel comprises the following steps:
a plurality of Bluetooth devices installed in the underground tunnel at intervals broadcast in an intermittent mode in a Bluetooth Low Energy mode;
the method comprises the following steps that a mobile terminal in an underground tunnel searches Bluetooth equipment in a Bluetooth Low energy mode in an automatic intermittent scanning mode and establishes a communication link with the searched Bluetooth equipment;
the mobile terminal sends a command for switching to a Serial Port Profile mode to the Bluetooth equipment establishing the communication link;
the Bluetooth equipment for establishing the link of the mobile terminal responds and closes the Bluetooth Low Energy mode after receiving the instruction for switching to the Serial Port Profile mode;
the mobile terminal establishes a communication link with the Bluetooth equipment in the Serial Port Profile mode, transmits the acquired data to be transmitted to the server through the Bluetooth equipment in the Serial Port Profile mode, and transmits the data to the target client through the server.
The method further comprises the following steps: after the data transmission is finished, the mobile terminal disconnects the communication link with the Bluetooth device in the Serial Port Profile mode.
After the mobile terminal disconnects the communication link with the Bluetooth device in the Serial Port Profile mode, the Bluetooth device in the Serial Port Profile mode immediately switches to the Bluetooth Low Energy mode for intermittent broadcasting.
By the method, peripheral Bluetooth equipment does not need to be scanned again when the two Bluetooth modes are switched, so that the operation time is saved, and the user experience is improved.
The mobile terminal searches the Bluetooth equipment in the Bluetooth Low Energy mode by adopting an automatic intermittent scanning mode, and obtains the name, the MAC address, the broadcast information and the signal intensity of the Bluetooth equipment.
The process of establishing the communication link between the mobile terminal and the searched Bluetooth device is as follows:
the mobile terminal connects the searched Bluetooth equipment according to the corresponding MAC address;
after the mobile terminal is successfully connected with the searched Bluetooth equipment, acquiring service information of the searched Bluetooth equipment;
and the mobile terminal establishes a communication link according to the searched service information of the Bluetooth device.
The method for the mobile terminal to disconnect the communication link with the Bluetooth equipment in the Serial Port Profile mode comprises two modes, namely an active disconnection mode and a passive disconnection mode; the active disconnection of the Bluetooth connection mode is that after the mobile terminal finishes data transmission, a Bluetooth disconnection instruction is sent; the passive disconnection mode is that the mobile terminal does not have any data transmission to the Bluetooth equipment within the preset time.
No matter the active disconnection mode or the passive disconnection mode, the mode can be effectively switched to the Bluetooth Low Energy mode, and the overall power consumption is reduced.
The data to be transmitted comprises data in the forms of characters, pictures, voice, videos and files.
A data transmission method based on dual-mode Bluetooth in an underground tunnel comprises the following steps:
the mobile terminal searches the Bluetooth equipment in the Bluetooth Low Energy mode by adopting an automatic intermittent scanning mode and establishes a communication link with the searched Bluetooth equipment;
the mobile terminal sends a command for switching to a Serial Port Profile mode to the Bluetooth equipment establishing the communication link;
the mobile terminal establishes a communication link with the Bluetooth equipment in the Serial Port Profile mode, transmits the acquired data to be transmitted to the server through the Bluetooth equipment in the Serial Port Profile mode, and transmits the data to the target client through the server.
The invention has the beneficial effects that:
(1) the invention adopts the low-power-consumption Bluetooth and the standard Bluetooth to share the MAC address and the intelligent switching technology, has the advantages of low operation power consumption, high response speed, high transmission rate, safety and reliability, and solves the problem that the engineering personnel can not communicate with the outside during the routing inspection operation in the underground comprehensive pipe gallery.
(2) The Bluetooth device uses a dual-mode Bluetooth module (Serial Port Profile and Bluetooth Low Energy) sharing a MAC address, and under the default condition, the Bluetooth device operates in a Bluetooth Low-power consumption mode, intermittently sends Bluetooth broadcast, and waits for the access connection of external equipment. When high-speed data transmission is needed, the Bluetooth equipment is switched to a SerialPort Profile mode to transmit pictures, audio, videos, files and the like, and after transmission is finished, the Bluetooth of the equipment is recovered to a Bluetooth Low Energy mode with extremely Low power consumption. Finally, low-power-consumption high-speed data transmission in the underground tunnel is achieved.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.
The mobile terminal mentioned in the embodiment of the invention can comprise a device which can be connected with Bluetooth signals of a personal computer, a tablet computer and a smart phone. The destination client mentioned in the embodiment of the present invention may include network-connectable devices such as a personal computer, a tablet computer, a smart phone, and a monitoring server. The Bluetooth device of the invention is an access point terminal with a Bluetooth module and a storage module, and data are transmitted between the mobile terminal and the Bluetooth device through Bluetooth signals.
The mobile terminal transmits the data to be transmitted to the Bluetooth equipment through the Bluetooth signal, the data is transmitted to the server through the Bluetooth equipment, and finally the data to be transmitted is sent to the target client through the server.
The system of the invention realizes low-power consumption and high-speed data transmission in the underground tunnel based on the dual-mode Bluetooth, so that the mobile terminal and the target client terminal can achieve the purpose of data transmission through Bluetooth communication. The Bluetooth device uses a dual-mode Bluetooth module (Serial Port Profile and Bluetooth Low Energy) sharing a MAC address, and under the default condition, the Bluetooth device operates in a Bluetooth Low-power consumption mode, intermittently sends Bluetooth broadcast, and waits for the access connection of external equipment. When high-speed data transmission is needed, the Bluetooth equipment is switched to a Serial Port Profile mode to transmit pictures, audio, video, files and the like, and after transmission is finished, the Bluetooth of the equipment is recovered to a Bluetooth Low Energy mode with extremely Low power consumption. Finally, the method for transmitting data in the underground tunnel at low power consumption and high speed is realized.
Fig. 1 is a schematic structural diagram of a dual-mode bluetooth-based data transmission system in an underground tunnel according to the present invention, such as the dual-mode bluetooth-based data transmission system in an underground tunnel shown in fig. 1, a mobile terminal and a plurality of bluetooth devices in an underground tunnel, wherein each bluetooth device is connected to a destination client through a server;
the plurality of Bluetooth devices are arranged in the underground tunnel at intervals of a certain distance, and the distance meets the distance requirement of the mobile terminal adopting Bluetooth transmission;
the mobile terminal is used for searching the Bluetooth equipment in the Bluetooth Low Energy mode by adopting an automatic intermittent scanning mode, establishing a communication link with the Bluetooth equipment in the Bluetooth Low Energy mode, and sending an instruction for switching to a Serial Port Profile mode to the Bluetooth equipment establishing the communication link; the mobile terminal is also used for establishing a communication link with the Bluetooth equipment in the Serial Port Profile mode, transmitting the acquired data to be transmitted to the server through the Bluetooth equipment in the Serial Port Profile mode, and transmitting the data to the target client through the server.
The invention adopts the low-power-consumption Bluetooth and the standard Bluetooth to share the MAC address and the intelligent switching technology, has the advantages of low operation power consumption, high response speed, high transmission rate, safety and reliability, and solves the problem that the engineering personnel can not communicate with the outside during the routing inspection operation in the underground comprehensive pipe gallery.
Fig. 2 is a flowchart of a data transmission method based on dual-mode bluetooth in an underground tunnel according to a first embodiment of the present invention, where the present embodiment is mainly described from a mobile terminal and a bluetooth device mixed side, and as shown in the figure, the data transmission method based on dual-mode bluetooth in an underground tunnel according to the present embodiment may include:
step 1: a plurality of Bluetooth devices installed in the underground tunnel at intervals adopt an intermittent mode to broadcast in a Bluetooth Low Energy mode.
For example: the Bluetooth device is broadcasted every 200 milliseconds, and the broadcasting time is about 5 seconds every time, so that the power consumption of the device can be reduced to the maximum extent, and a user can be ensured to connect the Bluetooth device for data communication in the shortest time.
Step 2: and the mobile terminal in the underground tunnel searches the Bluetooth equipment in the Bluetooth Low Energy mode in an automatic intermittent scanning mode and establishes a communication link with the searched Bluetooth equipment.
The mobile terminal searches the Bluetooth equipment in the Bluetooth Low Energy mode by adopting an automatic intermittent scanning mode, and obtains the name, the MAC address, the broadcast information and the signal intensity of the Bluetooth equipment.
The process of establishing the communication link between the mobile terminal and the searched Bluetooth device is as follows:
the mobile terminal connects the searched Bluetooth equipment according to the corresponding MAC address;
after the mobile terminal is successfully connected with the searched Bluetooth equipment, acquiring service information of the searched Bluetooth equipment;
and the mobile terminal establishes a communication link according to the searched service information of the Bluetooth device.
And step 3: the mobile terminal sends an instruction for switching to the Serial PortProfile mode to the bluetooth device that established the communication link.
The mobile terminal sends an instruction to ask for the Bluetooth module information of the Bluetooth device, if the Bluetooth device uses the dual-mode Bluetooth module, the mobile terminal sends an instruction to request the Bluetooth device to switch to a standard Bluetooth (Serial Port Profile) high-speed communication working mode, and the Bluetooth device returns an instruction to the mobile terminal after being ready.
And 4, step 4: the Bluetooth device of the mobile terminal establishing the link responds and closes the Bluetooth Low Energy mode after receiving the instruction for switching to the Serial Port Profile mode.
And 5: the mobile terminal establishes a communication link with the Bluetooth equipment in the Serial Port Profile mode, transmits the acquired data to be transmitted to the server through the Bluetooth equipment in the Serial Port Profile mode, and transmits the data to the target client through the server.
The data to be transmitted includes data in the form of characters, pictures, voice, video and files.
The method further comprises the following steps: after the data transmission is finished, the mobile terminal disconnects the communication link with the Bluetooth device in the Serial Port Profile mode.
After the mobile terminal disconnects the communication link with the Bluetooth device in the Serial Port Profile mode, the Bluetooth device in the Serial Port Profile mode immediately switches to the Bluetooth Low Energy mode for intermittent broadcasting.
The method for the mobile terminal to disconnect the communication link with the Bluetooth equipment in the Serial Port Profile mode comprises two modes, namely an active disconnection mode and a passive disconnection mode; the active disconnection of the Bluetooth connection mode is that after the mobile terminal finishes data transmission, a Bluetooth disconnection instruction is sent; the passive disconnection mode is that the mobile terminal does not have any data transmission to the Bluetooth equipment within the preset time.
No matter the active disconnection mode or the passive disconnection mode, the mode can be effectively switched to the Bluetooth Low Energy mode, and the overall power consumption is reduced.
By the method, peripheral Bluetooth equipment does not need to be scanned again when the two Bluetooth modes are switched, so that the operation time is saved, and the user experience is improved.
This embodiment adopts bluetooth low energy, standard bluetooth sharing MAC address and intelligent switching technique, has the operation low power consumption, and response speed is fast, and transmission rate is high, safe and reliable's advantage, has solved the problem that can't communicate with the external world when patrolling and examining the operation in the engineering personnel utility tunnel.
The Bluetooth device uses a dual-mode Bluetooth module (Serial Port Profile and Bluetooth Low Energy) sharing a MAC address, and under the default condition, the Bluetooth device operates in a Bluetooth low-power consumption mode, intermittently sends Bluetooth broadcast, and waits for the access connection of external equipment. When high-speed data transmission is needed, the Bluetooth equipment is switched to a Serial Port Profile classic Bluetooth mode to transmit pictures, audio, video, files and the like, and after transmission is finished, the Bluetooth of the equipment is recovered to a Bluetooth Low Energy mode with extremely Low power consumption. Finally, low-power-consumption high-speed data transmission in the underground tunnel is achieved.
This embodiment still provides the means of a and external high-speed communication for utility tunnel's engineering construction patrolling personnel, and engineering constructor is when the field operation in underground tunnel, no longer totally enclosed operation promptly. The inspection personnel can report the site conditions to the monitoring center in forms of characters, pictures, voice, video, files and the like in time, and meanwhile, when dangerous conditions occur, the inspection personnel can report dangerous information to the superior leader and broadcast and inform all engineering construction personnel in the underground tunnel. The method improves the working efficiency of engineering construction and inspection personnel, reduces the occurrence of dangerous events and has high social benefit.
Fig. 3 is a flowchart illustrating a data transmission method based on dual-mode bluetooth in an underground tunnel according to a second embodiment of the present invention, where this embodiment is mainly described from a mobile terminal side, and as shown in the figure, the data transmission method based on dual-mode bluetooth in an underground tunnel according to this embodiment may include:
step 1: the mobile terminal searches the Bluetooth equipment in the Bluetooth Low Energy mode in an automatic intermittent scanning mode and establishes a communication link with the searched Bluetooth equipment.
The mobile terminal searches the Bluetooth equipment in the Bluetooth Low Energy mode by adopting an automatic intermittent scanning mode, and obtains the name, the MAC address, the broadcast information and the signal intensity of the Bluetooth equipment.
The process of establishing the communication link between the mobile terminal and the searched Bluetooth device is as follows:
the mobile terminal connects the searched Bluetooth equipment according to the corresponding MAC address;
after the mobile terminal is successfully connected with the searched Bluetooth equipment, acquiring service information of the searched Bluetooth equipment;
and the mobile terminal establishes a communication link according to the searched service information of the Bluetooth device.
Step 2: the mobile terminal sends an instruction for switching to the Serial PortProfile mode to the bluetooth device that established the communication link.
The mobile terminal sends an instruction to ask for the Bluetooth module information of the Bluetooth device, if the Bluetooth device uses the dual-mode Bluetooth module, the mobile terminal sends an instruction to request the Bluetooth device to switch to a standard Bluetooth (Serial Port Profile) high-speed communication working mode, and the Bluetooth device returns an instruction to the mobile terminal after being ready.
And step 3: the mobile terminal establishes a communication link with the Bluetooth equipment in the Serial Port Profile mode, transmits the acquired data to be transmitted to the server through the Bluetooth equipment in the Serial Port Profile mode, and transmits the data to the target client through the server.
The data to be transmitted includes data in the form of characters, pictures, voice, video and files.
The method further comprises the following steps: after the data transmission is finished, the mobile terminal disconnects the communication link with the Bluetooth device in the Serial Port Profile mode.
The method for the mobile terminal to disconnect the communication link with the Bluetooth equipment in the Serial Port Profile mode comprises two modes, namely an active disconnection mode and a passive disconnection mode; the active disconnection of the Bluetooth connection mode is that after the mobile terminal finishes data transmission, a Bluetooth disconnection instruction is sent; the passive disconnection mode is that the mobile terminal does not have any data transmission to the Bluetooth equipment within the preset time.
No matter the active disconnection mode or the passive disconnection mode, the mode can be effectively switched to the Bluetooth Low Energy mode, and the overall power consumption is reduced.
By the method, peripheral Bluetooth equipment does not need to be scanned again when the two Bluetooth modes are switched, so that the operation time is saved, and the user experience is improved.
This embodiment adopts bluetooth low energy, standard bluetooth sharing MAC address and intelligent switching technique, has the operation low power consumption, and response speed is fast, and transmission rate is high, safe and reliable's advantage, has solved the problem that can't communicate with the external world when patrolling and examining the operation in the engineering personnel utility tunnel.
The Bluetooth device uses a dual-mode Bluetooth module (Serial Port Profile and Bluetooth Low Energy) sharing a MAC address, and under the default condition, the Bluetooth device operates in a Bluetooth low-power consumption mode, intermittently sends Bluetooth broadcast, and waits for the access connection of external equipment. When high-speed data transmission is needed, the Bluetooth equipment is switched to a SerialPort Profile mode to transmit pictures, audio, videos, files and the like, and after transmission is finished, the Bluetooth of the equipment is recovered to a Bluetooth Low Energy mode with extremely Low power consumption. Finally, low-power-consumption high-speed data transmission in the underground tunnel is achieved.
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 computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.