CN112291772A - Bluetooth device and communication method thereof - Google Patents

Bluetooth device and communication method thereof Download PDF

Info

Publication number
CN112291772A
CN112291772A CN202011600850.7A CN202011600850A CN112291772A CN 112291772 A CN112291772 A CN 112291772A CN 202011600850 A CN202011600850 A CN 202011600850A CN 112291772 A CN112291772 A CN 112291772A
Authority
CN
China
Prior art keywords
bluetooth
bluetooth device
communication terminal
speed communication
connection
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.)
Granted
Application number
CN202011600850.7A
Other languages
Chinese (zh)
Other versions
CN112291772B (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.)
Beijing Vip Infinite Intelligent Technology Co ltd
Original Assignee
Beijing Vip Infinite Intelligent 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 Beijing Vip Infinite Intelligent Technology Co ltd filed Critical Beijing Vip Infinite Intelligent Technology Co ltd
Priority to CN202011600850.7A priority Critical patent/CN112291772B/en
Publication of CN112291772A publication Critical patent/CN112291772A/en
Application granted granted Critical
Publication of CN112291772B publication Critical patent/CN112291772B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Landscapes

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

Abstract

The invention discloses a communication method of a Bluetooth device, which comprises the following steps: the Bluetooth device starts timing when a new frame period comes; the Bluetooth device judges whether the pairing time is finished; if the pairing time is not finished and the paired high-speed communication terminal is found, the Bluetooth device is used as a main device to actively pair the high-speed communication terminal; and if the pairing time is over, the Bluetooth device serves as a slave device to find the high-speed communication terminal which is not paired, and Bluetooth pairing is completed, wherein the transmission rate of the high-speed communication terminal is greater than that of the Bluetooth device. The invention reduces the cost, improves the transaction speed, has good user experience and can also keep the transaction security.

Description

