CN103906000B - The communication means and system of a kind of mobile terminal and POS terminal - Google Patents
The communication means and system of a kind of mobile terminal and POS terminal Download PDFInfo
- Publication number
- CN103906000B CN103906000B CN201410154811.7A CN201410154811A CN103906000B CN 103906000 B CN103906000 B CN 103906000B CN 201410154811 A CN201410154811 A CN 201410154811A CN 103906000 B CN103906000 B CN 103906000B
- Authority
- CN
- China
- Prior art keywords
- broadcast
- data
- interface
- mobile terminal
- pos terminal
- 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
Links
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07G—REGISTERING THE RECEIPT OF CASH, VALUABLES, OR TOKENS
- G07G1/00—Cash registers
- G07G1/12—Cash registers electronically operated
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/06—Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
- Telephonic Communication Services (AREA)
Abstract
The present invention discloses a kind of mobile terminal and the communication means of POS terminal, and the method comprising the steps of:It is packaged for filling in the broadcast interface of broadcast message and scan interface for obtaining broadcast message respectively in mobile terminal and POS terminal;The data load that broadcast message after encryption is filled in into data structure is obtained encryption data load by the broadcast thread dispatching broadcast interface of POS terminal or mobile terminal, encapsulation generation broadcast data packet, then broadcasts the broadcast data packet using ibeacon bluetooth modules;The interface call back function that mobile terminal into the POS terminal broadcast area or the POS terminal into the mobile terminal broadcast area call data receiver thread to pass through scan interface using ibeacon bluetooth modules obtains the broadcast data packet, broadcast data packet decapsulate to obtain encryption data load, then to encryption data load, it is decrypted and obtains broadcast message.The present invention is realized by ibeacon broadcast and scan data.
Description
Technical field
The present invention relates to the communications field, communication means, the device and one of more particularly to a kind of mobile terminal and POS terminal
Plant POS.
Background technology
In conditional electronic financial payment industry, financial POS (point of sale) machine plays very important effect, very
Many brushes are paid all to be carried out by POS.But with the development of mobile e-business, Mobile Phone Consumption turns into people gradually
A kind of important means of payment are consumed at present, and still, mobile phone is connected to outer net (being connected by 3G network with internet) often, therefore
In the presence of the possibility attacked by trojan horse, in view of the security of Mobile Phone Consumption, the addition of POS solves this and asked well
Topic.
But it is following the problem of be exactly how mobile phone and POS communicate, certain communication mode is varied, at present into
The mode that ripe feasible financial POS machine and mobile phone are communicated mainly has three kinds of modes:
GPRS mobile networks, data transmission security is reliable, flexible and convenient to use.Its sharpest edges are to make existing POS
System breaks away from the restriction of wire net, due to GPRS wide coverages, can be used in mobile phone using wireless access POS
Place can all be applied, it is convenient to which subordinate is in various occasions.
Wifi communicates, and data transfer is stable, and speed is quick, as long as there is a wireless routing, it is established that a wireless local
Net, two wifi equipments can be carried out communication, it is not necessary to pass through operator's network service.
Bluetooth 3.0 communicates, and transmission rate high-transmission is stable, it is not necessary to build wireless routing, it is not necessary to by outer net, directly
Two bluetooth equipments can be with direct communication.
That weighs whether the communication mode between mobile phone and POS disclosure satisfy that requirement mainly has two factors:One is
Convenience, another is security, because only that all reach, could simplify customer consumption flow at this 2 points, reduces user row
Team's waiting time, largely optimize Consumer's Experience.But, there is problem, user in convenience in above-mentioned communication mode
Had a greatly reduced quality paying in experience, these technologies have a disadvantage that:
GPRS mobile networks are needed by means of carrier network, and traffic rate and quality depend on carrier network specific
The signal strength of scene, while flow is the need for expense, which increase the cost of communication.
Wifi communicates, it is necessary to which wireless routing builds WLAN, it is impossible to is communicated, greatly limits whenever and wherever possible
Application of this technology on POS and mobile communication.
Bluetooth 3.0 communicates, and two bluetooth equipments need to be scanned before a connection is established with peering, and process is numerous
Trivial, Consumer's Experience is not high.
The content of the invention
The present invention is in order to solve the above technical problems, provide a kind of mobile terminal and the communication means of POS terminal, the communication party
Method can improve the convenience of the communication of mobile terminal and POS terminal, and data transmission security.
The communication means of a kind of mobile terminal and POS terminal, including step:
It is packaged for filling in the broadcast interface of broadcast message respectively and for obtaining broadcast letter in mobile terminal and POS terminal
The scan interface of breath, mobile terminal and the equal turn-on data broadcast thread of POS terminal and data scanning thread;
The broadcast thread dispatching broadcast interface of POS terminal or mobile terminal fills in the broadcast message after encryption to number
Encryption data load, encapsulation generation broadcast data packet, then using ibeacon bluetooth modules are obtained according to the data load in structure
Broadcast the broadcast data packet;
Mobile terminal into the POS terminal broadcast area or the POS terminal into the mobile terminal broadcast area
Data receiver thread is called to obtain the broadcast data by the interface call back function of scan interface using ibeacon bluetooth modules
Bag, to broadcast data packet decapsulate obtaining encryption data load, and then to encryption data load, it is decrypted and obtains wide
Broadcast information.
Invention additionally discloses a kind of mobile terminal and the communication system of POS terminal, the communication system include mobile terminal and
POS terminal, the mobile terminal includes first interface package module, the first broadcast module and the first scan module, and the POS is whole
End includes second interface package module, the second broadcast module and the second scan module;
The first interface package module and second interface package module are respectively used in mobile terminal and POS terminal encapsulation
For filling in the broadcast interface of broadcast message and scan interface for obtaining broadcast message, turn-on data broadcast thread and data
Scan thread;
First broadcast module and the second broadcast module are respectively used to the broadcast thread by POS terminal or mobile terminal
Call broadcast interface that the data load that the broadcast message after encryption is filled in into data structure is obtained into encryption data load,
Encapsulation generation broadcast data packet, then broadcasts the broadcast data packet using ibeacon bluetooth modules;
First scan module and the second scan module are respectively used to call data to connect by mobile terminal or POS terminal
Take-up journey obtains the broadcast data packet using ibeacon bluetooth modules by the interface call back function of scan interface, to broadcast
Packet decapsulate obtaining encryption data load, and then to encryption data load, it is decrypted and obtains broadcast message.
Invention additionally discloses a kind of POS terminal, the POS terminal includes interface encapsulation module, broadcast module and scan module;
The interface encapsulation module is used to be packaged for filling in the broadcast interface of broadcast message and for obtaining broadcast message
Scan interface, POS terminal turn-on data broadcast thread and data scanning thread;
The broadcast thread dispatching broadcast interface that the broadcast module is used for POS terminal fills out the broadcast message after encryption
The data load being written in data structure obtains encryption data load, and encapsulation generation broadcast data packet is then blue using ibeacon
Tooth module broadcasts the broadcast data packet;
The scan module calls data receiver thread to be connect using ibeacon bluetooth modules by scanning for POS terminal
The interface call back function of mouth obtains the broadcast data packet, broadcast data packet decapsulate to obtain encryption data load, so
To encryption data load, it is decrypted and obtains broadcast message afterwards.
Beneficial effects of the present invention are:Mobile terminal of the present invention and POS terminal are connect by broadcast believes broadcast to be broadcast
Breath is filled in into broadcast data packet, and broadcasts the broadcast data packet by ibeacon bluetooth module, by scan interface from
The broadcast message is obtained in the broadcast data received, so as to realize data broadcasting and reception, the mobile terminal and POS terminal
Communication mode need not be scanned pairing (such as bluetooth) without other networks (such as WIFI, GPRS mobile network), number
It is efficient and convenient according to transmitting.
Brief description of the drawings
Fig. 1 is the method flow diagram of a kind of mobile terminal of an embodiment of the present invention and the communication means of POS terminal;
Fig. 2 is the functional block diagram of the communication system of a kind of mobile terminal of an embodiment of the present invention and POS terminal;
Fig. 3 is a kind of functional block diagram of POS terminal of an embodiment of the present invention;
Fig. 4 is the structural representation of data structure in an embodiment of the present invention;
Fig. 5 is the execution flow chart of an example of the invention;
Major Symbol explanation:
10- first interface package modules;The broadcast modules of 20- first;The scan modules of 30- first;40- second interface Encapsulation Moulds
Block;The broadcast modules of 50- second;The scan modules of 60- second;100- interface encapsulation modules;200- broadcast modules;300- scans mould
Block.
Embodiment
The present invention will be to be broadcast by being packaged for filling in the broadcast interface of broadcast message in POS terminal and mobile terminal
Data are inserted into ibeacon broadcast message and broadcasted, meanwhile, by the scan interface for being packaged for obtaining broadcast message
Scanning ibeacon broadcast messages simultaneously therefrom obtain broadcast data, so as to realize the broadcast and reception of broadcast data.
The ibeacon communication technologys are the concepts put forward by Apple Inc., i.e., using low-power consumption bluetooth technology
The broadcast of (Bluetooth Low Energy, abbreviation ble) and scan method enter sending and receiving for row information, due to broadcast
Process with scanning is very quick, therefore ibeacon communication modes are very convenient efficiently, and it is mainly used in indoor coordinate setting
Navigation etc. is not related to the scene of sensitive information, and this just determines that message can be not required in plain text in the transmission of such broadcast message
To be encrypted.
Ibeacon technical principles are to broadcast uuid information using fixed base stations, and the mobile phone terminal for opening scanning enters base station
After broadcast world, specific uuid information is filled into, the distance of mobile phone terminal and base station is then calculated according to broadcast signal strength, due to
Base station position information is, it is known that so thus the positional information of mobile phone can also be calculated, finally further according to mobile phone location from network
High in the clouds is gone to obtain information.
To describe the technology contents of the present invention in detail, feature, the objects and the effects being constructed, below in conjunction with embodiment
And coordinate accompanying drawing to be explained in detail.
Embodiment one
Referring to Fig. 1, a kind of mobile terminal of present embodiment and the communication means of POS terminal, the communication means include step
Suddenly:
S1, in mobile terminal and POS terminal it is packaged for filling in the broadcast interface of broadcast message respectively and wide for obtaining
Broadcast the scan interface of information, mobile terminal and the equal turn-on data broadcast thread of POS terminal and data scanning thread;
S2, POS terminal or mobile terminal broadcast thread dispatching broadcast interface fill in the broadcast message after encryption
Data load into data structure obtains encryption data load, encapsulation generation broadcast data packet, then using ibeacon bluetooths
Module broadcasts the broadcast data packet;
S3, the mobile terminal into the POS terminal broadcast area or the POS into the mobile terminal broadcast area are whole
Data receiver thread is called to obtain the broadcast number by the interface call back function of scan interface using ibeacon bluetooth modules in end
According to bag, broadcast data packet decapsulate to obtain encryption data load, then to encryption data load, it is decrypted and obtained
Broadcast message.
In the present embodiment, the specific steps of described " broadcasting the broadcast data packet using ibeacon bluetooth modules "
Including:
S10, mobile terminal or POS terminal call broadcast interface to obtain the hci layer interfaces of equipment, and use hci socket
Word is sent to hci layer interfaces enables broadcasting command, and hci layers enable the wide of ibeacon bluetooth modules according to the enable broadcasting command
Broadcast state;
S20, mobile terminal or POS terminal are called broadcast interface to be sent using hci socket to hci layer interfaces and set wide
The broadcast data packet is set to broadcast data by multicast data order, hci layer interfaces, and is carried out using ibeacon bluetooth modules
Broadcast.
In the step S1, the mobile terminal and the equal turn-on data broadcast thread of POS terminal and data scanning thread,
Therefore, mobile terminal and POS terminal can just carry out the broadcast and scanning of data simultaneously, realize POS terminal and mobile terminal it
Between full-duplex communication.The present invention will be treated by being packaged for filling in the broadcast interface of broadcast message in POS terminal and mobile terminal
The data of broadcast are inserted into ibeacon broadcast message and broadcasted, meanwhile, by being packaged for obtaining sweeping for broadcast message
Retouch interface scans ibeacon broadcast messages and therefrom obtain broadcast data, so as to realize the broadcast and reception of broadcast data.
Compared with prior art, the communication between mobile terminal of the present invention and POS terminal without other networks (such as
WIFI, GPRS mobile network), and pairing (such as bluetooth) need not be scanned, data transfer is efficient and convenient, and the number broadcasted
According to being ciphertext data, only transmitting two-way POS terminal and mobile terminal has Encrypt and Decrypt key, so as to ensure that data transfer is pacified
Entirely.
In the present embodiment, the data structure is broadcast data load, and the interface call back function is specifically for logical
Overscanning is broadcasted to obtain broadcast data packet.During broadcast message is filled in uuid information position, when broadcasting this equipment
Just broadcast data is broadcasted while self information, the scan interface scanning broadcast, and isolated from broadcast message
The broadcast data, therefore, mobile terminal can directly obtain broadcast data with POS terminal by scanning broadcast message, without
Data are transmitted again after being scanned pairing.
In the present embodiment, the POS terminal or mobile terminal fill in broadcast message to be broadcast to broadcast data
Broadcasted in load, the data fill in mode and are applied to the broadcast less broadcast message of some size of data.In other implementations
In mode, in order to broadcast the broadcast data that some data lengths are larger, the POS terminal or mobile terminal can will be to be broadcast
Broadcast message is divided into the part of certain length, and each several part is filled in into different broadcast data load into progress respectively extensively
Broadcast, specific steps include:
S100, broadcast interface is called to be split the broadcast message after encryption by preset length;
S200, each several part broadcast message after segmentation filled in into the data load of different pieces of information structure respectively, will be each
Order of the part broadcast message in broadcast message is filled in the first byte of data load, wherein, the data structure also includes
Data length, data type.
Quickly the broadcast data received can be spliced into completely by order in the first byte of the data load
Broadcast data.
Embodiment two
A kind of communication system of mobile terminal and POS terminal, the communication system includes mobile terminal and POS terminal, described
Mobile terminal includes first interface package module 10, the first broadcast module 20 and the first scan module 30, and the POS terminal includes
Second interface package module 40, the second broadcast module 50 and the second scan module 60;
The first interface package module 10 and second interface package module 40 are respectively used in mobile terminal and POS terminal
Be packaged for filling in the broadcast interface of broadcast message and the scan interface for obtaining broadcast message, turn-on data broadcast thread and
Data scanning thread;
The broadcast module 50 of first broadcast module 20 and second is respectively used to the broadcast by POS terminal or mobile terminal
Broadcast message after encryption is filled in the data load into data structure and obtains encryption data by thread dispatching broadcast interface
Load, encapsulation generation broadcast data packet, then broadcasts the broadcast data packet using ibeacon bluetooth modules;
The scan module 60 of first scan module 30 and second is respectively used to call number by mobile terminal or POS terminal
The broadcast data packet is obtained by the interface call back function of scan interface using ibeacon bluetooth modules according to receiving thread, it is right
Broadcast data packet decapsulate obtaining encryption data load, and then to encryption data load, it is decrypted and obtains broadcast letter
Breath.
The POS terminal and mobile terminal are filled in broadcast message into data structure by broadcast interface, and are passed through
Ibeacon modules broadcast the broadcast data packet, and the broadcast data packet is obtained by the call back function of scan interface, therefore,
Realize and directly broadcast broadcast data, it is necessary to by means of extraneous network (such as WIFI, GPRS mobile network by ibeacon bluetooths
Deng), without pairing (pairing before such as bluetooth data transmission) is scanned, data transfer is efficient and convenient.
In the present embodiment, first broadcast module 20, the second broadcast module 50, the first scan module 30 and second
Scan module 60 is by Bluetooth broadcast and scans the broadcast data packet, wherein, the broadcast interface is by by number to be broadcast
According to the broadcast data load for being inserted into ibeacon broadcast;
The scan interface obtains the data in broadcast message by scanning broadcast message.
Broadcast message is filled in into broadcast data load, just by broadcast data while equipment of itself information is broadcasted
It is broadcasted, the scan interface scans broadcast message, and isolates the broadcast data, therefore, mobile terminal and POS terminal
Broadcast data just can be directly obtained, without transmitting data again after being scanned pairing.
In the present embodiment, the broadcast module 50 of the first broadcast module 20 and second includes enabling unit and broadcast is single
Member;
The enabling unit is used to obtain mobile terminal or the hci layer interfaces of POS terminal, and is given using hci socket
Hci layer interfaces send order, enable the broadcast state of bluetooth equipment;
The radio unit is used to send the order for setting broadcast data using hci socket, by the broadcast after encryption
Packet is set to broadcast data, and carries out broadcast data packet broadcast.
First broadcast module 20 and the second broadcast module 50 also include data packaging unit;
The data packaging unit is used to call broadcast interface to be split the broadcast message after encryption by preset length;
And for each several part broadcast message after segmentation to be filled in into the data load of different pieces of information structure respectively, will
Order of each several part broadcast message in broadcast message is filled in the first byte of data load, wherein, the data structure is also wrapped
Include data length, data type.
Embodiment three
A kind of POS terminal, the POS terminal includes interface encapsulation module 100, broadcast module 200 and scan module 300;
The interface encapsulation module 100 is used for the broadcast interface for being packaged for filling in broadcast message and for obtaining broadcast letter
The scan interface of breath, POS terminal turn-on data broadcast thread and data scanning thread;
The broadcast thread dispatching broadcast interface that the broadcast module 200 is used for POS terminal believes the broadcast after encryption
Cease the data load filled in into data structure and obtain encryption data load, then encapsulation generation broadcast data packet uses
Ibeacon bluetooth modules broadcast the broadcast data packet;
The scan module 300 calls data receiver thread to pass through scanning using ibeacon bluetooth modules for POS terminal
The interface call back function of interface obtains the broadcast data packet, and broadcast data packet decapsulate to obtain encryption data load,
Then to encryption data load, it is decrypted and obtains broadcast message.
When needing outside broadcast message, the POS terminal is filled in broadcast message to data structure by broadcast interface
In, and be broadcasted broadcast message by ibeacon bluetooth modules;Meanwhile, institute is obtained by the call back function of scan interface
State broadcast data packet and obtain packet, and therefrom obtain to obtain broadcast message.This POS terminal broadcast message and scanning obtain broadcast letter
Breath is simple to operate without in external network (WIFI, GPRS network), and need not carry out matching operation, improves data broadcasting
With the convenience of scanning.
In the present embodiment, the broadcast module 200 and scan module 300 pass through Bluetooth broadcast and the scanning broadcast
Packet, wherein, the broadcast interface is by the way that data to be broadcast are inserted into the data load of ibeacon broadcast;
The scan interface obtains the data in broadcast message by scanning the broadcast message of ancillary equipment.Will be wide
Information solicitation is broadcast into broadcast data load, just broadcast data is broadcasted while equipment of itself information is broadcasted, it is described
Scan interface scans broadcast message, and isolates the broadcast data, therefore, and mobile terminal can pass through scanning with POS terminal
The broadcast message of ancillary equipment directly obtains broadcast data, without transmitting data again after being scanned pairing.
In summary, mobile terminal of the present invention and POS terminal are connect by broadcast fills in broadcast message to be broadcast to wide
In unicast packets, and the broadcast data packet is broadcasted by ibeacon bluetooth module, it is wide from what is received by scan interface
The broadcast message is obtained in multicast data, so as to realize data broadcasting and reception, the mobile terminal and POS terminal communication mode without
Need to be by other networks (such as WIFI, GPRS mobile network), and pairing (such as bluetooth) need not be scanned, data transfer is quick
It is convenient.
Example
The present invention will be described for the example communicated below by a specific mobile phone (i.e. mobile terminal) with POS terminal.
In this embodiment, the POS terminal and mobile terminal be packaged for filling in respectively broadcast message broadcast interface and
Scan interface for obtaining broadcast message, mobile terminal and the equal turn-on data broadcast thread of POS terminal and data scanning thread,
Therefore POS terminal and mobile terminal can pass through broadcast interface and the mutual sent-received message of scan interface.As shown in figure 5, hand
Machine and POS terminal communicating step are as follows:
Step 1) POS terminal start initialization after, turn-on data broadcast thread and data scanning thread, data transmission line journey bear
Duty sends broadcast, and data receiver thread is responsible for scanning broadcast.
Step 2) broadcast message to be sent is encrypted the upper level applications of POS terminal.(do not have in ibeacon technologies
There is the encryption for doing data, data encryption is realized in this programme, encryption is not only safe and reliable, encryption and decryption are also contemplated that
The complexity realized to mobile terminal software and hardware and in terms of can or can not reducing message transmission rate.)
Step 3) POS terminal transmission thread encapsulation broadcast data packet, broadcast data packet is by n AD Structure structure
Into n can be 1.
Wherein, AD Structure structure is as shown in Figure 4.Each AD Structure is by length (AD
Length), type (AD Type) and load (AD Payload) are constituted, and that length is filled in is the total of current AD Structure
It is long, in type after only 0x3D and the numeral not comprising 0xFF is only user-defined, there is 0xFF from 0x01 to 0x3D
All used by the GAP agreements of standard, load is used for writing broadcast data.
Transmitting terminal is judged the length of the broadcast message to be sent after encryption, it is determined whether be long message, if
Need to be divided into multiple branches to send.Type in AD Structure structures come distinguish data whether be long message branch,
If it is, the order numeral of each branch can be filled in the first byte of load, such receiving terminal receives each branch
Long message can be just assembled into.
Encryption data is encapsulated by broadcast packet format.
Step 4) POS terminal data transmission line journey broadcast enciphering after packet.
Wherein, the detailed process of the packet after broadcast enciphering is:The hci layer interfaces of equipment are first obtained, hci set is used
Connect word and send order to hci layer interfaces, enable ble and be in broadcast state.Ble is in after broadcast state, reuses hci set
Connect word and send the order that broadcast data is set, the packet after encryption is set to broadcast data, if to send multiple messages,
Broadcast data just is set with same method at regular intervals.
Wherein, hci is:HCI (Host Controller Interface, write a Chinese character in simplified form hci), is main frame and indigo plant
The interface of control information is transported between tooth module, is the important component of bluetooth protocol repertory.
Step 5) mobile phone terminal turn-on data sends thread and data receiving thread, and data transmission line journey is responsible for sending broadcast,
Data receiver thread is responsible for scanning broadcast.
Step 6) mobile phone terminal data receiver thread open scanning broadcast data function.Use enable low-power consumption bluetooth module
I.e. ble scan interface, enables scan function.
Step 7) after mobile phone terminal enters the broadcast world of POS terminal, mobile phone terminal data receiver thread is broadcasted by scanning
Interface call back function can receive the packet of broadcast.
Step 8) mobile phone terminal data receiver thread solves to the broadcast data packet received according to broadcast packet format
Encapsulation, acquires encryption data load.It is confirmed whether to be the load sent by several times by judging AD Structure type
Message, if it is, just assembling encrypted message according to the first byte order numeral of load.
Step 9) encrypted message data are decrypted mobile phone terminal data receiver thread upper level applications, obtain plaintext
Broadcast message.
At this moment, the communication of full duplex be embodied in POS terminal send broadcast while also can scanning cell phone end broadcast.
Step 10) plaintext broadcast message to be sent is encrypted the data transmission line journey of mobile phone terminal.
Step 11) mobile phone terminal data transmission line journey encapsulation broadcast data packet, the same step 3) of process
Step 12) mobile phone terminal data transmission line journey broadcast enciphering after packet.Detailed process is:First with setting broadcast
Data-interface sets broadcast data, then recalls the interface for enabling ble broadcast, enables broadcast, and such broadcast data is just sent out
See off.
Step 13) POS terminal data receiver thread enable ble scanning.Detailed process is:The hci layer interfaces of equipment are obtained,
Sent and ordered to hci layer interfaces using hci socket, enabled ble and be in scanning mode.
Step 14) after POS terminal enters the broadcast world of mobile phone terminal, POS terminal data receiver thread passes through hci layers of set
Broadcast data can be received by connecing word.
Step 15) POS terminal data receiver thread solves to the broadcast data packet received according to broadcast packet format
Encapsulation, acquires encryption data load.
Step 16) encrypted message data are decrypted POS terminal data receiver thread upper level applications, obtain plaintext number
According to.
Embodiments of the invention are the foregoing is only, are not intended to limit the scope of the invention, it is every to utilize this hair
Equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills
Art field, is included within the scope of the present invention.
Claims (8)
1. the communication means of a kind of mobile terminal and POS terminal, it is characterised in that including step:
It is packaged for filling in the broadcast interface of broadcast message and for obtaining broadcast message respectively in mobile terminal and POS terminal
Scan interface, mobile terminal and the equal turn-on data broadcast thread of POS terminal and data scanning thread;
The broadcast thread dispatching broadcast interface of POS terminal or mobile terminal fills in the broadcast message after encryption to data knot
Data load in structure obtains encryption data load, and then encapsulation generation broadcast data packet is broadcasted using ibeacon bluetooth modules
The broadcast data packet;
Mobile terminal into the POS terminal broadcast area or the POS terminal into the mobile terminal broadcast area are called
Data receiver thread obtains the broadcast data packet using ibeacon bluetooth modules by the interface call back function of scan interface,
Broadcast data packet decapsulate to obtain encryption data load, then to encryption data load, it is decrypted and obtains broadcast letter
Breath.
2. the communication means of mobile terminal according to claim 1 and POS terminal, it is characterised in that the data structure
For broadcast data load, the interface call back function by scanning ancillary equipment broadcast specifically for obtaining broadcast data packet.
3. the communication means of mobile terminal according to claim 2 and POS terminal, it is characterised in that described " to use
The specific steps of the ibeacon bluetooth modules broadcast broadcast data packet " include:
Mobile terminal or POS terminal call broadcast interface to obtain the hci layer interfaces of equipment, and use hci socket to hic layers
Interface, which is sent, enables broadcasting command, the hci layers of broadcast state according to enable broadcasting command enable ibeacon bluetooth modules;
Mobile terminal or POS terminal are called broadcast interface to be sent using hci socket to hci layer interfaces and set broadcast data life
Order, the broadcast data packet is set to broadcast data by hci layer interfaces, and is broadcasted using ibeacon bluetooth modules.
4. the communication means of mobile terminal according to claim 1 and the POS terminal, it is characterised in that " POS terminal
Or the broadcast thread dispatching broadcast interface of mobile terminal fills in the broadcast message after encryption the data into data structure
Load obtains encryption data load " specific steps include:
Broadcast interface is called to be split the broadcast message after encryption by preset length;
Each several part broadcast message after segmentation is filled in into the data load of different pieces of information structure respectively, each several part is broadcasted and believed
The order ceased in broadcast message is filled in the first byte of data load, wherein, the data structure also includes data length, number
According to type.
5. the communication system of a kind of mobile terminal and POS terminal, including mobile terminal and POS terminal, it is characterised in that the shifting
Dynamic terminal includes first interface package module, the first broadcast module and the first scan module, and the POS terminal includes second interface
Package module, the second broadcast module and the second scan module;
The first interface package module and second interface package module are respectively used to be packaged in mobile terminal and POS terminal
Fill in the broadcast interface of broadcast message and the scan interface for obtaining broadcast message, turn-on data broadcast thread and data scanning
Thread;
First broadcast module and the second broadcast module are respectively used to the broadcast thread dispatching by POS terminal or mobile terminal
The data load that broadcast message after encryption is filled in into data structure is obtained encryption data load by broadcast interface, encapsulation
Broadcast data packet is generated, then the broadcast data packet is broadcasted using ibeacon bluetooth modules;
First scan module and the second scan module are respectively used to call data receiver line by mobile terminal or POS terminal
Journey obtains the broadcast data packet using ibeacon bluetooth modules by the interface call back function of scan interface, to broadcast data
Bag progress, which is decapsulated, obtains encryption data load, and then to encryption data load, it is decrypted and obtains broadcast message.
6. the communication system of mobile terminal according to claim 5 and POS terminal, it is characterised in that
First broadcast module, the second broadcast module, the first scan module and the second scan module is by Bluetooth broadcast and sweeps
The broadcast data packet is retouched, wherein, the broadcast interface is carried by the way that data to be broadcast to be inserted into the data of ibeacon broadcast
Lotus fills in broadcast message;
The scan interface obtains the data in broadcast message by scanning ancillary equipment broadcast message.
7. the communication system of mobile terminal according to claim 6 and POS terminal, it is characterised in that
First broadcast module and the second broadcast module include enabling unit and radio unit;
The enabling unit is used to obtain mobile terminal or the hci layer interfaces of POS terminal, and uses hci socket to hci layers
Interface sends order, enables the broadcast state of bluetooth equipment;
The radio unit is used to send the order for setting broadcast data using hci socket, by the broadcast data after encryption
Bag is set to broadcast data, and carries out broadcast data packet broadcast.
8. the communication system of mobile terminal according to claim 5 and POS terminal, it is characterised in that the first broadcast module
Also include data packaging unit with the second broadcast module;
The data packaging unit is used to call broadcast interface to be split the broadcast message after encryption by preset length;
And for each several part broadcast message after segmentation to be filled in into the data load of different pieces of information structure respectively, Jiang Gebu
Point order of the broadcast message in broadcast message is filled in the first byte of data load, wherein, the data structure also includes number
According to length, data type.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410154811.7A CN103906000B (en) | 2014-04-17 | 2014-04-17 | The communication means and system of a kind of mobile terminal and POS terminal |
JP2016562760A JP6228690B2 (en) | 2014-04-17 | 2015-01-09 | Communication method between mobile terminal and POS terminal, communication system and POS terminal |
PCT/CN2015/070398 WO2015158168A1 (en) | 2014-04-17 | 2015-01-09 | Method and apparatus for communication between mobile terminal and pos terminal, and pos terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410154811.7A CN103906000B (en) | 2014-04-17 | 2014-04-17 | The communication means and system of a kind of mobile terminal and POS terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103906000A CN103906000A (en) | 2014-07-02 |
CN103906000B true CN103906000B (en) | 2017-09-29 |
Family
ID=50997112
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410154811.7A Active CN103906000B (en) | 2014-04-17 | 2014-04-17 | The communication means and system of a kind of mobile terminal and POS terminal |
Country Status (3)
Country | Link |
---|---|
JP (1) | JP6228690B2 (en) |
CN (1) | CN103906000B (en) |
WO (1) | WO2015158168A1 (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103906000B (en) * | 2014-04-17 | 2017-09-29 | 福建联迪商用设备有限公司 | The communication means and system of a kind of mobile terminal and POS terminal |
CN104077169A (en) * | 2014-07-21 | 2014-10-01 | 北京深思数盾科技有限公司 | BLE (Bluetooth Low Energy) device, information safety device and automatic start-up method of application program |
CN104218979A (en) * | 2014-07-31 | 2014-12-17 | 北京升哲科技有限公司 | Sensor for acquiring sensing data in disconnected state and intelligent device and method |
CN104244131B (en) * | 2014-09-10 | 2018-05-08 | 青岛歌尔声学科技有限公司 | A kind of method and bluetooth headset of interior Voice Navigation |
CN105581774A (en) * | 2014-10-22 | 2016-05-18 | 长天科技股份有限公司 | Physiological information monitoring system following Bluetooth low-power-consumption communication protocol |
CN104486755B (en) * | 2014-12-03 | 2019-01-25 | 北京京东尚科信息技术有限公司 | The system and method for the WIFI configuration of smart machine are realized based on ibeacon |
CN105635150B (en) * | 2015-12-31 | 2019-06-11 | 宇龙计算机通信科技(深圳)有限公司 | Encryption method, decryption method and its device and terminal |
CN105764058B (en) * | 2016-04-12 | 2020-06-09 | Oppo广东移动通信有限公司 | Method, device and system for accessing network |
CN105956845A (en) * | 2016-04-20 | 2016-09-21 | 福建联迪商用设备有限公司 | POS terminal with integrated Bluetooth iBeacon module, payment method thereof and POS system |
CN106454706A (en) * | 2016-10-12 | 2017-02-22 | 广州视源电子科技股份有限公司 | Notification information push method and system |
CN108419225B (en) * | 2018-03-16 | 2020-12-04 | 上海百联集团股份有限公司 | Authorization end, authorized end, server and authorization method |
CN111510862B (en) * | 2020-04-24 | 2021-09-21 | 支付宝(杭州)信息技术有限公司 | Terminal area positioning method and device and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103368722A (en) * | 2012-03-29 | 2013-10-23 | 美国博通公司 | System and method for improving bluetooth low energy privacy |
CN103577982A (en) * | 2012-08-03 | 2014-02-12 | Lg电子株式会社 | Mobile terminal and method of performing NFC payment using same |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130178163A1 (en) * | 2012-01-10 | 2013-07-11 | Htc Corporation | Systems for Facilitating Wireless Communication and Related Methods |
US9357336B2 (en) * | 2012-12-03 | 2016-05-31 | Samsung Electronics Co., Ltd. | Information providing method and mobile terminal therefor |
CN105027148A (en) * | 2013-02-04 | 2015-11-04 | 肖普基克公司 | Presence detection using Bluetooth and hybrid-mode transmitters |
CN103906000B (en) * | 2014-04-17 | 2017-09-29 | 福建联迪商用设备有限公司 | The communication means and system of a kind of mobile terminal and POS terminal |
-
2014
- 2014-04-17 CN CN201410154811.7A patent/CN103906000B/en active Active
-
2015
- 2015-01-09 WO PCT/CN2015/070398 patent/WO2015158168A1/en active Application Filing
- 2015-01-09 JP JP2016562760A patent/JP6228690B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103368722A (en) * | 2012-03-29 | 2013-10-23 | 美国博通公司 | System and method for improving bluetooth low energy privacy |
CN103577982A (en) * | 2012-08-03 | 2014-02-12 | Lg电子株式会社 | Mobile terminal and method of performing NFC payment using same |
Also Published As
Publication number | Publication date |
---|---|
JP2017516386A (en) | 2017-06-15 |
JP6228690B2 (en) | 2017-11-08 |
WO2015158168A1 (en) | 2015-10-22 |
CN103906000A (en) | 2014-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103906000B (en) | The communication means and system of a kind of mobile terminal and POS terminal | |
CN101772053B (en) | Terminal unit configuration method, device, terminal and terminal unit | |
CN103927654B (en) | A kind of mobile terminal contacts the means of communication, device and method of payment with POS | |
CN103782649B (en) | By docking system switching is connected with the Wireless LAN of universal network equipment driver | |
US20090180423A1 (en) | Transmission of Ethernet Packets Via CPRI Interface | |
WO2018098633A1 (en) | Data transmission method, data transmission apparatus, electronic device and computer program product | |
KR20020018551A (en) | System and method for secure over-the-air administration of a wireless mobile station | |
CN102833345A (en) | Method, apparatus and system for sharing content between devices | |
CN105577500B (en) | The correlating method and device of VXLAN and tunnel | |
US7039034B2 (en) | System, method and computer program product for providing an IP datalink multiplexer | |
CN108476508A (en) | Downlink data packet configuration method and device | |
CN104619040A (en) | Method and system for quickly connecting WIFI equipment | |
CN107484439B (en) | Data message processing method and equipment | |
CN106028266A (en) | Information transmission method, device and system | |
CN104703126B (en) | Wireless network broadcast information transmission system and its method based on iBeacon | |
CN107231604B (en) | Digital communication method and system | |
CN107094149B (en) | Digital communication multi-protocol conversion device and use method thereof | |
CN102843434A (en) | Method, device and system for sharing contents among equipment | |
CN101237450A (en) | Method and apparatus for handling packets in a wireless communications system | |
CN112235734B (en) | Method, device and equipment for realizing unicast service in broadcast mode | |
CN103796191A (en) | Method, device and terminal for sending data to user terminal | |
CN107529205A (en) | A kind of Internet-surfing configuration method of the network equipment based on wifi hotspot | |
CN105228096B (en) | A kind of communication establishing method and device based on WIFI | |
CN106851859A (en) | A kind of inter-network data communications method based on wireless self-networking | |
US20080025281A1 (en) | Device For A Radio Station |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |