Data communication apparatus, method, bluetooth device and storage medium

CN116723504BActive Publication Date: 2026-09-08NANJING ESWIN IC TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310318266.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2026-09-08
Estimated Expiration
2043-03-28

AI Technical Summary

Technical Problem

[0004]本发明提供一种数据通信装置、方法、蓝牙设备及存储介质,用以解决现有技术中AT命令易于被其他设备截取,导致蓝牙设备最终无法有效获取蓝牙协议层发送的该AT命令对应的数据结果的缺陷,实现利用第一安全层和第二安全层,提高了AT命令的传输安全性,可有效保证该AT命令在传输过程中不易被其它设备截取,进而保证蓝牙协议层能够根据接收的该AT命令,得到有效的数据结果

Benefits of technology

[0025]This invention provides a data communication device, method, Bluetooth device, and storage medium. The data communication device includes: a first security layer, a second security layer, an application layer, and a Bluetooth protocol layer. The first security layer is used to receive AT commands sent by the application layer and encrypt the AT commands to obtain encrypted AT commands. The second security layer is used to decrypt the encrypted AT commands to obtain the AT commands. The Bluetooth protocol layer is used to determine the data result based on the AT commands. This device utilizes the first and second security layers to improve the transmission security of AT commands, effectively ensuring that the AT commands are not easily intercepted by other devices during transmission, thereby ensuring that the Bluetooth protocol layer can obtain valid data results based on the received AT commands.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116723504B_ABST
    Figure CN116723504B_ABST
Patent Text Reader

Abstract

The application provides a data communication device, method, Bluetooth equipment and storage medium, the device comprises: a first security layer, a second security layer, an application layer and a Bluetooth protocol layer; the first security layer is used for receiving the AT command sent by the application layer, and the AT command is encrypted to obtain an encrypted AT command; the second security layer is used for decrypting the encrypted AT command to obtain the AT command; the Bluetooth protocol layer is used for determining data results according to the AT command. The device uses the first security layer and the second security layer, improves the transmission security of the AT command, can effectively ensure that the AT command is not easily intercepted by other equipment in the transmission process, and further ensures that the Bluetooth protocol layer can obtain effective data results according to the received AT command.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and in particular to a data communication device, method, Bluetooth device, and storage medium. Background Technology

[0002] With the rapid development of technology, Bluetooth devices are being used more and more widely, such as Bluetooth main units, Bluetooth handsets, Bluetooth headsets, in-vehicle devices, personal computers (PCs), adapters with Bluetooth communication capabilities, and home entertainment devices, etc.

[0003] In the prior art, when a Bluetooth device sends an Attention (AT) command from the application layer to the Bluetooth protocol layer, the AT command is easily intercepted by other devices, causing the Bluetooth device to ultimately fail to effectively obtain the data result corresponding to the AT command sent by the Bluetooth protocol layer. Summary of the Invention

[0004] This invention provides a data communication device, method, Bluetooth device, and storage medium to address the shortcomings of existing technologies where AT commands are easily intercepted by other devices, resulting in the Bluetooth device ultimately being unable to effectively obtain the data result corresponding to the AT command sent by the Bluetooth protocol layer. By utilizing a first security layer and a second security layer, the transmission security of AT commands is improved, effectively ensuring that the AT command is not easily intercepted by other devices during transmission, thereby ensuring that the Bluetooth protocol layer can obtain a valid data result based on the received AT command.

[0005] This invention provides a data communication device, comprising: a first security layer, a second security layer, an application layer, and a Bluetooth protocol layer;

[0006] The first security layer is used to receive AT commands sent by the application layer and encrypt the AT commands to obtain encrypted AT commands.

[0007] This second security layer is used to decrypt the encrypted AT command to obtain the AT command.

[0008] This Bluetooth protocol layer is used to determine the data result based on the AT command.

[0009] According to a data communication device provided by the present invention, the second security layer is further used to encrypt the data result to obtain an encrypted data result;

[0010] This first security layer is also used to decrypt the encrypted data result to obtain the data result;

[0011] This application layer is used to execute the operation corresponding to the AT command based on the data result.

[0012] According to a data communication device provided by the present invention, the first security layer is specifically used to send the encrypted AT command to the second security layer via an asynchronous transceiver UART.

[0013] A data communication device according to the present invention further includes an AT adapter layer;

[0014] The AT adapter layer is used to receive the AT command sent by the second security layer, parse the AT command, and call the interface function of the Bluetooth protocol layer.

[0015] This Bluetooth protocol layer is specifically used to determine the data result based on the interface function and the AT command.

[0016] According to a data communication device provided by the present invention, the AT adapter layer is further configured to receive the data result sent by the Bluetooth protocol layer and send the data result to the second security layer.

[0017] According to a data communication device provided by the present invention, the application layer is specifically used to execute the operation corresponding to the AT command based on the data result when the data result matches the AT command.

[0018] The present invention also provides a data communication method, applied to any of the data communication devices described above, the method comprising:

[0019] The first security layer receives the AT command sent by the application layer and encrypts the AT command to obtain the encrypted AT command.

[0020] The encrypted AT command is decrypted using the second security layer to obtain the AT command.

[0021] The data result is determined using the Bluetooth protocol layer based on the AT command.

[0022] The present invention also provides a Bluetooth device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the data communication method described above.

[0023] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data communication method as described above.

[0024] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the data communication method as described above.

[0025] This invention provides a data communication device, method, Bluetooth device, and storage medium. The data communication device includes: a first security layer, a second security layer, an application layer, and a Bluetooth protocol layer. The first security layer is used to receive AT commands sent by the application layer and encrypt the AT commands to obtain encrypted AT commands. The second security layer is used to decrypt the encrypted AT commands to obtain the AT commands. The Bluetooth protocol layer is used to determine the data result based on the AT commands. This device utilizes the first and second security layers to improve the transmission security of AT commands, effectively ensuring that the AT commands are not easily intercepted by other devices during transmission, thereby ensuring that the Bluetooth protocol layer can obtain valid data results based on the received AT commands. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0027] Figure 1 This is one of the structural schematic diagrams of the data communication device provided by the present invention;

[0028] Figure 2 This is a schematic diagram of the operation of the first security layer provided by the present invention;

[0029] Figure 3 This is a schematic diagram of the operation of the second security layer provided by the present invention;

[0030] Figure 4 This is a schematic diagram showing the location of the UART interface of the asynchronous transceiver provided by the present invention;

[0031] Figure 5 This is the second schematic diagram of the data communication device provided by the present invention;

[0032] Figure 6 This is a schematic diagram of a scenario for the data communication method provided by the present invention;

[0033] Figure 7 This is one of the flowcharts illustrating the data communication method provided by the present invention;

[0034] Figure 8 This is the second flowchart illustrating the data communication method provided by the present invention;

[0035] Figure 9 This is a schematic diagram of the structure of the Bluetooth device provided by the present invention. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0037] like Figure 1 The diagram shown is a structural schematic of the data communication device provided by the present invention. The data communication device may include: a first security layer 101, a second security layer 102, an application layer 103, and a Bluetooth protocol layer 104.

[0038] The first security layer 101 is used to receive AT commands sent by the application layer 103 and encrypt the AT commands to obtain encrypted AT commands.

[0039] The second security layer 102 is used to decrypt the encrypted AT commands to obtain the AT commands;

[0040] Bluetooth protocol layer 104 is used to determine the data result based on AT commands.

[0041] The AT commands can invoke the Bluetooth protocol layer 104 to perform corresponding operations on the data communication device / Bluetooth device. Optionally, the AT commands may include: Bluetooth device scanning commands, Bluetooth device binding commands, Serial Port Profile (SPP) link establishment commands, and SPP data transmission commands, etc.

[0042] The data result refers to whether the AT command was successful or not. For example, if the AT command is an SPP link establishment command, the data result could be "SPP link established successfully".