Bluetooth device and communication method thereof
Technical Field
The invention relates to a Bluetooth device and a communication method thereof, belonging to the technical field of wireless communication.
Background
The bluetooth POS is one Of (Point Of services terminal) mobile POS, and can perform financial payment for consumed goods or services by connecting bluetooth with a mobile phone APP. The payment process is as follows: after the bank card is inserted into the Bluetooth POS machine, the Bluetooth POS machine supplies power to a sim chip on the bank card, and then after communication is successful according to a certain protocol, a password and a transaction amount are required to be input; after the password and the transaction amount are determined, the Bluetooth POS machine transmits data to the mobile phone through the Bluetooth module, and the mobile phone app calls a wireless communication network (such as 4G) on the mobile phone to communicate with the background server; at the moment, the background server can identify the information of the merchant where the transaction is located according to the amount and the position of the card swiping and the ID information of the Bluetooth POS machine, then the server communicates with the UnionPay through a special protocol in a unified mode, and the UnionPay pays money if the information is determined to be free of problems.
The following problems exist in this transaction process. Firstly, the Bluetooth POS machine uses a 2G/4G module to connect with a network and carry out payment operation with a server to complete a transaction flow. However, in a 2G/4G module special occasion, the network is poor or communication cannot be performed (in a basement, a mall, a parking lot and other places with weak signals), or the communication speed is low, so that the communication between the mobile terminal and the server is slow, the payment process time is long, and the experience is influenced.
Chinese patent application No. CN111741453A discloses a bluetooth data encapsulation communication method and device. The method comprises the steps of generating a Bluetooth data packet through TCP encapsulation and BNEP encapsulation; initiating a BNEP connection request according to the Bluetooth data packet, and establishing BNEP connection with the first terminal as a main device; and calling the mobile communication module of the first terminal through BNEP connection, and sending the transaction information and the user card swiping information packaged by TCP in the Bluetooth data package to a background through the Internet.
The chinese patent application CN111815315A discloses a method for implementing connection payment between code scanning bluetooth POS terminal and server side through BNEP protocol. According to the method, through the BNEP method, a user can realize the connection between the background server and the code scanning Bluetooth POS terminal only by connecting the mobile equipment with a network under the condition that the POS APP is not installed on the mobile equipment of the user, and the transaction payment of the user is completed.
Therefore, existing Bluetooth POS devices are connected to a mobile terminal (e.g., a mobile phone) by using a BNEP (Bluetooth Network Encapsulation Protocol) Protocol, so as to implement a method for information interaction with a background server.
In addition, the most widely used connection technology in the intelligent wearable terminal is bluetooth with low power consumption. The intelligent wearable terminal transmits the collected data (such as movement data like heart rate or human body sign data like body temperature and humidity) by using a Bluetooth protocol. The data volume of the data is much smaller than that of voice communication or internet and the like, and the cost is too high by adopting transmission such as WIFI and the like.
Disclosure of Invention
The invention provides a Bluetooth communication method.
Another technical problem to be solved by the present invention is to provide a bluetooth device.
In order to achieve the technical purpose, the invention adopts the following technical scheme:
a communication method of a bluetooth device for connecting the bluetooth device to the internet through a high-speed communication terminal, characterized by comprising the steps of:
the Bluetooth device starts timing when a new frame period comes;
the Bluetooth device judges whether the pairing time is finished;
if the pairing time is not finished and the paired high-speed communication terminal is found, the Bluetooth device is used as a main device to actively pair the high-speed communication terminal; if the pairing time is over, the Bluetooth device serves as a slave device to find the high-speed communication terminal which is not paired, and completes Bluetooth pairing,
the transmission rate of the high-speed communication terminal is greater than that of the bluetooth device.
Preferably, the bluetooth device is used as a master device, establishes a PANU service channel with the high-speed communication terminal by using the stored slave device address, and establishes network connection with the background server.
Preferably, after the bluetooth device is used as a slave device to find a high-speed communication terminal which is not paired, the bluetooth device judges whether the high-speed communication terminal has an android operating system or an iOS operating system, and then establishes a PANU service channel with a high-speed communication terminal channel to complete bluetooth pairing.
Preferably, if the high-speed communication terminal has an android operating system, the bluetooth device disconnects the link layer connection, then switches to the master device, and establishes a PANU connection with the high-speed communication terminal.
Preferably, the bluetooth device receives an event indicating disconnection, and determines that the high-speed communication terminal has an android operating system.
Preferably, the error code 0x13 is carried in the event of a disconnect.
Preferably, if the high-speed communication terminal has an iOS operating system, the bluetooth device disconnects NAP connection, then switches to the master, and establishes PANU connection with the high-speed communication terminal.
Preferably, the bluetooth device determines that the high-speed communication terminal has the iOS operating system through a connection process of the NAP service and the role of the bluetooth device in the service is 'slave end to which connection is established'.
Preferably, the bluetooth device determines that the high-speed communication terminal has the iOS operating system through the received Role Discovery command 0x 0009.
Preferably, the bluetooth device is a bluetooth POS machine, which is internally provided with a low-speed communication module and transmits the positioning information through the low-speed communication module.
A bluetooth device comprising a processor and a memory, wherein the memory has instructions stored therein for performing the aforementioned communication method.
A storage medium having stored thereon instructions for executing the aforementioned communication method.
The invention has the following technical effects: the Bluetooth connection is successfully carried out in a user-insensitive mode, complex operation of using app is omitted, and rapid data transmission can be obtained even if a low-speed 2G/4G module is used, so that the cost is reduced, and the transmission speed is improved.
Drawings
FIG. 1 is a schematic circuit block diagram of a Bluetooth POS machine according to the present invention;
FIG. 2 is an architecture diagram of a Personal Area Network (PAN) specified by the Bluetooth standard;
FIG. 3 is a schematic overall flow chart of the communication method of the present invention;
FIG. 4 is a schematic time slot diagram of the Bluetooth device performing time-sharing pairing according to the present invention;
FIG. 5 is a flow chart of the connection between the Bluetooth POS machine and the high-speed communication terminal with the android operating system;
FIG. 6 is a flow chart of the connection of the Bluetooth POS machine of the present invention with a high-speed communication terminal having an iOS operating system.
Detailed Description
The technical contents of the invention are described in detail below with reference to the accompanying drawings and specific embodiments.
The invention is suitable for the scene that low-speed Bluetooth devices (such as a Bluetooth POS machine and intelligent wearable equipment with a Bluetooth function) are connected with the Internet through high-speed communication terminals with the Bluetooth function (such as a mobile phone and a computer with the Bluetooth function), and breaks through the technical bottleneck of low communication speed of the low-speed Bluetooth devices. The invention is suitable for scenes of transmitting larger data through a Bluetooth protocol, is not only suitable for scenes of payment transaction, but also suitable for scenes of fingerprint identification, code scanning identification, physical sign data transmission and the like by using a low-speed Bluetooth device. Here, the low-speed bluetooth device means that the transmission speed is not high enough in a specific application scene (for example, a scene with a poor signal such as a basement or a suburban scene) although the bluetooth function is provided, or the transmission speed is not high due to the poor quality of the 4G module of the bluetooth device. The transmission speed is not high, which means that the transmission speed is lower than that of a high-speed communication terminal near the bluetooth device. In other words, the bluetooth apparatus cannot realize high-speed transmission (may be limited by the transmission environment or may be limited by the structure of the bluetooth apparatus), so the present invention is applicable to the case of realizing high-speed transmission by a nearby high-speed transmission apparatus. Therefore, the invention can give full play to the advantage of low cost of the Bluetooth module and avoid the disadvantage that the transmission speed of the Bluetooth module is not fast enough.
The bluetooth communication method of the present invention will be described below using a bluetooth POS device as a representative of a low-speed bluetooth device.
Even if the Bluetooth POS machine uses a cheap 2G/4G module, the communication quality is low, particularly, rapid card swiping transaction cannot be supported in an area with insufficient 2G/4G signals, the Bluetooth POS machine can rapidly interact with transaction information of an android mobile phone, an apple mobile phone and the like by adopting the method provided by the invention, and meanwhile, information with large data volume such as an electric sign can be interacted, so that the transaction can be completed within a few seconds. Moreover, by adopting the method of the invention, the APP for the card swiping transaction does not need to be installed on a mobile phone. In addition, the invention is initiated and completed by the Bluetooth POS machine, the user only needs to click once on the mobile phone to indicate that the user agrees to the transaction (avoiding the transaction generated under the condition that the user does not know) in the whole transaction process, and the user does not need to perform other operations, so the invention is a user-friendly design.
As shown in FIG. 1, the Bluetooth POS machine of the invention comprises a 2G/4G module 1, a security module 2, a Bluetooth module 3 and a payment identification module 4 which are communicated through a serial port. Further, the system includes a processor 5 and a memory 6 (not shown), and also communicates via a serial port. The processor 5 is connected with the 2G/4G module 1, the security module 2, the Bluetooth module 3, the payment identification module 4 and the memory 6. And the processor 5 calls instructions from the memory 6 to control the corresponding modules (2G/4G module 1, security module 2, Bluetooth module 3, payment identification module 4) to execute the payment method of the invention. In fig. 1, the bluetooth POS machine of the present invention directly connects a background server with a 2G/4G module to report the location of the bluetooth POS machine, and connects a high-speed communication terminal (mobile phone) with the bluetooth module via a bluetooth connection, and the mobile phone performs information interaction with the background server by using a connection such as 4G/5G/WIFI, so as to complete transaction payment. The bluetooth POS directly connecting the 2G/4G module to the background server to report the location of the bluetooth POS is a conventional technology, and is not described in detail herein. The 2G/4G module can also be other communication protocol modules, and is not limited by the invention. Here, the bluetooth POS is an electronic tag POS that needs to transmit a large amount of electronic tag data, but this does not constitute a limitation of the present invention. In addition, the bluetooth chip can be externally hung on the security chip or other modules, and is not limited to the structure shown in the figure.
As shown in fig. 2, the BNEP protocol provides an IP layer like an internet interface for bluetooth devices, and is interposed between the IP layer and the L2CAP in the bluetooth protocol stack. In the PAN model, BNEP is equivalent to a network interface layer in a TCP/IP layer, and is responsible for forwarding data transmitted from an IP layer to a bluetooth L2CAP layer, receiving data from the L2CAP layer, and completing mapping from the IP layer to the L2CAP layer by BNEP. A BNEP connection can only be established if a PANU service channel is established. The Bluetooth device supporting NAP service uses BNEP Bluetooth network encapsulation protocol when data interaction is carried out between the Bluetooth device supporting NAP service and the Bluetooth device supporting PANU service through NAP service. Furthermore, a bluetooth device with NAP services can connect external networks of different network media (internet packets are exchanged by a bridging mechanism or a routing mechanism).
Suppose that the bluetooth modules of the mobile phone and the bluetooth POS machine are both turned on, the mobile phone end turns on the bluetooth network sharing switch, and the bluetooth POS machine has acquired the base station and its location information using 2G/4G. This provides conditions for conducting transactions. Then, as shown in fig. 3, the payment method of the present invention includes the steps of:
s1, a new frame period comes, and timing is started
In connection with fig. 4, the processor 5 starts timing at the beginning of each frame period (7 seconds). And the Bluetooth protocol is utilized to carry out high-intensity signal communication with the high-speed communication terminal.
S2, whether the pairing time is over or not
The pairing time is the first 4 seconds in each frame period for the bluetooth module 3 to perform automatic pairing. The automatic pairing means that the processor 5 of the bluetooth POS actively initiates a bluetooth connection with a high-speed communication terminal (such as a mobile phone, a PAD, or a device with a high-quality communication module such as 4G/5G/WIFI) stored in the memory 6 by using an address and a secret key of the high-speed communication terminal through the bluetooth module 3. In the present embodiment, 4 seconds is taken as an example, the duration of the pairing time is not limited, and may be shortened, for example, to 3 seconds in advance as needed. This is because the time to compute the intermediate value between the key and the mutual key is eliminated because there is already a common known key, which is a fast, high-speed concatenation process. Of course, the pairing time may also be increased, for example, 5 seconds, and the like, and this time period does not limit the present invention.
The processor 5 determines from the clock information whether the pairing time is over, i.e. currently within the first 4 seconds of the frame. If the pairing time is still within the pairing time and the paired mobile phone is found, the step S3 is entered. If no paired handset is found within the pairing time, the broadcast process continues until the pairing time is over. If the pairing time has exceeded, i.e., the first 4 seconds, the process proceeds to step S4.
S3, the master device is used for actively matching the slave devices with the matching information to complete matching
The Bluetooth POS machine is used as a master device (master mode), and is actively connected with paired slave devices (mobile phones and the like) every 625 microseconds to realize the pairing between the master device and the paired slave devices. This is conventional and will not be described in detail here.
If there is no stored pairing information in the memory, i.e. the bluetooth POS machine is a new machine, or the paired host device (mobile phone) is not in the bluetooth communication range, after the pairing time is over, directly proceed to step S6.
S4, as a master device, establishing a PANU service channel with the slave device by using the stored slave device address
In the pairing time, the bluetooth POS machine is used as a master device and is paired with a paired slave device (mobile phone), so that the address of the slave device and a corresponding secret key are already stored in the memory 6 of the bluetooth POS machine, after the bluetooth pairing is completed, the processor 5 can directly call the address of the slave device, actively connect the slave device, and then establish a PANU service channel with the device by using the secret key.
S5, as a master device, establishing Internet connection by using the slave device to complete the transaction
When the bluetooth POS machine as the PANU end finds a suitable NAP service (which can forward internet packets) in the radio frequency range, it will perform NAP role connection with the mobile phone (paired mobile phone). Once the connection is created, the bluetooth POS, which is the PANU side, will create an L2CAP link for BNEP and use BNEP control commands to initialize the BENP connection and set up filtering of different network packet types, etc. Moreover, at this time, after the bluetooth POS machine as the PANU end has acquired the IP address of the NAP (e.g., mobile phone), when the bluetooth POS machine as the PANU end moves from one NAP to another NAP (i.e., meets another paired mobile phone), the current IP address is still valid.
Then, based on the aforementioned BNEP protocol and LwIP protocol, the two protocol stacks are put together and called through the code interface, and a DHCP connection is established. Based on a Dynamic Host Configuration Protocol (DHCP), the IP address allocated to the bluetooth POS is obtained from the background server. Then, the domain name of the payment end needs to be analyzed, the IP address of the payment end is analyzed, and the IP address of the payment end is connected to a server of the payment end, so that a TCP communication pipeline (a link layer is Bluetooth, and a network layer is TCP) is built. Thus, an internet network connection can be established with the background server to trigger the transaction. If the IP address of the background server is obtained before, the IP address of the server can be directly used for Internet network connection without resolving the domain name.
After the transaction is finished, the Bluetooth POS machine and the mobile phone keep Bluetooth connection, if no one operates within a period of time (for example, 5 minutes), the Bluetooth POS machine is disconnected, and then the Bluetooth POS machine enters a power-off state (automatic power-off). Alternatively, the bluetooth connection is disconnected due to the mobile phone being disconnected, or the user actively disconnecting the bluetooth connection through the bluetooth POS, and if the bluetooth connection is disconnected, the process returns to step S1. If there is an operation on the bluetooth POS, the new transaction continues until the transaction is over.
S6, discovering a new high-speed communication terminal as a slave device and completing Bluetooth pairing
The Bluetooth POS machine of the invention is used as a slave device (slave mode) to discover a new Bluetooth device to complete Bluetooth pairing after the pairing time is finished in one frame period. This is conventional and will not be described in detail here.
S7, storing the IP address and the secret key of the high-speed communication terminal
The Bluetooth POS machine is used as a slave device, is set to a slave mode and is in a discoverable state and can be scanned by the mobile phone. Then, after the mobile phone finds the Bluetooth POS machine, the Bluetooth POS machine establishes a bottom link layer connection with the mobile phone, and Bluetooth pairing is completed. Then, the bluetooth POS machine stores the acquired IP address and pairing key of the android phone in the memory 6. Further, the bluetooth POS registers one NAP service and the PANU service using the bluetooth module 3 to register two services.
S8, judging whether the slave equipment is an android operating system or an iOS operating system
If the high-speed communication terminal is an android mobile phone, the security mechanism of the android mobile phone is defaulted to the use permission of the Bluetooth module required by using the Bluetooth module, but the android mobile phone does not have the APP, so that the Bluetooth module cannot be authorized to be used. Thus, the android handset disconnects the link layer connection without authorization. However, if the high-speed communication terminal is an apple handset, NAP connection may be established due to its different security mechanism.
The following describes in detail how the bluetooth POS machine of the present invention distinguishes the high-speed communication terminal of the android operating system or the iOS operating system by using the payment method of the present invention, and establishes the PANU service channel by using different connection methods, with reference to fig. 3 to 6.
The case where bluetooth pairing with a bluetooth POS machine has been completed is discussed first for an android phone. As shown in fig. 5, after the mobile payment POS terminal, i.e. the bluetooth POS machine, successfully connects with the bluetooth of the android mobile phone, the android mobile phone receives the reply service from the bluetooth POS machine by reading the slave service, and finds that there is the NAP service in the service of the bluetooth POS machine. Due to the safety mechanism of the android mobile phone, on the premise that the android mobile phone is not provided with the APP, the android mobile phone can be actively disconnected from the link layer of the Bluetooth POS machine.
The bluetooth POS machine finds that the link connection has been directly disconnected by the android phone, determines that it is a mobile phone of the android system connected thereto, and then proceeds to the next step S9. Specifically, after the mobile phone actively disconnects the bluetooth connection, the bluetooth POS terminal receives an event indicating the disconnection, where the event carries an error code 0x13 indicating the reason of the disconnection, and according to the event and the reason code, the bluetooth POS terminal can determine that the mobile phone with the android operating system is actively disconnected. Once it is determined to be a cell phone with an android operating system, the next step S9 is entered.
On the contrary, as shown in fig. 6, when the apple phone is paired with the bluetooth POS machine via bluetooth, the apple phone reads the slave service and receives the reply service from the bluetooth POS machine, and finds that there is a NAP service in the bluetooth POS machine service, and then connects to the L2CAP channel and establishes NAP connection with the NAP service. The mobile phone discovers NAP service of the Bluetooth POS machine and establishes connection through the NAP service, and the Bluetooth POS machine end knows that the mobile phone is established with NAP service connection through a 'Role Discovery' instruction 0x0009 and is a slave end. Therefore, the bluetooth POS machine can judge that the mobile phone with the iOS operating system establishes connection with the mobile phone through the connection process of NAP service and the role of the bluetooth POS machine in the service is 'connected slave end'.
Once the bluetooth POS detects that the self-service NAP service is connected, it determines that the apple phone is connected thereto, and then proceeds to the next step S9.
S9, disconnecting link layer connection or NAP connection
If the Bluetooth POS machine finds that the main equipment connected with the Bluetooth POS machine is an android mobile phone, the link layer connection of the bottom layer is actively disconnected; if the mobile phone is the apple mobile phone, the NAP connection is actively disconnected, but the connection of a link layer is not disconnected.
S10, switching to a master device and establishing a PANU connection with a slave device
After the link layer of disconnection and android mobile phone is connected, the bluetooth POS machine can switch the role rapidly as master equipment, uses the stored mobile phone IP address and bluetooth pairing key to actively return to the android mobile phone, and can actively read the NAP service of the mobile phone after connecting the android mobile phone, and starts the DHCP function to distribute IP addresses and other operations. Therefore, the method can quickly establish the service connection of the PANU and trigger the internet surfing function.
After the link layer of disconnection and android mobile phone is connected, utilize automatic function of connecting back to establish again and connect, saved and opened the cell-phone app before, initiatively search the bluetooth equipment name, click equipment initiative again and connect the process of pairing, so the time of practicing thrift has 5~8 s. After the NAP service connection of the apple mobile phone is disconnected, the Bluetooth POS machine can actively read the service of the apple mobile phone, quickly establish the service connection of the PANU, trigger the internet access function, save two operations of disconnecting the Bluetooth bottom link and then connecting the Bluetooth bottom link back, and save about 5-10 s of time. Therefore, the invention optimizes the user experience and important test indexes.
S11, establishing Internet connection to complete transaction
Because the Bluetooth POS machine is the main equipment at the moment, after NAP service connection is established, the Bluetooth POS machine uses a DHCP protocol to distribute the IP address of the Bluetooth POS machine through Bluetooth connection; and performing domain name resolution by using the domain name of the server transmitted by the DNS resolution application to resolve the IP address of the background server. Then, the Bluetooth POS machine uses the analyzed background server IP address to connect to the mobile phone through Bluetooth, and establishes TCP connection with the server through the mobile phone.
And then, carrying out password and signature authentication, inputting the amount of money and triggering a transaction process to start. The user can acquire encrypted information required for payment by using a contact type (IC card type, magnetic head type), a non-contact type (NFC type/scanning payment code type), or the like. The Bluetooth POS machine uses TCP, checks and identifies data with the background server through Bluetooth connection, and after the electronic signature of a user is obtained, the electronic signature and the encryption key are transmitted to the background server (the position information of the Bluetooth POS machine is transmitted to the background server through the 2G/4G communication mode through the 2G/4G module 1), and the transaction is completed.
S12: keep bluetooth connected until disconnection
After completing a transaction, the bluetooth POS machine and the mobile phone continue to maintain the bluetooth connection, and if the connection between the bluetooth POS machine and the mobile phone is disconnected due to various reasons, the process returns to step S1. If there is an operation on the bluetooth POS, the new transaction continues until the transaction is over.
Furthermore, since the IP address and the bluetooth pairing key of the high-speed communication terminal are already obtained in step S7 during the transaction, the bluetooth POS uses the stored pairing address and pairing key to connect back to the high-speed communication terminal directly in the master mode during the pairing time of one frame when payment is required next time (step S3). Thus, the transaction speed is faster.
The POS machine and the payment method have the following advantages:
1. the equipment cost is low. The invention uses the design of combining the 2G/4G module and the Bluetooth module, can be suitable for the conventional cheap POS machine with the Bluetooth and the 2G module, has low performance requirement on the 2G/4G module, and can adopt the cheap 2G/4G module. In addition, the invention only needs to adopt the Bluetooth module with the version of more than 4.0, usually less than 40 yuan, and less than 200 yuan of WIFI module. This reduces the equipment cost of the POS machine as a whole.
2. Meets the requirement of safety. The invention utilizes the cheap 2G/4G module carried by the POS machine to position the position of the POS machine, thereby meeting the requirements of a regulatory agency.
3. The transmission speed is improved, and the transaction efficiency is improved. The invention actively pairs the paired slave devices and the unpaired slave devices in a time-sharing mode in one frame. The method solves the problem that the mobile phone can be connected back and can be connected back by the mobile phone at the same time, the mobile phone is automatically connected back when being started, the connection is successfully carried out in a mode that a user feels no, and the processes of installing the app, opening the app, clicking for searching, clicking for connecting and the like are omitted. Therefore, the user experience is better, and the transaction speed is fast. In addition, the mobile phone of the android operating system and the mobile phone of the iOS operating system are distinguished through the PANU service, and different connection processes are adopted, so that the transaction speed is further improved. When the Bluetooth POS machine is adopted to carry out card swiping transaction, the whole transaction process (excluding the user signature time) of each time is reduced from about 30 seconds to only a few seconds, and the transmission rate reaches 100K/s and exceeds the 2G transmission rate with poor signals.
Similarly, if the intelligent wearable terminal utilizes the bluetooth communication method of the present invention, the high-speed communication terminal (usually a mobile phone or a tablet computer of a user of the intelligent wearable terminal) having a bluetooth module nearby can be quickly connected by using a time-sharing pairing technology under the condition that the intelligent wearable terminal does not have a 3G/4G/5G communication module, or under the condition that the communication quality of the 3G/4G/5G communication module built in the intelligent wearable terminal is not good enough. Furthermore, if the mobile phone or the tablet computer uses an android operating system or an iOS operating system, the terminal of the operating system can be automatically identified by adopting the Bluetooth communication method of the invention, and different methods are adopted to establish connection, so that the intelligent wearable terminal can be connected with the Internet by means of the high-speed communication terminal.
The present invention has been described in detail. It will be apparent to those skilled in the art that any obvious modifications thereof can be made without departing from the spirit of the invention, which infringes the patent right of the invention and bears the corresponding legal responsibility.

Claims (12)

1. A communication method of a bluetooth device for connecting the bluetooth device to the internet through a high-speed communication terminal, characterized by comprising the steps of:
the Bluetooth device starts timing when a new frame period comes;
the Bluetooth device judges whether the pairing time is finished;
if the pairing time is not finished and the paired high-speed communication terminal is found, the Bluetooth device is used as a main device to actively pair the high-speed communication terminal; if the pairing time is over, the Bluetooth device serves as a slave device to find the high-speed communication terminal which is not paired, and completes Bluetooth pairing,
and the transmission rate of the high-speed communication terminal is greater than that of the Bluetooth device.
2. The communication method of claim 1, wherein:
the Bluetooth device is used as a master device, establishes a PANU service channel with the high-speed communication terminal by using the stored slave device address, and establishes network connection with a background server.
3. The communication method according to claim 1 or 2, characterized by:
after the Bluetooth device serves as a slave device to find the high-speed communication terminal which is not paired, the Bluetooth device judges whether the high-speed communication terminal has an android operating system or an iOS operating system, and then a PANU service channel is established with the high-speed communication terminal channel.
4. The communication method of claim 3, wherein:
and if the high-speed communication terminal has an android operating system, the Bluetooth device disconnects the link layer connection, then switches to the main equipment, and establishes a PANU connection with the high-speed communication terminal.
5. The communication method of claim 4, wherein:
and the Bluetooth device judges that the high-speed communication terminal has an android operating system after receiving the event representing disconnection.
6. The communication method of claim 5, wherein:
the event indicating a disconnection carries an error code 0x 13.
7. The communication method of claim 3, wherein:
if the high-speed communication terminal has the iOS operating system, the Bluetooth device disconnects NAP connection, then switches to the master device, and establishes PANU connection with the high-speed communication terminal.
8. The communication method of claim 7, wherein:
the Bluetooth device judges that the high-speed communication terminal has an iOS operating system through a connection process of NAP service and the role of the Bluetooth device in the service is 'slave end to which connection is established'.
9. The communication method of claim 8, wherein:
the bluetooth device judges that the high-speed communication terminal has the iOS operating system through the received Role Discovery command 0x 0009.
10. The communication method of claim 9, wherein:
the Bluetooth device is a Bluetooth POS machine, a low-speed communication module is arranged in the Bluetooth device, and positioning information is sent through the low-speed communication module.
11. A bluetooth device comprising a processor, a memory, wherein the memory has stored therein instructions for performing the method of communication of any one of claims 1-9.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the communication method according to any one of claims 1 to 9.
CN202011600850.7A 2020-12-30 2020-12-30 Bluetooth device and communication method thereof Active CN112291772B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011600850.7A CN112291772B (en) 2020-12-30 2020-12-30 Bluetooth device and communication method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011600850.7A CN112291772B (en) 2020-12-30 2020-12-30 Bluetooth device and communication method thereof

