A method for improving the compatibility of a POS terminal and a mobile terminal dual-mode Bluetooth

By configuring the broadcast flag and reject affiliate protocol of the GATT service, the problem of high failure rate of dual-mode Bluetooth connection between POS terminal and mobile terminal was solved, and a higher connection success rate and compatibility were achieved.

CN114302381BActive Publication Date: 2025-12-05FUJIAN NEWLAND PAYMENT TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111618016.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-12-05
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

In existing technologies, the dual-mode Bluetooth compatibility issues between POS terminals and mobile terminals result in a high failure rate for SPP and GATT service connections and a low pairing success rate, which is especially noticeable when connecting to devices that do not use the standard Bluetooth protocol stack.

Method used

By configuring the broadcast flag of the GATT service to not support classic Bluetooth connection, and by judging and rejecting auxiliary protocols in real time during protocol interaction, the mobile terminal is ensured to connect to the correct service, thus improving the compatibility of dual-mode Bluetooth devices.

Benefits of technology

It improves the success rate and compatibility of dual-mode Bluetooth connection between POS terminals and mobile terminals, reduces the connection failure rate, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114302381B_ABST
    Figure CN114302381B_ABST
Patent Text Reader

Abstract

The application discloses a kind of POS terminal and mobile terminal dual-mode bluetooth compatibility promotion method, specifically includes the following steps: POS terminal is initialized configuration to dual-mode bluetooth module;Mobile terminal searches and discovers POS terminal SPP service or receives GATT service broadcast, initiates the pairing connection request to POS terminal;Pairing connection is carried out, while dual-mode bluetooth module judges whether it is subsidiary protocol in the process of protocol interaction;POS terminal obtains the service connection state of dual-mode bluetooth module;POS terminal enables corresponding service, and is paired with mobile terminal connection;POS terminal and mobile terminal establish data transceiving channel.Broadcaster flag in GATT service is configured, so that it does not support classic bluetooth connection function in the broadcast information, when mobile terminal needs to connect GATT service, it is guaranteed to exclude the possibility of connecting SPP service, in the pairing connection stage, the feedback state of dual-mode bluetooth device is judged in real time, and subsidiary interactive protocol is directly rejected, and the compatibility of POS terminal and mobile terminal dual-mode bluetooth is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of Bluetooth compatibility improvement, and specifically relates to a POS terminal and mobile terminal dual-mode Bluetooth compatibility improvement method. BACKGROUND

[0002] With the development of modern financial payment, more and more consumer scenarios require POS (Point of sales) terminals and mobile terminals to perform short-distance data communication to complete data transmission in the payment process. Bluetooth, as a short-distance wireless communication technology, has the characteristics of stable connection and low cost, and has been widely used in short-distance data communication between POS terminals and mobile terminals. As an open global standard, Bluetooth protocol has developed two relatively mature protocol schemes: classic Bluetooth (before Bluetooth 3.0 version) and low-power Bluetooth (after Bluetooth 4.0 version), among which the Bluetooth protocols suitable for data transmission are the SPP service of classic Bluetooth and the GATT service of low-power Bluetooth. The mainstream operating systems in current mobile terminals are Android OS and IOS, among which the native code of Android OS completely supports the SPP service, and Android 4.3 version and above support the GATT service; IOS 7.0 version and above support the GATT service, and do not directly support the connection of SPP service, which requires POS terminals to additionally use MFI certified Bluetooth modules.

[0003] Therefore, dual-mode Bluetooth devices (simultaneously supporting classic Bluetooth and low-power Bluetooth) have become a standard configuration in POS terminals, which has introduced the problem of dual-mode Bluetooth compatibility with mobile terminals, seriously affecting the user experience, and a method for improving the dual-mode Bluetooth compatibility of POS terminals and mobile terminals is needed.