[0043] In this embodiment of the invention, the application layer 103 first sends an AT command to the first security layer 101. Then, after receiving the AT command from the application layer 103, the first security layer 101 encrypts the AT command to obtain an encrypted AT command and sends the encrypted AT command to the second security layer 102. Next, after receiving the encrypted AT command from the first security layer 101, the second security layer 102 decrypts the encrypted AT command to obtain the AT command and sends it to the Bluetooth protocol layer 104. In this way, by utilizing the first security layer 101 and the second security layer 102, the data communication device can effectively ensure that the AT command is not easily intercepted by other devices during transmission, improving the transmission security of the AT command and ensuring that the Bluetooth protocol layer 104 can obtain valid data results based on the received AT command.

[0044] Optionally, the application layer 103 is also used to respond to user input, obtain AT commands, and send the AT commands to the first security layer 101.

[0045] When a user needs the data communication device to perform certain operations, the user can input the corresponding operation into the application layer 103 of the data communication device; then, the application layer 103 responds to the user's input operation and generates AT commands based on the input operation, which can effectively improve human-computer interaction.

[0046] Optionally, the first security layer 101 is specifically used to encrypt the AT command using an encryption algorithm to obtain the encrypted AT command.

[0047] Optionally, the encryption algorithm may include: Data Encryption Standard (DES) encryption algorithm and Message-Digest Algorithm 5 (MD5) encryption algorithm, etc.

[0048] In this way, the encrypted AT commands obtained by the first security layer 101 based on the above encryption algorithm have high security.

[0049] Optionally, the second security layer 102 is specifically used to decrypt the encrypted AT command using a decryption algorithm to obtain the AT command.

[0050] Optionally, the decryption algorithm may include: DES decryption algorithm and MD5 decryption algorithm, etc.

[0051] In this way, the AT commands obtained by the second security layer 102 based on the above decryption algorithm are highly accurate.

[0052] In some embodiments, the second security layer 102 is further used to encrypt the data result to obtain an encrypted data result;

[0053] The first security layer 101 is also used to decrypt the encrypted data result to obtain the data result;

[0054] Application layer 103 is used to execute the corresponding AT command operations based on the data results.

[0055] In this embodiment of the invention, after acquiring the data result, the Bluetooth protocol layer 104 can send the data result to the second security layer 102. Then, after receiving the data result sent by the Bluetooth protocol layer 104, the second security layer 102 can encrypt the data result to obtain an encrypted data result, and send the encrypted data result to the first security layer 101. Next, after receiving the encrypted data result sent by the second security layer 102, the first security layer 101 can decrypt the encrypted data result to obtain a data result, and send the data result to the application layer 103. In this way, by utilizing the first security layer 101 and the second security layer 102, the data communication device can effectively ensure that the data result corresponding to the AT command is not easily intercepted by other devices during transmission, thereby improving the transmission security of the data result and ensuring that the application layer 103 can effectively execute the operation corresponding to the AT command based on the data result.

[0056] Optionally, the second security layer 102 is specifically used to encrypt the data result using an encryption algorithm to obtain an encrypted data result.

[0057] It should be noted that the encryption algorithm used in the second security layer 102 may be the same as or different from the encryption algorithm used in the first security layer 101; no specific limitation is made here.

[0058] Optionally, the first security layer 101 is specifically used to decrypt the encrypted data result using a decryption algorithm to obtain the data result.

[0059] It should be noted that the decryption algorithm used by the first security layer 101 and the decryption algorithm used by the second security layer 102 can be the same or different, and no specific limitation is made here.

[0060] For example, such as Figure 2 The diagram shown is a schematic representation of the operation of the first security layer provided by this invention; as shown... Figure 3 The diagram shown is a schematic diagram of the operation of the second security layer provided by the present invention.

[0061] exist Figure 2 In this process, the first security layer 101 uses encryption algorithm A to encrypt the received AT command, obtaining the encrypted AT command. The first security layer 101 also receives the encrypted data result sent by the second security layer 102, and uses decryption algorithm B to decrypt the encrypted data result, obtaining the data result.

[0062] exist Figure 3 In the second security layer 102, the decryption algorithm B is used to decrypt the received encrypted AT command to obtain the AT command, and the encryption algorithm A is used to encrypt the received data result to obtain the encrypted data result.

