CN109831762B - POS data communication method, device, terminal equipment and system - Google Patents

POS data communication method, device, terminal equipment and system Download PDF

Info

Publication number
CN109831762B
CN109831762B CN201811543059.XA CN201811543059A CN109831762B CN 109831762 B CN109831762 B CN 109831762B CN 201811543059 A CN201811543059 A CN 201811543059A CN 109831762 B CN109831762 B CN 109831762B
Authority
CN
China
Prior art keywords
pos terminal
pos
mac address
connection
data communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811543059.XA
Other languages
Chinese (zh)
Other versions
CN109831762A (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.)
Fujian Newland Payment Technology Co ltd
Original Assignee
Fujian Newland Payment 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 Fujian Newland Payment Technology Co ltd filed Critical Fujian Newland Payment Technology Co ltd
Priority to CN201811543059.XA priority Critical patent/CN109831762B/en
Publication of CN109831762A publication Critical patent/CN109831762A/en
Application granted granted Critical
Publication of CN109831762B publication Critical patent/CN109831762B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a POS data communication method, which comprises the following steps: determining whether a POS terminal in a wireless network is connected for the first time; if so, receiving a pairing request from a POS terminal, and establishing connection with the POS terminal based on the pairing request; and if not, reading a pre-stored Mac address corresponding to the POS terminal in a pre-stored list of the Mac address, and establishing connection with the POS terminal according to the pre-stored Mac address. After the POS terminal initiatively initiates the pairing request and successfully pairs once, if the subsequent Bluetooth is required to be reconnected because of disconnection, the paired POS card reader can also automatically connect back to the POS terminal through the Bluetooth without initiating the pairing request again by the POS terminal, thereby solving the trouble that the POS terminal initiates the pairing request for many times.

Description

POS data communication method, device, terminal equipment and system
Technical Field
The present invention relates to the field of communications, and in particular, to a method, an apparatus, a terminal device, and a system for communicating POS data.
Background
With the popularization of mobile payment, a novel POS machine under a mobile payment system is produced. Through the bluetooth establish the communication connection between POS ware of punching the card and POS terminal host computer, be aided with the system that POS terminal host computer APP supported, mobile terminal "intelligent POS" appears in people's sight more and more. Wherein, bluetooth plays more and more not neglectable auxiliary action in intelligent POS uses. However, before bluetooth is used, a POS terminal usually needs to initiate a pairing request actively, and after the two parties are paired successfully, data communication between the POS card reader and the POS terminal can be performed. After the bluetooth connection is disconnected, if the POS card reader needs to continue communication with the POS terminal, the POS terminal must initiate a pairing request again, which may require frequent manual reconnection by the user during use.
Disclosure of Invention
In order to solve the technical problems, the invention provides a POS data communication method, a device, a terminal device and a system, wherein after a POS terminal actively initiates a pairing request and successfully pairs once, if the subsequent Bluetooth is disconnected and needs to be reconnected, the paired POS card reader can also automatically connect back to the POS terminal through the Bluetooth without initiating the pairing request again by the POS terminal, thereby solving the trouble that the POS terminal initiates the pairing request for many times.
More specifically, in a first aspect of the present invention, there is provided a POS data communication method, including:
determining whether a POS terminal in a wireless network is connected for the first time;
if so, receiving a pairing request from a POS terminal, and establishing connection with the POS terminal based on the pairing request;
and if not, reading a pre-stored Mac address corresponding to the POS terminal in a pre-stored list of the Mac address, and establishing connection with the POS terminal according to the pre-stored Mac address.
Further, the step of receiving a pairing request from a POS terminal and establishing a connection with the POS terminal based on the pairing request further includes:
according to the pairing request, confirming the pairing with the POS terminal; the pairing request comprises equipment information and a Mac address of the POS terminal;
writing the equipment information and the Mac address into a pre-stored list of the Mac address;
and establishing connection with the POS terminal.
Further, the step of reading a pre-stored Mac address corresponding to the POS terminal from a pre-stored list of Mac addresses and establishing a connection with the POS terminal according to the pre-stored Mac address includes:
reading a pre-stored Mac address corresponding to the equipment information in the pre-stored list according to the equipment information of the POS terminal;
initiating connection to the POS terminal pointed by the Mac address according to the pre-stored Mac address;
and establishing connection with the POS terminal.
Further, the step of determining whether the POS terminal in the wireless network is connected for the first time includes:
searching a POS terminal in the wireless network, and acquiring equipment information of the POS terminal;
and confirming whether the POS terminal is connected for the first time or not according to the equipment information.
Further, the wireless network is a bluetooth network.
In a second aspect of the present invention, there is provided a POS data communication device, comprising:
the determining module is used for determining whether the POS terminal in the wireless network is connected for the first time;
the connection establishing module is used for receiving a pairing request from a POS terminal when the POS terminal is determined to be connected for the first time, and establishing connection with the POS terminal based on the pairing request; or when the POS terminal is determined not to be connected for the first time, reading a pre-stored Mac address corresponding to the POS terminal from the Mac address pre-stored list, and establishing connection with the POS terminal according to the pre-stored Mac address.
Further, the connection establishing module includes:
the pairing module is used for confirming the pairing with the POS terminal according to the pairing request; wherein the pairing request comprises equipment information and a Mac address of the POS terminal;
and the recording module is used for writing the equipment information and the Mac address into a pre-stored list of the Mac address.
Further, the connection establishing module further includes:
the reading module is used for reading a pre-stored Mac address corresponding to the equipment information in the pre-stored list according to the equipment information of the POS terminal;
and the connection initiating module is used for initiating connection to the POS terminal pointed by the Mac address according to the pre-stored Mac address.
In a third aspect of the present invention, there is provided a terminal device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the data communication method as described in the first aspect of the present invention when executing the computer program.
In a fourth aspect of the present invention, a POS data communication system is provided, which comprises a POS terminal and a POS card reader, wherein the POS card reader comprises a bluetooth base; the POS terminal and the POS card reader establish data communication connection through Bluetooth; the POS card reader executes the data communication method in the first aspect of the invention.
The invention has the advantages that after the POS terminal actively initiates the pairing request and successfully pairs once, if the subsequent Bluetooth is required to be reconnected because of disconnection, the paired POS card reader can also automatically connect back to the POS terminal through the Bluetooth without initiating the pairing request again by the POS terminal, thereby solving the trouble that the POS terminal initiates the pairing request for many times.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating a POS data communication method according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a POS data communication device according to an embodiment of the invention.
Fig. 3 is a schematic structural diagram of a connection establishing module according to an embodiment of the present invention.
Fig. 4 is a diagram illustrating an exemplary flow of a POS data communication method according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic flow chart of a POS data communication method according to an embodiment of the present invention, which includes the following steps:
s1, it is determined whether the POS terminal in the wireless network is connected for the first time.
It is understood that, before the step is performed, the POS card reader and the POS terminal are both in the on state, so that the POS card reader or the POS terminal can be searched in the wireless network. In this embodiment, the POS terminal is in a powered-on state, and the wireless network port thereof is opened, so that the POS card reader can search for the POS terminal in the wireless network. Preferably, in this embodiment, the wireless network is a bluetooth network. Further, after the POS terminal in the wireless network is searched, the POS card reader can acquire the equipment information of the POS terminal according to the searched POS terminal signal. The device information may include a name of the POS terminal, product serial number information, version number information, model number information, and the like. When the POS card reader acquires the equipment information of the POS terminal, any one of the information can be acquired, and multiple kinds of information can be acquired simultaneously. And the POS card reader confirms whether the system has a trace that the POS terminal is connected once or not according to the acquired equipment information. In this embodiment, the POS terminal and the POS card reader perform data communication via bluetooth. In a more preferred embodiment, the bluetooth module is disposed on a bluetooth base, and the bluetooth base is connected with the POS card reader to become a peripheral device of the POS card reader. The POS card reader is in Bluetooth data communication with the POS terminal through the Bluetooth base.
And S2, if the POS terminal is confirmed to be connected for the first time, receiving a pairing request from the POS terminal, and establishing connection with the POS terminal based on the pairing request.
In this embodiment, if no record consistent with the device information of the POS terminal is found in the POS card reader or the bluetooth base, it is determined that the POS terminal is connected for the first time. In this case, the POS card reader or the bluetooth cradle connected thereto cannot actively initiate a connection to the POS terminal, and the POS terminal is required to actively initiate a pairing request to the POS card reader. After the pairing is completed, the POS terminal is connected with the POS card reader, so that data communication can be carried out.
After the POS terminal connected for the first time completes data communication of a Bluetooth network with the POS card reader, the POS card reader or a Bluetooth base connected with the POS card reader confirms that the POS terminal is matched according to the matching request, and the matching request comprises the equipment information and the Mac address of the POS terminal. And after the pairing is completed, the POS card reader or a Bluetooth base connected with the POS card reader writes the equipment information and the Mac address into a prestored list of the Mac address. Therefore, the equipment information of the POS terminal connected with the POS card reader and the Mac address thereof are recorded in the storage unit of the POS card reader or the Bluetooth base connected with the POS card reader. The recorded POS terminal device information may be used to confirm whether the POS terminal is the first connection when the POS terminal is next searched.
And S3, if not, reading the pre-stored Mac address corresponding to the POS terminal from a pre-stored list of the Mac address, and establishing connection with the POS terminal according to the pre-stored Mac address.
In this embodiment, if a record that matches the device information of the POS terminal is found in the POS card reader or the bluetooth cradle connected thereto, it is determined that the POS terminal is not connected for the first time. And the POS terminal which is not connected for the first time indicates that the equipment information corresponding to the POS terminal can be found in the prestored list. And at the same time, there is a Mac address corresponding to the device information. At this time, the POS card reader may read a pre-stored Mac address corresponding to the POS terminal in a pre-stored list of Mac addresses, and establish a connection with the POS terminal according to the pre-stored Mac address. In this embodiment, when the POS card reader confirms that the POS terminal is not connected for the first time, it may actively initiate connection to a pre-stored Mac address corresponding to the device information according to the device information, and finally establish connection with the POS terminal.
For example, as shown in FIG. 4, in use, the POS terminal is connected to the Bluetooth cradle, while the Bluetooth cradle is connected to the POS swipe card reader. The POS card reader is connected with a Bluetooth module of the POS terminal through a Bluetooth base in a close-range Bluetooth mode. When the POS terminal is connected with the Bluetooth base for the first time, the POS terminal needs to initiate a pairing request to the Bluetooth base, and the Bluetooth connection between the POS terminal and the Bluetooth base can be realized only after the Bluetooth base confirms the pairing request. After a successful bluetooth connection, the bluetooth cradle records the Mac address of the POS terminal in its memory. The connection between the POS terminal and the bluetooth cradle is then broken because no connection is necessary, power is off, or other possibilities are possible. At this point, the pairing request no longer needs to be initiated by the POS terminal, but rather a bluetooth connection to the POS terminal can be initiated directly by the bluetooth cradle. Because the Mac address of the POS terminal is recorded in the memory of the Bluetooth base, the Bluetooth base can be directly connected with the POS terminal according to the Mac address. Through the connection design, the Bluetooth base can be quickly connected with the POS terminal, and the POS terminal does not need to initiate a pairing request every time, so that the operation of the POS terminal is greatly reduced.
In a second embodiment of the present invention, as shown in fig. 2 and 3, there is provided a POS data communication device 100, the device 100 including:
a determining module 110, configured to determine whether a POS terminal in a wireless network is connected for the first time;
a connection establishing module 120, configured to receive a pairing request from a POS terminal when it is determined that the POS terminal is connected for the first time, and establish a connection with the POS terminal based on the pairing request; or when the POS terminal is determined not to be connected for the first time, reading a pre-stored Mac address corresponding to the POS terminal from the Mac address pre-stored list, and establishing connection with the POS terminal according to the pre-stored Mac address.
Further, as shown in fig. 3, the connection establishing module 120 includes:
a pairing module 121, configured to confirm pairing with the POS terminal according to the pairing request; wherein the pairing request comprises equipment information and a Mac address of the POS terminal;
and the recording module 122 is configured to write the device information and the Mac address into a pre-stored list of Mac addresses.
Further, as shown in fig. 3, the connection establishing module 120 further includes:
a reading module 123, configured to read, in the pre-storage list, a pre-stored Mac address corresponding to the device information according to the device information of the POS terminal;
and the connection initiating module 124 is configured to initiate a connection to the POS terminal pointed by the Mac address according to the pre-stored Mac address.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
In a third embodiment of the present invention, there is provided a terminal device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the data communication method as described in the first aspect of the present invention when executing the computer program. In this embodiment, the terminal device may be, for example, a bluetooth cradle of a POS machine. The POS card reader is connected with the POS terminal through the Bluetooth base. In an application, the bluetooth cradle may comprise a processor and a memory, the processor being configured to perform the POS data communication method described in the first embodiment. For example, the processor is configured to perform the steps of:
s1, determining whether the POS terminal in the wireless network is connected for the first time;
s2, if the POS terminal is confirmed to be connected for the first time, receiving a pairing request from the POS terminal, and establishing connection with the POS terminal based on the pairing request;
and S3, if not, reading the pre-stored Mac address corresponding to the POS terminal from a pre-stored list of the Mac address, and establishing connection with the POS terminal according to the pre-stored Mac address.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general processor may be a microprocessor or the processor may be any conventional processor, etc., and the processor is a control center of the terminal equipment for implementing POS data communication, and various interfaces and lines are used to connect various parts of the whole terminal equipment for implementing POS data communication.
The memory is configured to store the computer program of the POS data communication method described above, and to cooperate with the processor to store necessary data contents, such as the Mac address pre-stored list, Mac addresses, etc., described above, as necessary. The memory can be used for storing the computer program and/or the module, and the processor can realize various functions of the terminal equipment for POS data communication by operating or executing the computer program and/or the module stored in the memory and calling the data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a wireless/bluetooth signal transmitting and receiving function, etc.), and the like; the storage data area may store data (such as address data, text message data, etc.) created according to the use of the mobile phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Illustratively, the computer program may be partitioned into one or more modules that are stored in the memory and executed by the processor, such as the second embodiment described herein, to accomplish the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used for describing the execution process of the computer program in the terminal device for implementing POS data communication.
In a fourth embodiment of the present invention, a POS data communication system is provided, the data communication system comprising a POS terminal and a POS card reader, wherein the POS card reader may comprise a bluetooth cradle; the POS terminal and the POS card reader establish Bluetooth data communication connection through the Bluetooth base; the POS card reader executes the data communication method in the first aspect of the invention.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (5)

