CN112911565B - Bluetooth packet sending method, system, device and storage medium - Google Patents

Bluetooth packet sending method, system, device and storage medium Download PDF

Info

Publication number
CN112911565B
CN112911565B CN202110138186.7A CN202110138186A CN112911565B CN 112911565 B CN112911565 B CN 112911565B CN 202110138186 A CN202110138186 A CN 202110138186A CN 112911565 B CN112911565 B CN 112911565B
Authority
CN
China
Prior art keywords
data packet
packet
bluetooth
processed
data
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.)
Active
Application number
CN202110138186.7A
Other languages
Chinese (zh)
Other versions
CN112911565A (en
Inventor
宁玉桥
万振华
马超
张亚楠
赵莹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kaiyuan Wangan Shenzhen Technology Co ltd
Automotive Data of China Tianjin Co Ltd
Seczone Technology Co Ltd
Original Assignee
Kaiyuan Wangan Shenzhen Technology Co ltd
Automotive Data of China Tianjin Co Ltd
Seczone Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kaiyuan Wangan Shenzhen Technology Co ltd, Automotive Data of China Tianjin Co Ltd, Seczone Technology Co Ltd filed Critical Kaiyuan Wangan Shenzhen Technology Co ltd
Priority to CN202110138186.7A priority Critical patent/CN112911565B/en
Publication of CN112911565A publication Critical patent/CN112911565A/en
Application granted granted Critical
Publication of CN112911565B publication Critical patent/CN112911565B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a Bluetooth packet sending method, a system, equipment and a storage medium, wherein the method comprises the following steps: receiving a first data packet sent by a Bluetooth protocol stack; processing the first data packet, adapting the processed first data packet, and sending the adapted first data packet; receiving a second data packet sent by a Bluetooth protocol stack; and processing the second data packet, and adapting and identifying the processed second data packet. The method can identify the adapted data packet through the packet capturing device, and is convenient for a tester to test and analyze the data packet sent by the Bluetooth protocol stack.

Description

Bluetooth packet sending method, system, device and storage medium
Technical Field
The invention belongs to the technical field of Bluetooth, and particularly relates to a Bluetooth packet sending method, a Bluetooth packet sending system, bluetooth packet sending equipment and a Bluetooth packet sending storage medium.
Background
Bluetooth (Bluetooth): the wireless technology standard is adopted, and short-distance data exchange among fixed equipment, mobile equipment and a building personal area network (using UHF radio waves of ISM wave band of 2.4-2.485 GHz) can be realized; bluetooth can be connected with a plurality of devices, and the problem of data synchronization is solved.
Bluetooth uses the frequency hopping technique, and the data of will transmitting are cut apart into the data packet, and traditional data packet's that receives from the bluetooth protocol stack inefficiency, and equipment under test can't resolve the data packet, seriously influences the usability of software, and need spend too much time and energy to resolve the data packet that the bluetooth protocol stack sent by the tester.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: aiming at the problems in the prior art, the invention provides a Bluetooth packet sending method which is convenient for testers to carry out test analysis.
In a first aspect, the present invention provides a bluetooth packet sending method, where the method includes:
receiving a first data packet sent by a Bluetooth protocol stack;
processing the first data packet, adapting the processed first data packet, and sending the adapted first data packet;
receiving a second data packet sent by a Bluetooth protocol stack;
and processing the second data packet, and adapting and identifying the processed second data packet.
In a second aspect, the present invention provides a bluetooth packet sending system, including:
a first receiving module: the device is used for receiving a first data packet sent by a Bluetooth protocol stack;
a sending module: the data processing device is used for processing the first data packet, adapting the processed first data packet and sending the adapted first data packet;
a second receiving module: the second data packet is used for receiving the second data packet sent by the Bluetooth protocol stack;
an identification module: the second data packet is processed, and the processed second data packet is adapted and identified.
In a third aspect, the present invention further provides a bluetooth packet sending device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps in the bluetooth packet sending method according to the first aspect.
In a fourth aspect, the present invention also provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of the bluetooth packet sending method according to the first aspect.
The invention provides a Bluetooth packet sending method, which comprises the following steps: receiving a first data packet sent by a Bluetooth protocol stack; processing the first data packet, adapting the processed first data packet, and sending the adapted first data packet; receiving a second data packet sent by a Bluetooth protocol stack; and processing the second data packet, and adapting and identifying the processed second data packet. The method can identify the adapted data packet through the packet capturing device, and is convenient for a tester to test and analyze the data packet sent by the Bluetooth protocol stack.
Drawings
The following detailed description of the invention will be made with reference to the accompanying drawings
FIG. 1 is a schematic flow chart of a Bluetooth packet transmission method according to the present invention;
FIG. 2 is a sub-flow diagram of the Bluetooth packet transmission method of the present invention
FIG. 3 is a schematic view of another sub-process of the Bluetooth packet forwarding method of the present invention;
fig. 4 is a schematic diagram of program modules of the bluetooth packet sending method according to the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, 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 apparent that the described embodiments are only a part of the embodiments of the present invention, and not all the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic flow chart of a bluetooth packet sending method in the embodiment of the present application, in the embodiment, the bluetooth packet sending method includes:
step 101, receiving a first data packet sent by a bluetooth protocol stack.
In this embodiment, the bluetooth protocol stack is composed of 4 parts, such as baseband, link management, logical link control and adaptation protocol, and service search protocol.
And 102, processing the first data packet, adapting the processed first data packet, and sending the adapted first data packet.
In this embodiment, a first data packet sent by the bluetooth protocol stack is processed first, data in the processed first data packet is adapted, data in the first data packet is also checked, and the checked data packet is sent to the bluetooth protocol stack.
And 103, receiving a second data packet sent by the Bluetooth protocol stack.
In this embodiment, after receiving the data packet after the verification, the bluetooth protocol stack sends out the second data packet.
And 104, processing the second data packet, and adapting and identifying the processed second data packet.
In this embodiment, the second data packet is processed again, the data in the processed second data packet is adapted, the data in the second data packet is also verified, the verified data is analyzed and identified, and the data packet is reused.
The embodiment of the application provides a Bluetooth packet sending method, which comprises the following steps: receiving a first data packet sent by a Bluetooth protocol stack; processing the first data packet, adapting the processed first data packet, and sending the adapted first data packet; receiving a second data packet sent by a Bluetooth protocol stack; and processing the second data packet, and adapting and identifying the processed second data packet. The method can identify the adapted data packet through the packet capturing device, and is convenient for a tester to test and analyze the data packet sent by the Bluetooth protocol stack.
Further, the processing the first data packet includes:
and removing or correcting the corresponding first data packet header according to the Bluetooth protocol, wherein the first data packet at least comprises the first data packet header.
In this embodiment, according to the bluetooth protocol, the packet header in the corresponding link layer in the first data packet is also removed or corrected according to the model requirement, the first data packet header needs to be removed because the data packet header is needed in the bluetooth protocol stack, and the first data packet header needs to be removed because the packet capturing tool cannot identify the data packet with the data packet header.
Further, referring to fig. 2, fig. 2 is a sub-flow diagram of a bluetooth packet sending method in an embodiment of the present application, where adapting a processed first data packet and sending the adapted first data packet includes:
step 201, recalculating the processed first data packet and modifying a corresponding first data field, wherein the first data packet at least comprises the first data field;
step 202, packaging and sending the recalculated and modified first data packet.
In this embodiment, the first data packet with the modified data packet header is recalculated and modified correspondingly, actually, the length field in the first data packet is checked, then the data packet with the modified data is packetized, and the packetized first data packet is retransmitted to the bluetooth protocol stack.
Further, the processing the second packet includes:
and adding a corresponding second data packet header or modifying the corresponding second data packet header according to the Bluetooth protocol, wherein the second data packet at least comprises the second data packet header.
In this embodiment, according to the bluetooth protocol, the packet header in the corresponding link layer in the second packet is also removed or corrected according to the model requirement, and the second packet header needs to be removed because the packet header is needed in the bluetooth protocol stack, and the second packet header needs to be removed because the packet capturing tool cannot recognize the packet with the packet header.
Further, referring to fig. 3, fig. 3 is another sub-flow diagram of the bluetooth packet sending method in the embodiment of the present application, and the adapting and identifying the processed second data packet includes:
step 301, adapting the processed second data packet;
and step 302, analyzing and identifying the adapted second data packet.
In this embodiment, the second data packet after the header of the data packet is modified is recalculated and modified correspondingly, actually, the length field in the second data packet is checked, the second data packet after the data modification is analyzed, and the second data packet after the analysis is identified.
Further, adapting the processed second data packet includes:
recalculating the processed second data packet and modifying the corresponding second data field, wherein the second data packet at least comprises the second data field.
In this embodiment, the second packet after the header correction is recalculated and modified correspondingly, which is actually to check the length field in the second packet.
Further, parsing and identifying the adapted second data packet includes:
and identifying the adapted data through a packet capturing device.
In this embodiment, only after the second packet header is processed, the data in the second packet may be identified by the packet capture device.
Further, an embodiment of the present application further provides a bluetooth packet sending system 400, referring to fig. 4, and fig. 4 is a schematic diagram of a bluetooth packet sending device module in the embodiment of the present application, in this embodiment, the bluetooth packet sending device 400 includes:
the first receiving module 401: the first data packet is used for receiving a first data packet sent by a Bluetooth protocol stack;
the sending module 402: the system comprises a first data packet processing module, a second data packet processing module, a first data packet transmission module and a second data packet transmission module, wherein the first data packet processing module is used for processing the first data packet, adapting the processed first data packet and transmitting the adapted first data packet;
the second receiving module 403: the second data packet is used for receiving a second data packet sent by the Bluetooth protocol stack;
the identification module 404: the second data packet is processed, and the processed second data packet is adapted and identified.
The bluetooth packet sending device 400 provided by the embodiment of the application can realize that: receiving a first data packet sent by a Bluetooth protocol stack; processing the first data packet, adapting the processed first data packet, and sending the adapted first data packet; receiving a second data packet sent by a Bluetooth protocol stack; and processing the second data packet, and adapting and identifying the processed second data packet. The method can identify the adapted data packet through the packet capturing device, and is convenient for a tester to test and analyze the data packet sent by the Bluetooth protocol stack.
Further, the present application also provides a bluetooth packet sending device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, each step of the bluetooth packet sending method is implemented.
Further, the present application also provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the bluetooth packet sending method are implemented.
Each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention, which is substantially or partly contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in this specification are presently considered to be preferred embodiments and that no single act or module is essential to the invention.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In view of the above description of the bluetooth packet sending method and system, device and storage medium provided by the present invention, those skilled in the art will appreciate that there are variations in the embodiments and applications of the bluetooth packet sending method and system, and that the present disclosure should not be construed as limiting the present invention.

Claims (9)

1. A Bluetooth packet sending method, characterized in that the method comprises:
receiving a first data packet sent by a Bluetooth protocol stack;
processing the first data packet, recalculating the processed first data packet, verifying a length field in the first data packet, and packaging and sending the recalculated and verified first data packet; the first data packet includes at least the first data field;
receiving a second data packet sent by a Bluetooth protocol stack; the second data packet is sent out after the data packet which is checked is received by the Bluetooth protocol stack;
and processing the second data packet, and adapting and identifying the processed second data packet.
2. The method of claim 1, wherein the processing the first packet comprises:
and removing or correcting the corresponding first data packet header according to the Bluetooth protocol, wherein the first data packet at least comprises the first data packet header.
3. The method of claim 1, wherein the processing the second packet comprises:
adding a corresponding second data packet header or modifying a corresponding second data packet header according to a bluetooth protocol, wherein the second data packet includes at least the second data packet header.
4. The method of claim 1, wherein said adapting and identifying said processed second packet comprises:
adapting the processed second data packet;
and analyzing and identifying the second data packet after the adaptation.
5. The method of claim 4, wherein said adapting said processed second data packet comprises:
recalculating the processed second data packet and modifying a corresponding second data field, wherein the second data packet at least comprises the second data field.
6. The method of claim 4, wherein parsing and identifying the adapted second packet comprises:
and identifying the adapted data through a packet grabber.
7. A bluetooth packet transmission system, the system comprising:
a first receiving module: the first data packet is used for receiving a first data packet sent by a Bluetooth protocol stack;
a sending module: the device is used for processing the first data packet, recalculating the processed first data packet, checking a length field in the first data packet, and packaging and sending the recalculated and checked first data packet; the first data packet includes at least the first data field;
a second receiving module: the second data packet is used for receiving the second data packet sent by the Bluetooth protocol stack; the second data packet is sent out after the Bluetooth protocol stack receives the data packet after the verification is completed;
an identification module: the second data packet is processed, and the processed second data packet is adapted and identified.
8. A bluetooth packetization apparatus comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, carries out the individual steps of the bluetooth packetization method as claimed in any one of claims 1 to 6.
9. A storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, performs the steps of the bluetooth packetization method according to any one of claims 1 to 6.
CN202110138186.7A 2021-02-01 2021-02-01 Bluetooth packet sending method, system, device and storage medium Active CN112911565B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110138186.7A CN112911565B (en) 2021-02-01 2021-02-01 Bluetooth packet sending method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110138186.7A CN112911565B (en) 2021-02-01 2021-02-01 Bluetooth packet sending method, system, device and storage medium

Publications (2)

Publication Number Publication Date
CN112911565A CN112911565A (en) 2021-06-04
CN112911565B true CN112911565B (en) 2022-12-13

Family

ID=76121056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110138186.7A Active CN112911565B (en) 2021-02-01 2021-02-01 Bluetooth packet sending method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN112911565B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019090454A1 (en) * 2017-11-07 2019-05-16 深圳市汇顶科技股份有限公司 Bluetooth test system and method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297334A (en) * 2013-06-08 2013-09-11 吉首大学 Bluetooth-WIFI gateway
US9364185B2 (en) * 2014-01-15 2016-06-14 Roche Diabetes Care, Inc. Low energy wireless communication systems and methods for medical devices
US9654906B2 (en) * 2014-06-12 2017-05-16 Samsung Electronics Co., Ltd Method for processing data based on bluetooth protocol and electronic device thereof
CN106060619A (en) * 2016-06-27 2016-10-26 乐视控股(北京)有限公司 Method for controlling Bluetooth signal response in television and related device
CN106657136B (en) * 2017-01-13 2019-12-17 北京元心科技有限公司 Terminal device, communication method of hidden channel and device thereof
CN107317638A (en) * 2017-06-07 2017-11-03 百富计算机技术(深圳)有限公司 Method, terminal device and the computer-readable recording medium of bluetooth test
CN109495870B (en) * 2018-07-24 2022-02-01 华为机器有限公司 Bluetooth test method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019090454A1 (en) * 2017-11-07 2019-05-16 深圳市汇顶科技股份有限公司 Bluetooth test system and method

Also Published As

Publication number Publication date
CN112911565A (en) 2021-06-04

Similar Documents

Publication Publication Date Title
US20150131445A1 (en) Similarity matching method and related device and communication system
CN111836329B (en) Data transmission method and related device
KR100711738B1 (en) Bitmap-based automatic repeat request engine and method for the same
CN103647869B (en) A kind of matching method of terminal, terminal and system
CN106936441A (en) A kind of data compression method and device
CN103716137A (en) Method and system for identifying reasons of ZigBee sensor network packet loss
CN104135339A (en) Bluetooth low-power-consumption communication method, Bluetooth equipment and system
CA2518696A1 (en) Wireless packet communication method
US20210394057A1 (en) Method for network detection, electronic device, and non-transitory computer-readable storage medium
CN108616532A (en) Ballot processing method, apparatus and terminal device
CN106464581A (en) Data transmission method and system and data receiving device
CN102439942B (en) For supporting equipment and the method for the higher data rate had on the link of variable frame size
CN108123775A (en) The method and apparatus of transmission packet
CN112911565B (en) Bluetooth packet sending method, system, device and storage medium
CN105939304B (en) Tunnel message parsing method and device
EP2420936B1 (en) Protocol conversion Communication Device
CN101835144A (en) Method and device for carrying out safety detection on wireless network
CN101188867A (en) Method and apparatus for performing integrity protection in a wireless communications system
US20120112889A1 (en) Operation method of an rfid tag, operation method of an rfid reader, rfid tag, and rfid reader
CN102111401B (en) Protocol recognition method and device as well as equipment
CN109743746A (en) A kind of two-way converting detection BFD parameter consultation method, device and chip
CN113132157B (en) Equipment configuration method and device, storage medium and electronic device
CN108199991A (en) The blind authentication method of physical layer and system based on the time-varying fading channels that confidence is transmitted
CN106301602B (en) The method and device of signal detection
CN102300255A (en) Method and device for optimizing packet transmission in wireless network

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