[0063] In some embodiments, the first security layer 101 is specifically used to send encrypted AT commands to the second security layer 102 via a Universal Asynchronous Receiver / Transmitter (UART).

[0064] An asynchronous transceiver transmitter (UART) may include a receive (RX) port and a transmit (TX) port. The RX and TX ports can operate independently without conflict. The function of this asynchronous transceiver transmitter is to asynchronously send and receive communication data.

[0065] In this embodiment, the first security layer 101 can send encrypted AT commands to the second security layer 102 through the TX port of the asynchronous transceiver UART to improve data transmission speed.

[0066] Optionally, the second security layer 102 is specifically used to receive encrypted AT commands sent by the first security layer 101 via the RX port of the asynchronous transceiver UART.

[0067] Optionally, the second security layer 102 is specifically used to send encrypted data results to the first security layer 101 via the TX port of the asynchronous transceiver UART.

[0068] Optionally, the first security layer 101 is specifically used to receive encrypted data results sent by the second security layer 102 through the RX port of the asynchronous transceiver UART.

[0069] For example, such as Figure 4 The diagram shown illustrates the location of the asynchronous transceiver UART interface provided by this invention. Data between the first security layer 101 and the second security layer 102 can be transmitted via the asynchronous transceiver UART, thereby effectively improving data transmission speed.

[0070] In some embodiments, such as Figure 5 The diagram shown is a structural schematic of the data communication device provided by the present invention. The data communication device may also include an AT adapter layer 105.

[0071] The AT adaptation layer 105 is used to receive AT commands sent by the second security layer 102, parse the AT commands, and call the interface functions of the Bluetooth protocol layer 104.

[0072] Bluetooth protocol layer 104 is specifically used to determine the data result based on interface functions and AT commands.

[0073] The interface function can be viewed as command execution code, which can control the data communication device / Bluetooth device to perform the corresponding AT command operations.

[0074] In this embodiment of the invention, the second security layer 102 can send AT commands to the AT adaptation layer 105. Then, after receiving the AT command sent by the second security layer, the AT adaptation layer 105 can parse the AT command to obtain the parsing result, and directly call the interface function of the Bluetooth protocol layer 104 based on the parsing result, so that the Bluetooth protocol layer 104 can directly determine a more accurate data result based on the interface function and the AT command.

[0075] In some embodiments, the AT adapter layer 105 is also used to receive data results sent by the Bluetooth protocol layer 104 and send the data results to the second security layer 102.

[0076] In this embodiment, the AT adapter layer 105 can receive data results sent by the Bluetooth protocol layer 104, but the AT adapter layer 105 does not need to process the data results in any way and can directly send the data results to the second security layer 102. That is to say, the AT adapter layer 105 only serves to forward data results.

[0077] In some embodiments, the application layer 103 is specifically used to execute the operation corresponding to the AT command based on the data result when the data result matches the AT command.

[0078] In this embodiment, after receiving the data result sent by the first security layer, if the application layer 103 determines that the data result matches the previously generated AT command, then it can directly execute the operation corresponding to the AT command based on the data result.

[0079] Optional, such as Figure 6 The diagram shown is a scenario illustration of the data communication method provided by this invention. Figure 6 In the process, the application layer 103 responds to the user's input operation, obtains the AT command, and sends the AT command to the first security layer 101.

[0080] After receiving the AT command sent by the application layer 103, the first security layer 101 can encrypt the AT command to obtain an encrypted AT command, and then send the encrypted AT command to the second security layer 102.

[0081] After receiving the encrypted AT command sent by the first security layer 101, the second security layer 102 can decrypt the encrypted AT command to obtain the AT command, and send the AT command to the AT adaptation layer 105.

[0082] After receiving the AT command sent by the second security layer 102, the AT adaptation layer 105 can parse the AT command and call the interface function of the Bluetooth protocol layer 104.

[0083] Bluetooth protocol layer 104 determines the data result based on the interface function and the AT command, and forwards the data result to the second security layer 102 through AT adaptation layer 105.

[0084] After receiving the data result forwarded by the AT adaptation layer 105, the second security layer 102 can encrypt the data result to obtain an encrypted data result, and send the encrypted data result to the first security layer 101.