1. A POS data communication method is characterized by comprising
Searching a POS terminal in a wireless network;
after a POS terminal in a wireless network is searched, acquiring equipment information of the POS terminal according to a searched POS terminal signal, and determining whether the POS terminal in the wireless network is connected for the first time according to the acquired equipment information, wherein the equipment information comprises the name, the product serial number information, the version number information and the model number information of the POS terminal;
if the connection is the first time, the connection cannot be actively initiated to the POS terminal, a pairing request actively initiated by the POS terminal needs to be received, connection is established with the POS terminal based on the pairing request, and after the pairing is completed, the equipment information and the Mac address are written into a pre-storage list of the Mac address;
if not, reading the Mac address corresponding to the POS terminal in a pre-stored list of the Mac address, actively initiating connection to the POS terminal corresponding to the Mac address, and establishing connection with the POS terminal.
2. The method of claim 1, wherein the wireless network is a bluetooth network.
3. A POS data communication device is characterized by comprising
The system comprises a searching module, a judging module and a display module, wherein the searching module is used for searching a POS terminal in a wireless network, and acquiring equipment information of the POS terminal according to a searched POS terminal signal after the POS terminal in the wireless network is searched, and the equipment information comprises the name, the product serial number information, the version number information and the model number information of the POS terminal;
the determining module is used for determining whether the POS terminal in the wireless network is connected for the first time or not according to the acquired equipment information;
the connection establishing module is used for failing to actively initiate connection to the POS terminal when the POS terminal is determined to be connected for the first time, receiving a pairing request actively initiated by the POS terminal, establishing connection with the POS terminal based on the pairing request, and writing the equipment information and the Mac address into a pre-storage list of the Mac address after pairing is completed; or when the POS terminal is determined not to be connected for the first time, reading the Mac address corresponding to the POS terminal from the pre-stored list of the Mac address, actively initiating connection to the POS terminal corresponding to the Mac address, and establishing connection with the POS terminal.
4. A terminal device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the data communication method according to any one of claims 1 to 2 when executing the computer program.
5. A POS data communication system is characterized by comprising a POS terminal and a POS card reader, wherein the POS card reader comprises a Bluetooth base; the POS terminal and the POS card reader establish data communication connection through Bluetooth; the POS card reader executes the data communication method according to any one of claims 1 to 2.
CN201811543059.XA 2018-12-17 2018-12-17 POS data communication method, device, terminal equipment and system Active CN109831762B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811543059.XA CN109831762B (en) 2018-12-17 2018-12-17 POS data communication method, device, terminal equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811543059.XA CN109831762B (en) 2018-12-17 2018-12-17 POS data communication method, device, terminal equipment and system