[0004] In the prior art, there is a method of using a unified dual-mode Bluetooth device mac address to avoid the occurrence of user misconnection using a mobile terminal, but the problem of high abnormal connection rate of SPP and GATT services is not solved, at this time Bluetooth cannot be successfully connected; in the prior art, there is a method of reducing the scanning interval to improve the number of Bluetooth device discoveries in the scanning process, but it does not help to improve the success rate in the connection process.

[0005] The main drawbacks of the existing technology are: (1) The service connection failure rate is high. When the dual-mode Bluetooth device is in the pairing connection state, the GATT service is in the broadcast state. The mobile terminal can search for and obtain the Bluetooth device information contained in the broadcast. If the broadcast flag is configured to support the connection function of classic Bluetooth, the mobile terminal may connect to the SPP service of classic Bluetooth, which will cause the GATT service to fail to connect, thus causing the Bluetooth pairing connection to fail. (2) The pairing connection success rate is low, especially when pairing with devices that do not use the standard Bluetooth protocol stack. Compared with the single-mode device, the protocol stack of the dual-mode Bluetooth device involves more auxiliary protocols. However, considering the use case of Bluetooth data transmission in the payment process, it is not necessary to agree to all interaction protocol requests, such as role switch and sniff mode. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to provide a method for improving the dual-mode Bluetooth compatibility of POS terminals and mobile terminals, addressing the shortcomings of the prior art.

[0007] To address the aforementioned technical problems, the present invention provides a method for improving dual-mode Bluetooth compatibility between POS terminals and mobile terminals, specifically comprising the following steps:

[0008] The POS terminal initializes and configures the dual-mode Bluetooth module;

[0009] The mobile terminal searches for and discovers the POS terminal's SPP service or receives GATT service broadcasts, and initiates a pairing connection request to the POS terminal.

[0010] Pairing and connection are established, and the dual-mode Bluetooth module determines whether it is an auxiliary protocol during the protocol interaction process;

[0011] The POS terminal obtains the service connection status of the dual-mode Bluetooth module;

[0012] The POS terminal activates the corresponding service and is paired and connected with the mobile terminal.

[0013] The POS terminal establishes a data transmission and reception channel with the mobile terminal.

[0014] As one possible implementation, the initialization configuration step of the POS terminal for the dual-mode Bluetooth module further includes: generating the MAC address of the SPP service and writing it into the initialization configuration; wherein, the MAC address of the GATT service is configured with the static attribute and then modified to be the same as the MAC address of the SPP service; the Bluetooth names of the same SPP service and GATT service are set to be the same.

[0015] As a possible implementation, further, the POS terminal initialization configuration step of the dual-mode Bluetooth module includes: GATT service broadcast flag configuration, the binary bits bit1 and bit2 are configured as 1 in the general broadcast mode and the classic Bluetooth connection function is not supported, and the value of the broadcast flag is configured as 6 according to the binary-to-decimal conversion.

[0016] As a possible implementation, further, the mobile terminal searching and discovering the POS terminal SPP service or receiving the GATT service broadcast, initiating the pairing connection request step of the POS terminal specifically includes: the POS terminal SPP service is in a discoverable state, the GATT service is in a state of sending broadcast, and the mobile terminal searches for the Bluetooth of the POS terminal and pairs and connects.

[0017] As a possible implementation, further, the pairing connection is performed, and the dual-mode Bluetooth module judges whether it is an accessory protocol in the process of protocol interaction specifically includes: the dual-mode Bluetooth module analyzes the interaction message, judges whether it is an accessory protocol, if yes, it is rejected, and if not, it is agreed.

[0018] As a possible implementation, further, the POS terminal acquires the service connection state of the dual-mode Bluetooth module specifically includes: the POS terminal judges the service connection feedback state value of the dual-mode Bluetooth module, if it is the service requested by the mobile terminal, it is not processed, if the feedback state value is not the expected state value, the connection is ended, and the connection request is reissued to the dual-mode Bluetooth module.

[0019] As a possible implementation, further, the POS terminal enables the corresponding service and pairs and connects with the mobile terminal specifically includes: the dual-mode Bluetooth module returns a successful service connection state, the POS terminal judges that the correct service connection state is established with the mobile terminal, and the POS terminal closes the discoverability and broadcast of the SPP and GATT service.

[0020] As a possible implementation, further, the POS terminal and the mobile terminal establish a data transceiving channel specifically includes that the POS terminal selects a data transceiving channel to transmit and receive data according to the connected service.

[0021] The above technical scheme has the following beneficial effects:

[0022] The SPP and GATT service connection abnormality rate of the dual-mode Bluetooth module in the prior art is high when pairing with the mobile terminal, and the success rate of pairing connection is low, the broadcast flag in the GATT service is configured, the classic Bluetooth connection function is not supported in the broadcast information, the possibility of connecting the SPP service is excluded when the mobile terminal needs to connect the GATT service, the feedback state of the dual-mode Bluetooth device is judged in real time in the pairing connection stage, and the subsidiary interactive protocol is directly rejected, so that the correctness and success rate of service connection are guaranteed, and the dual-mode Bluetooth compatibility of the POS terminal and the mobile terminal is improved. BRIEF DESCRIPTION OF DRAWINGS

[0023] The application will be described in further detail below with reference to the drawings and specific embodiments:

[0024] Figure 1 It is a schematic diagram of the principle of the application;

[0025] Figure 2 It is a schematic diagram of the configuration principle of the broadcast flag of the application;

[0026] Figure 3 It is a schematic diagram of the search and connection service of the mobile terminal and the POS terminal. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical scheme and advantages of the embodiments of the application clearer, the technical scheme in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application.

[0028] The application provides a method for improving the dual-mode Bluetooth compatibility of a POS terminal and a mobile terminal, as shown in the figure, wherein the method steps include: Figure 1

[0029] Step S1, the POS terminal initializes and configures the dual-mode Bluetooth module, if the initialization and configuration are successful, step S2 is performed, if not, step S1 is continued.

[0030] In specific implementation, a group of mac addresses of SPP services are randomly generated in the application, and are written into the initialization configuration, the mac address of the GATT service is configured as a static attribute, and is modified to be the same as the mac address of the SPP service; similarly, the Bluetooth names of the SPP service and the GATT service are also set the same, so as to ensure the consistency of the POS terminal Bluetooth service to the outside, indirectly improve the discoverability when the mobile terminal searches, and improve the search efficiency.

[0031] Further, the broadcast flag of the GATT service is configured, as shown in the figure Figure 2 ​As shown, the broadcast flag value is configured as 1 for its binary bits bit1 and bit2, i.e. configured as a general broadcast mode and not supporting a classic Bluetooth connection function, according to a binary-to-decimal conversion formula, the broadcast flag value is configured as 6.

[0032] In step S2, when the mobile terminal discovers the POS terminal SPP service or receives a broadcast of the GATT service, a pairing connection request to the POS terminal is initiated.

[0033] In specific implementation, as shown in Figure 3 As shown, after the POS terminal initializes the dual-mode Bluetooth module, the SPP service is in a discoverable state and the GATT service is in a broadcast sending state, and when the mobile terminal searches for other Bluetooth devices, the Bluetooth of the POS terminal can be searched and selected for pairing connection.

[0034] In step S3, the dual-mode Bluetooth module judges whether it is an attached protocol in the process of protocol interaction during the connection.

[0035] In specific implementation, the dual-mode Bluetooth module parses the interaction message to judge whether it is an attached protocol such as role switch and sniff mode, and if so, it is directly rejected, and if not, it is agreed. The direct rejection of the attached protocol can effectively improve the protocol interaction speed in the connection process, and at the same time, prevent the risk of protocol stack collapse in the pairing connection process caused by the mobile terminal not using the standard Bluetooth protocol stack, and improve the connection success rate of the mobile terminal and the POS terminal.

[0036] In step S4, the POS terminal obtains the service connection state of the Bluetooth module at all times.

[0037] In specific implementation, the POS terminal judges the service connection feedback state value of the dual-mode Bluetooth module, and if it is the service requested by the mobile terminal, it is not processed, and if the feedback state value is not the expected state value, the connection is ended and a connection request is reissued to the dual-mode Bluetooth module.

[0038] In step S5, the POS terminal enables the correct service and completes the pairing connection with the mobile terminal.

[0039] In specific implementation, when the dual-mode Bluetooth module returns a successful service connection state, the POS terminal considers that the correct service connection state is established with the mobile terminal, at which time the POS terminal closes the discoverability and broadcast of the SPP and GATT services, and prohibits the search connection of other devices.

[0040] In step S6, the POS terminal and the mobile terminal establish a data receiving and sending channel.

[0041] In the embodiment, the POS terminal selects a data transceiving channel according to the connected service to send and receive data.

[0042] In conclusion, the application provides a method for improving the dual-mode Bluetooth compatibility of the POS terminal and the mobile terminal, which comprises configuring the broadcast flag in the GATT service to make the broadcast information not support the classic Bluetooth connection function, ensuring that the mobile terminal excludes the possibility of connecting the SPP service when it needs to connect the GATT service, judging the feedback state of the dual-mode Bluetooth device in real time during the pairing connection stage, and directly rejecting the accessory interaction protocol, thus ensuring the correctness and success rate of the service connection and improving the dual-mode Bluetooth compatibility of the POS terminal and the mobile terminal.

[0043] The POS terminal is a Bluetooth slave device, and is internally provided with a dual-mode Bluetooth module, which supports the SPP service of the classic Bluetooth and the GATT service of the low-power Bluetooth; the mobile terminal is a Bluetooth master device, and supports the Android OS or the IOS operating system; the method comprises the following steps: first, the POS terminal performs initialization configuration on the dual-mode Bluetooth module, wherein the broadcast flag is configured to not support the connection function of the classic Bluetooth; second, when the mobile terminal as the Bluetooth master device discovers the SPP service of the POS terminal or receives the broadcast of the GATT service, the mobile terminal initiates a pairing connection request to the POS terminal, wherein the Android OS initiates the connection request of the SPP or GATT service, and the IOS initiates the connection request of the GATT service; third, the POS terminal obtains the service connection state of the Bluetooth module at all times during the connection process, judges whether the correct service is connected, and reconnects the requested service if the connection is incorrect; and finally, after the POS terminal uses the correct service, the pairing connection with the mobile terminal is completed, and a data transceiving channel is established.

[0044] In order to solve the problems in the prior art, the application adopts another technical scheme: a method for improving the dual-mode Bluetooth compatibility of a POS terminal and a mobile terminal, wherein the POS terminal is a Bluetooth slave device, is internally provided with a dual-mode Bluetooth module, supports the SPP service of classic Bluetooth and the GATT service of low-power Bluetooth, the mobile terminal is a Bluetooth master device, supports the Android OS or the IOS operating system, and the method comprises the following steps: first, the POS terminal performs initialization configuration on the dual-mode Bluetooth module, wherein the broadcast flag is configured to not support the connection function of classic Bluetooth; second, when the mobile terminal as the Bluetooth master device discovers the SPP service of the POS terminal or receives the broadcast of the GATT service, initiates a pairing connection request for the POS terminal, wherein the Android OS initiates the connection request of the SPP or GATT service, and the IOS initiates the connection request of the GATT service; third, in the connection process, the dual-mode Bluetooth module judges whether it is an accessory protocol in the process of protocol interaction, such as role switch, sniff mode, etc., and directly rejects it if it is, and then performs the interaction of the next protocol; and finally, after the POS terminal enables the correct service, the pairing connection with the mobile terminal is completed, and a data receiving and sending channel is established.

[0045] The above is the embodiment of the application, and according to the teaching of the application, any equivalent change, modification, replacement and transformation made within the patent application range of the application without departing from the principle and spirit of the application shall fall within the scope of the application.

Claims

1. A method for improving the Bluetooth compatibility between a POS terminal and a mobile terminal, characterized in that: Specifically comprising the following steps: The POS terminal initializes and configures the dual-mode Bluetooth module; The mobile terminal searches for and discovers the SPP service of the POS terminal or receives the GATT service broadcast, and initiates a pairing connection request to the POS terminal; The mobile terminal searches for and discovers the SPP service of the POS terminal or receives the GATT service broadcast, and initiates a pairing connection request to the POS terminal; The POS terminal acquires the service connection state of the dual-mode Bluetooth module; The POS terminal enables the corresponding service and pairs with the mobile terminal; The POS terminal establishes a data transmission channel with the mobile terminal.

2. The method of claim 1, wherein the method further comprises: The step of initializing and configuring the dual-mode Bluetooth module by the POS terminal comprises generating a mac address of the SPP service and writing the mac address into the initialization configuration; wherein the mac address of the GATT service is modified to be the same as the mac address of the SPP service after being configured as a static attribute; the Bluetooth names of the same SPP service and GATT service are the same.

3. The method of claim 1, wherein the method further comprises: if the mobile terminal is a Bluetooth compatible terminal, transmitting the Bluetooth compatible data to the POS terminal through the Bluetooth communication module. The step of initializing and configuring the dual-mode Bluetooth module by the POS terminal comprises configuring the broadcast flag of the GATT service, configuring the binary bits bit1 and bit2 of the broadcast flag as 1 to be a general broadcast mode and not support classic Bluetooth connection function, and configuring the value of the broadcast flag as 6 according to the conversion from binary to decimal.

4. The method of claim 1, wherein the method further comprises: receiving a request from the mobile terminal to establish a Bluetooth connection with the POS terminal; and transmitting a response to the request to the mobile terminal, the response indicating that the POS terminal is capable of establishing a Bluetooth connection with the mobile terminal. The step of searching for and discovering the SPP service of the POS terminal or receiving the GATT service broadcast by the mobile terminal, and initiating a pairing connection request to the POS terminal specifically comprises that the SPP service of the POS terminal is in a discoverable state, the GATT service is in a state of sending a broadcast, and the mobile terminal searches for the Bluetooth of the POS terminal and pairs with the Bluetooth.

5. The method of claim 1, wherein the method further comprises: receiving a request from the mobile terminal to establish a Bluetooth connection with the POS terminal; and transmitting a response to the request to the mobile terminal, the response indicating that the POS terminal is capable of establishing a Bluetooth connection with the mobile terminal. The step of acquiring the service connection state of the dual-mode Bluetooth module by the POS terminal specifically comprises that the POS terminal judges the feedback state value of the service connection of the dual-mode Bluetooth module, does not process if the service requested by the mobile terminal, and ends the connection and reissues a connection request to the dual-mode Bluetooth module if the feedback state value is not the expected state value.

6. The method of claim 1, wherein the method further comprises: The step of enabling the corresponding service and pairing with the mobile terminal by the POS terminal specifically comprises that the dual-mode Bluetooth module returns a successful service connection state, the POS terminal judges that the service connection state with the mobile terminal is correct, and the POS terminal closes the discoverability and broadcastability of the SPP and GATT services.

7. The method of claim 1, wherein the method further comprises: receiving a request from the mobile terminal to establish a Bluetooth connection with the POS terminal; and transmitting a response to the request to the mobile terminal, the response indicating that the POS terminal is capable of establishing a Bluetooth connection with the mobile terminal. The step of establishing a data transmission channel by the POS terminal and the mobile terminal specifically comprises that the POS terminal selects a data transmission channel according to the connected service to transmit and receive data.

Citation Information

Patent Citations

  • Bluetooth connection method and device, readable storage medium and mobile equipment

    CN109862549A

  • System and method for realizing terminal product payment based on BNEP Bluetooth

    CN111800766A