Publications (2)

Publication Number Publication Date
CN112291772A true CN112291772A (en) 2021-01-29
CN112291772B CN112291772B (en) 2021-03-30

Family

ID=74426673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011600850.7A Active CN112291772B (en) 2020-12-30 2020-12-30 Bluetooth device and communication method thereof

Country Status (1)

Country Link
CN (1) CN112291772B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020190128A1 (en) * 2001-06-18 2002-12-19 Adam Levine Scanner pairing in a bluetooth POS network
US20160328701A1 (en) * 2013-12-31 2016-11-10 Dohoon Lee Mobile point of sale system for reverse settlement, and method thereof
CN107172717A (en) * 2016-03-08 2017-09-15 普天信息技术有限公司 The mutual searching method of bluetooth equipment and its bluetooth equipment
CN111106853A (en) * 2019-10-08 2020-05-05 珠海市杰理科技股份有限公司 Master-slave switching method, device and equipment for double wireless Bluetooth equipment and audio system
US20200244304A1 (en) * 2019-01-30 2020-07-30 Mediatek Inc. Wireless communication apparatus for performing beamforming under frequency hopping and associated wireless communication method
CN111741453A (en) * 2020-05-29 2020-10-02 拉卡拉支付股份有限公司 Bluetooth data encapsulation communication method and device
CN112001720A (en) * 2020-07-03 2020-11-27 拉卡拉支付股份有限公司 mPOS machine and data processing method thereof

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020190128A1 (en) * 2001-06-18 2002-12-19 Adam Levine Scanner pairing in a bluetooth POS network
US20160328701A1 (en) * 2013-12-31 2016-11-10 Dohoon Lee Mobile point of sale system for reverse settlement, and method thereof
CN107172717A (en) * 2016-03-08 2017-09-15 普天信息技术有限公司 The mutual searching method of bluetooth equipment and its bluetooth equipment
US20200244304A1 (en) * 2019-01-30 2020-07-30 Mediatek Inc. Wireless communication apparatus for performing beamforming under frequency hopping and associated wireless communication method
CN111106853A (en) * 2019-10-08 2020-05-05 珠海市杰理科技股份有限公司 Master-slave switching method, device and equipment for double wireless Bluetooth equipment and audio system
CN111741453A (en) * 2020-05-29 2020-10-02 拉卡拉支付股份有限公司 Bluetooth data encapsulation communication method and device
CN112001720A (en) * 2020-07-03 2020-11-27 拉卡拉支付股份有限公司 mPOS machine and data processing method thereof