[0085] After receiving the encrypted data result sent by the second security layer 102, the first security layer 101 can decrypt the encrypted data result to obtain the data result, and then send the data result to the application layer 103.

[0086] After receiving the data result sent by the first security layer 101, the application layer 103 can perform the operation corresponding to the AT command based on the data result if the data result matches the AT command.

[0087] Because the entire data communication process can encrypt and decrypt all communication data, the security of all communication data transmission can be effectively guaranteed.

[0088] It should be noted that the subject executing the data communication method can be a data communication device or a Bluetooth device; no specific limitation is made here.

[0089] Optionally, Bluetooth devices may include computers, mobile terminals, and wearable devices.

[0090] The data communication method provided by the present invention is described below. The data communication method described below can be referred to in correspondence with the data communication device described above.

[0091] like Figure 7 The diagram shown is a flowchart of the data communication method provided by the present invention, which may include:

[0092] 701. Receive AT commands sent by the application layer using the first security layer, and encrypt the AT commands to obtain encrypted AT commands.

[0093] In some embodiments, after step 701, the method further includes: sending encrypted AT commands to a second security layer via an asynchronous transceiver UART using a first security layer.

[0094] 702. Use the second security layer to decrypt the encrypted AT command to obtain the AT command.

[0095] 703. Use the Bluetooth protocol layer to determine the data result based on the AT command.

[0096] In some embodiments, after step 702 and before step 703, the method further includes: receiving AT commands sent by the second security layer using the AT adaptation layer, parsing the AT commands, and calling the interface function of the Bluetooth protocol layer.

[0097] Determining data results using the Bluetooth protocol layer based on AT commands can include: determining data results using the Bluetooth protocol layer based on interface functions and AT commands.

[0098] In some embodiments, the method further includes: receiving data results sent by the Bluetooth protocol layer using the AT adapter layer, and sending the data results to the second security layer.

[0099] In this embodiment of the invention, a first security layer receives AT commands sent by the application layer and encrypts them to obtain encrypted AT commands; a second security layer decrypts the encrypted AT commands to obtain the final AT command; and the Bluetooth protocol layer determines the data result based on the AT command. This method utilizes both the first and second security layers to improve the transmission security of AT commands, effectively ensuring that the AT commands are not easily intercepted by other devices during transmission, thereby ensuring that the Bluetooth protocol layer can obtain valid data results based on the received AT commands.

[0100] like Figure 8 The diagram shown is a flowchart of the data communication method provided by the present invention, which may include:

[0101] 801. Receive the AT command sent by the application layer using the first security layer, and encrypt the AT command to obtain the encrypted AT command.

[0102] 802. Use the second security layer to decrypt the encrypted AT command to obtain the AT command.

[0103] 803. Use the Bluetooth protocol layer to determine the data result based on the AT command.

[0104] It should be noted that steps 801-803 and Figure 6 Steps 601-603 are similar and will not be described in detail here.

[0105] 804. Use the second security layer to encrypt the data results to obtain encrypted data results.

[0106] 805. Use the first security layer to decrypt the encrypted data result to obtain the data result.

[0107] 806. Utilize the application layer to execute the corresponding AT command based on the data results.

[0108] In some embodiments, the application layer may execute the operation corresponding to the AT command based on the data result. This may include: when the data result matches the AT command, the application layer may execute the operation corresponding to the AT command based on the data result.

[0109] In this embodiment of the invention, a first security layer receives AT commands sent by the application layer and encrypts them to obtain encrypted AT commands; a second security layer decrypts the encrypted AT commands to obtain the AT commands; the Bluetooth protocol layer determines the data result based on the AT commands; the second security layer encrypts the data result to obtain encrypted data results; the first security layer decrypts the encrypted data results to obtain the data results; and the application layer executes the operation corresponding to the AT commands based on the data results. This method utilizes both the first and second security layers to improve the transmission security of AT commands, effectively ensuring that the AT commands are not easily intercepted by other devices during transmission. This ensures that the Bluetooth protocol layer can obtain valid data results based on the received AT commands. Furthermore, it improves the transmission security of the data results, effectively ensuring that the data results corresponding to the AT commands are not easily intercepted by other devices during transmission. This ensures that the application layer 103 can effectively execute the operation corresponding to the AT commands based on the data results. In other words, since all communication data can be encrypted and decrypted throughout the entire data communication process, the transmission security of all communication data can be effectively guaranteed.