Publications (2)

Publication Number Publication Date
CN109831762A CN109831762A (en) 2019-05-31
CN109831762B true CN109831762B (en) 2022-04-26

Family

ID=66859613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811543059.XA Active CN109831762B (en) 2018-12-17 2018-12-17 POS data communication method, device, terminal equipment and system

Country Status (1)

Country Link
CN (1) CN109831762B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104320412A (en) * 2014-11-11 2015-01-28 福建联迪商用设备有限公司 Bluetooth POS and safe Bluetooth POS connecting method and device
CN105554908A (en) * 2015-12-31 2016-05-04 福建联迪商用设备有限公司 Method, master device, slave device and system for achieving code scanning automatic bluetooth connection
CN108200559A (en) * 2017-12-27 2018-06-22 飞天诚信科技股份有限公司 A kind of method and bluetooth equipment that bluetooth equipment function is represented by broadcast data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104320412A (en) * 2014-11-11 2015-01-28 福建联迪商用设备有限公司 Bluetooth POS and safe Bluetooth POS connecting method and device
CN105554908A (en) * 2015-12-31 2016-05-04 福建联迪商用设备有限公司 Method, master device, slave device and system for achieving code scanning automatic bluetooth connection
CN108200559A (en) * 2017-12-27 2018-06-22 飞天诚信科技股份有限公司 A kind of method and bluetooth equipment that bluetooth equipment function is represented by broadcast data