Also Published As

Publication number Publication date
CN112291772B (en) 2021-03-30

Similar Documents

Publication Publication Date Title
US20180310157A1 (en) Near field communication method and mobile terminal
US7076269B2 (en) Radio communication system for notifying incommunicable state, and device and method used for the system
US9246883B2 (en) Subscriber identity module provisioning
US10708744B2 (en) NFC-based communication method and apparatus
KR20010096543A (en) System and method for provisioning or updating a mobile station using over-the-air transfer of interpreted byte-code program
JPWO2002075962A1 (en) Portable information terminal, wireless communication system, and link establishment method
EP4336815A1 (en) Incoming call response method and corresponding terminal and communication system
JP2008011416A (en) Information processing apparatus and control method
CN110870353B (en) WiFi connection method and terminal
US11997484B2 (en) SIM card sharing method and device, communication device and storage medium
CN114868455A (en) User terminal comprising a plurality of subscriber identity modules
CN111132129B (en) SIM card information acquisition device and communication terminal device
CN112291772B (en) Bluetooth device and communication method thereof
KR101809317B1 (en) Method and device for data access
US20120264421A1 (en) Method and equipment for wireless communication
CN115002655A (en) Network switching method and system based on virtual mobile phone
CN111031531B (en) Data transmission method, device, storage medium and terminal
JP2014033409A (en) Information processing apparatus, information processing method, and information processing program
WO2014006011A2 (en) A method for communicating data between a first device and a second device, corresponding second device and system
CN113978412A (en) Automobile noninductive unlocking method and system, computer equipment and storage medium
KR101803972B1 (en) Apparatus having Universal Integrated Circuit card and File registration Method and Peer-to-Peer Transmission Method using the same
JP2003524235A (en) Apparatus and method for supplying goods and / or services, and system to which they are applied
CN106685485B (en) Signal processing method and device based on Near Field Communication (NFC)
CN104902450B (en) The access method and system of mobile terminal card application
CN108848066A (en) A kind of communication means of terminal, terminal and storage medium

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