[0110] like Figure 9 The diagram shows the structure of a Bluetooth device provided by this invention. The Bluetooth device may include a processor 910, a communications interface 920, a memory 930, and a communication bus 940. The processor 910, communications interface 920, and memory 930 communicate with each other via the communication bus 940. The processor 910 can call logical instructions in the memory 930 to execute a data communication method. This method includes: receiving an AT command sent by the application layer using a first security layer and encrypting the AT command to obtain an encrypted AT command; decrypting the encrypted AT command using a second security layer to obtain the AT command; and determining the data result based on the AT command using the Bluetooth protocol layer.

[0111] Furthermore, the logical instructions in the aforementioned memory 930 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0112] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the data communication method provided by the above methods. The method includes: receiving an AT command sent by an application layer using a first security layer and encrypting the AT command to obtain an encrypted AT command; decrypting the encrypted AT command using a second security layer to obtain the AT command; and determining a data result based on the AT command using a Bluetooth protocol layer.

[0113] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the data communication method provided by the above methods. The method includes: receiving an AT command sent by an application layer using a first security layer, and encrypting the AT command to obtain an encrypted AT command; decrypting the encrypted AT command using a second security layer to obtain the AT command; and determining a data result based on the AT command using a Bluetooth protocol layer.

[0114] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0115] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data communication device, characterized in that, include: First security layer, second security layer, application layer and Bluetooth protocol layer; The first security layer is used to receive AT commands sent by the application layer and encrypt the AT commands to obtain encrypted AT commands; The second security layer is used to decrypt the encrypted AT command to obtain the AT command; The Bluetooth protocol layer is used to determine the data result based on the AT command; The second security layer is also used to encrypt the data result to obtain an encrypted data result; The first security layer is also used to decrypt the encrypted data result to obtain the data result; The application layer is used to execute the operation corresponding to the AT command based on the data result; The data communication device also includes an AT adapter layer; The AT adaptation layer is used to receive the AT command sent by the second security layer, parse the AT command, and call the interface function of the Bluetooth protocol layer. The Bluetooth protocol layer is specifically used to determine the data result based on the interface function and the AT command.

2. The apparatus according to claim 1, characterized in that, The first security layer is specifically used to send the encrypted AT command to the second security layer via an asynchronous transceiver UART.

3. The apparatus according to claim 1, characterized in that, The AT adaptation layer is also used to receive the data result sent by the Bluetooth protocol layer and send the data result to the second security layer.

4. The apparatus according to claim 1 or 2, characterized in that, The application layer is specifically used to execute the operation corresponding to the AT command based on the data result when the data result matches the AT command.

5. A data communication method, characterized in that, The method, applied to the data communication apparatus according to any one of claims 1-4, comprises: The first security layer receives the AT command sent by the application layer and encrypts the AT command to obtain the encrypted AT command. The encrypted AT command is decrypted using the second security layer to obtain the AT command. The data result is determined using the Bluetooth protocol layer based on the AT command; The data result is encrypted using the second security layer to obtain an encrypted data result; The encrypted data result is decrypted using the first security layer to obtain the data result; The application layer executes the operation corresponding to the AT command based on the data result. The AT adaptation layer receives the AT command sent by the second security layer, parses the AT command, and calls the interface function of the Bluetooth protocol layer. The data result is determined using the Bluetooth protocol layer based on the interface function and the AT command.

6. A Bluetooth device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the data communication method as described in claim 5.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the data communication method as described in claim 5.

8. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the data communication method as described in claim 5.

Citation Information

Patent Citations

  • Method and terminal for providing Bluetooth function for computer

    CN101634976A

  • Bluetooth communication realization method by means of AT command

    CN105101061A

  • Data transmission method and device, computer equipment and storage medium

    CN114006692A