Also Published As

Publication number Publication date
CN109831762A (en) 2019-05-31

Similar Documents

Publication Publication Date Title
CN106951521B (en) Method, device and system for reading and writing log file
CN110809255B (en) Card information activation method and device and storage medium
CN107251069B (en) Near field communication payment method and terminal
US11645481B2 (en) Method and apparatus for invoking radio frequency card function
US20230054157A1 (en) Near field communication nfc communication method and apparatus, and electronic device
CN108112010A (en) Access method, apparatus, terminal and the computer readable storage medium of network
CN112672278A (en) Positioning method and device of wearable equipment
CN111325901A (en) Method and device for identifying mobile phone
WO2014071774A1 (en) Method for registering terminal and terminal
CN105100449A (en) Picture sharing method and mobile terminal
CN104065742A (en) Picking-up person information processing method and device for safe kindergarten picking up
WO2015117356A1 (en) Start-up method and communication terminal
CN107548055B (en) Multi-region SIM card selection method, system and device and industrial personal computer
CN109831762B (en) POS data communication method, device, terminal equipment and system
CN108038403B (en) Card reading method based on NFC technology and client
US20110195750A1 (en) Application expanding docking apparatus and electrical system thereof
CN111158987A (en) Health check method and device of micro-service architecture
CN106201930B (en) A kind of device port determining device, terminal and method
CN113301203B (en) Method and device for updating historical information data based on address book
US9237157B2 (en) Data processing and storage device
CN108834126A (en) One kind changing card apparatus and method
CN108574503B (en) Setting method of interception setting option and related equipment
CN113950044A (en) Method and device for identifying user identification card, terminal equipment and storage medium
CN113051105A (en) Data processing method, device, equipment and storage medium
JP2012093857A (en) Ic chip, memory initialization method for ic chip, processing program for ic chip, and portable terminal

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