CN107578579A - A kind of method and POS terminal of shared printing device - Google Patents
A kind of method and POS terminal of shared printing device Download PDFInfo
- Publication number
- CN107578579A CN107578579A CN201710669552.5A CN201710669552A CN107578579A CN 107578579 A CN107578579 A CN 107578579A CN 201710669552 A CN201710669552 A CN 201710669552A CN 107578579 A CN107578579 A CN 107578579A
- Authority
- CN
- China
- Prior art keywords
- data
- printing device
- bluetooth equipment
- pos terminal
- sent
- 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.)
- Pending
Links
Landscapes
- Cash Registers Or Receiving Machines (AREA)
Abstract
The present invention relates to data processing field, more particularly to a kind of method and POS terminal of shared printing device.The present invention establishes communication connection by the first bluetooth equipment built in the printing device built in POS terminal and POS terminal;The serial ports of first bluetooth equipment receives the first data;First data are sent to the printing device;The printing device prints first data.Realize the printing device built in shared POS terminal.
Description
Technical field
The present invention relates to data processing field, more particularly to a kind of method and POS terminal of shared printing device.
Background technology
With developing rapidly for " internet+", many business using third-party application (such as Baidu takes out, Mobile banking)
Industry scene needs to print the document such as order and transaction voucher.With the increase of portfolio, and the facilitation of transaction, shop gradually
The mobile phone of waiter etc. needs to install mutually in requisition for the application program of printing list evidence, based on prior art, needs in such a scenario
Prepare wireless printer (printer of the radio communication such as wifi or bluetooth) to be used to provide printing work(for the application program on mobile phone
Energy.
But there is the POS terminal that outfit carries printing function in general shop, shared if a solution can be provided
Printing device in POS terminal, existing resource can not only be made full use of, and save the cost input of wireless printer.
The content of the invention
The technical problems to be solved by the invention are:How printing device POS terminal built in is shared.
In order to solve the above-mentioned technical problem, the technical solution adopted by the present invention is:
The present invention provides a kind of method of shared printing device, including:
The first bluetooth equipment built in printing device and POS terminal built in POS terminal establishes communication connection;
The serial ports of first bluetooth equipment receives the first data;
First data are sent to the printing device;
The printing device prints first data.
The present invention also provides a kind of POS terminal, it is characterised in that including printing device, the first bluetooth equipment and one or
Multiple processors and memory;
The memory storage has program, and is configured to by one or more of computing device following steps:
Trigger the printing device and establish communication connection with first bluetooth equipment;
The serial ports for triggering first bluetooth equipment receives the first data;
First data are sent to the printing device;
Trigger the printing device and print first data.
The beneficial effects of the present invention are:Prior art is different from, in the printing device and POS terminal built in POS terminal
The bluetooth equipment put is without communication connection, and the printing device built in POS terminal can not be shared by other external equipments, and the present invention is logical
The bluetooth equipment built in connection POS terminal and the printing device built in POS terminal are crossed, and bluetooth equipment is passed through into serial communication side
The external data that formula is got is forwarded to printer, so as to realize that the printing device built in POS terminal can be by with Bluetooth communication
The external equipment of function is shared without threshold, and existing POS terminal is upgraded to the smart machine for integrating blue-tooth printer, had
Beneficial to resource utilization is improved, hardware cost is saved.In addition, on the market connect blue-tooth printer application program be substantially it is logical
The serial communication mode for crossing bluetooth sends data to be printed, and other business datums of POS terminal can typically pass through bluetooth equipment
Other communication modes, for example file transmission, media play etc. carry out data transmission;Therefore, mode provided by the invention is passed through
Printing device built in shared POS terminal does not interfere with the business function of POS terminal in itself not only, and in shared POS terminal
The transformation of hardware or software need not be carried out by putting the external equipment of printing device, very convenient.
Brief description of the drawings
Fig. 1 is a kind of FB(flow block) of the embodiment of the method for shared printing device provided by the invention;
Fig. 2 is a kind of structured flowchart of the embodiment of POS terminal provided by the invention;
Label declaration:
1st, processor;2nd, memory;3rd, printing device;4th, the first bluetooth equipment.
Embodiment
To describe the technology contents of the present invention, the objects and the effects in detail, below in conjunction with embodiment and coordinate attached
Figure is explained.
Fig. 1 and Fig. 2 is refer to,
As shown in figure 1, the present invention provides a kind of method of shared printing device, including:
The first bluetooth equipment built in printing device and POS terminal built in POS terminal establishes communication connection;
The serial ports of first bluetooth equipment receives the first data;
First data are sent to the printing device;
The printing device prints first data.
Further, the printing device prints first data, is specially:
Obtain the data protocol being adapted to the printing device;
First data are parsed, obtain the second data;
Second data are encapsulated according to the data protocol, obtain the 3rd data;
The printing device prints the 3rd data.
Seen from the above description, realize and be automatically converted to the external data that the bluetooth equipment built in POS terminal is got
The recognizable data of printer, improve the versatility of printing device built in POS terminal.
Further, the serial ports of first bluetooth equipment receives the first data, is specially:
First bluetooth equipment is established with the second bluetooth equipment outside POS terminal and communicated to connect;
The serial ports of first bluetooth equipment receives the first data that second bluetooth equipment is sent.
Further, first data are sent to the printing device, are specially:
If first packet contains default keyword, first data are sent to the printing device;Otherwise
Intercept first data.
Seen from the above description, accurately identify that the bluetooth equipment built in POS terminal passes through serial ports by default keyword
Whether the data that communication mode is got are print data, save print resource, avoid causing to waste.
Further, first data are sent to the printing device, are specially:
Identify the application program for sending first data;
If the application program be present in default printing white list, send first data to the printing and set
It is standby;Otherwise first data are intercepted.
Seen from the above description, the data that the bluetooth equipment according to built in POS terminal is got by serial communication mode
Source, whether the data that the accurate bluetooth equipment identified built in POS terminal is got by serial communication mode are printing number
According to, save print resource, avoid causing to waste.
As shown in Fig. 2 the present invention also provides a kind of POS terminal, including printing device 3, the first bluetooth equipment 4 and one or
Multiple processors 1 and memory 2;
The memory storage has program, and is configured to by one or more of computing device following steps:
Trigger the printing device and establish communication connection with first bluetooth equipment;
The serial ports for triggering first bluetooth equipment receives the first data;
First data are sent to the printing device;
Trigger the printing device and print first data.
Further, the printing device prints first data, is specially:
Obtain the data protocol being adapted to the printing device;
First data are parsed, obtain the second data;
Second data are encapsulated according to the data protocol, obtain the 3rd data;
The printing device prints the 3rd data.
Further, the serial ports for triggering first bluetooth equipment receives the first data, is specially:
Trigger first bluetooth equipment and establish communication connection with the second bluetooth equipment outside POS terminal;
The serial ports for triggering first bluetooth equipment receives the first data that second bluetooth equipment is sent.
Further, first data are sent to the printing device, are specially:
If first packet contains default keyword, first data are sent to the printing device;Otherwise
Intercept first data.
Further, first data are sent to the printing device, are specially:
Identify the application program for sending first data;
If the application program be present in default printing white list, send first data to the printing and set
It is standby;Otherwise first data are intercepted.
Embodiments of the invention one are:
The present embodiment provides a kind of method of shared printing device, including:
The first bluetooth equipment built in printing device and POS terminal built in S1, POS terminal establishes communication connection;
Wherein, the first bluetooth equipment built in POS terminal is established socket with the printing device built in POS terminal and communicated,
Printing device built in POS terminal obtains the external data that the first bluetooth equipment is received by serial communication mode in real time;
S2, the serial ports of first bluetooth equipment receive the first data;Specially:
S21, first bluetooth equipment are established with the second bluetooth equipment outside POS terminal and communicated to connect;
S22, the serial ports of first bluetooth equipment receive the first data that second bluetooth equipment is sent.
S3, first data are sent to the printing device;
Wherein, it need to first judge whether the first data are print data, to save print resource, avoid causing to waste;Specifically
Following three kinds of judgment modes can be used:
First method:If first packet contains default keyword, first data are sent to the printing
Equipment;Otherwise first data are intercepted;
Second method:Identify the application program for sending first data;If exist in default printing white list
The application program, then first data are sent to the printing device;Otherwise first data are intercepted;
Third Way:Identify the application program for sending first data;
When the application program be present in default printing white list, whether first data are detected comprising default
Keyword;
If first packet contains default keyword, first data are sent to the printing device;Otherwise,
Intercept first data;
Third Way combines first method and second method, and whether the source for first judging the first data is in POS terminal
The application program for the printing device mandate put, only when the application program for sending the first data passes through authorization identifying, just basis
The external data that bluetooth equipment built in default keyword recognition POS terminal is received by serial communication mode is printing number
According to still other business datums, the accuracy of printing is improved, effectively avoids wasting print resource.
S4, the printing device print first data;Specially:
The data protocol that S41, acquisition are adapted to the printing device;
S42, parsing first data, obtain the second data;
S43, second data are encapsulated according to the data protocol, obtain the 3rd data;
S44, the printing device print the 3rd data;
For example, the printing device built in POS terminal supports ESC instruction set, then the character string contained the first packet is changed
The form supported for printing device;Such as, character string is switched to the byte data flows of GBK codings.
Existing POS terminal is fully utilized in the method for the printing device built in shared POS terminal provided due to the present embodiment
Hardware resource, and connect bluetooth mode use standard agreement;Therefore, in the POS terminal used on the market for,
The service of the method for the shared printing device provided with the present embodiment need to be only installed, you can realize built in shared POS terminal
Printing device, without buying wireless printer again, save hardware cost.
Embodiments of the invention two are:
The present embodiment provides a kind of POS terminal, including printing device 3, the first bluetooth equipment 4 and one or more processors
1 and memory 2;
The memory storage has program, and is configured to by one or more of computing device following steps:
The first bluetooth equipment built in printing device and POS terminal built in S1, POS terminal establishes communication connection;
S2, the serial ports of first bluetooth equipment receive the first data;Specially:
S21, first bluetooth equipment are established with the second bluetooth equipment outside POS terminal and communicated to connect;
S22, the serial ports of first bluetooth equipment receive the first data that second bluetooth equipment is sent.
S3, first data are sent to the printing device;
Wherein, it need to first judge whether the first data are print data, to save print resource, avoid causing to waste;Specifically
Following three kinds of judgment modes can be used:
First method:If first packet contains default keyword, first data are sent to the printing
Equipment;Otherwise first data are intercepted;
Second method:Identify the application program for sending first data;If exist in default printing white list
The application program, then first data are sent to the printing device;Otherwise first data are intercepted;
Third Way:Identify the application program for sending first data;
When the application program be present in default printing white list, whether first data are detected comprising default
Keyword;
If first packet contains default keyword, first data are sent to the printing device;Otherwise,
Intercept first data.
S4, the printing device print first data;Specially:
The data protocol that S41, acquisition are adapted to the printing device;
S42, parsing first data, obtain the second data;
S43, second data are encapsulated according to the data protocol, obtain the 3rd data;
S44, the printing device print the 3rd data.
In summary, the method and POS terminal of a kind of shared printing device provided by the invention, by connecting POS terminal
Printing device built in built-in bluetooth equipment and POS terminal, and bluetooth equipment got by serial communication mode outer
Portion's data forwarding is to printer, so as to realize that the printing device built in POS terminal can be set by the outside with function of Bluetooth communication
It is standby to be shared without threshold, existing POS terminal is upgraded to the smart machine for integrating blue-tooth printer, is advantageous to improve resource
Utilization rate, save hardware cost.In addition, the application program for connecting blue-tooth printer on the market is substantially the serial ports by bluetooth
Communication mode sends data to be printed, and other business datums of POS terminal can typically pass through other communication parties of bluetooth equipment
Formula, such as file transmission, media play etc. carry out data transmission;Therefore, shared by mode provided by the invention in POS terminal
The printing device put does not interfere with the business function of POS terminal in itself not only, and printing device built in shared POS terminal is outer
Portion's equipment need not carry out the transformation of hardware or software, very convenient.
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
The equivalents that bright specification and accompanying drawing content are made, or the technical field of correlation is directly or indirectly used in, similarly include
In the scope of patent protection of the present invention.
Claims (10)
- A kind of 1. method of shared printing device, it is characterised in that including:The first bluetooth equipment built in printing device and POS terminal built in POS terminal establishes communication connection;The serial ports of first bluetooth equipment receives the first data;First data are sent to the printing device;The printing device prints first data.
- 2. the method for shared printing device according to claim 1, it is characterised in that printing device printing described the One data, it is specially:Obtain the data protocol being adapted to the printing device;First data are parsed, obtain the second data;Second data are encapsulated according to the data protocol, obtain the 3rd data;The printing device prints the 3rd data.
- 3. the method for shared printing device according to claim 1, it is characterised in that the serial ports of first bluetooth equipment The first data are received, are specially:First bluetooth equipment is established with the second bluetooth equipment outside POS terminal and communicated to connect;The serial ports of first bluetooth equipment receives the first data that second bluetooth equipment is sent.
- 4. the method for shared printing device according to claim 1, it is characterised in that send first data to described Printing device, it is specially:If first packet contains default keyword, first data are sent to the printing device;Otherwise intercept First data.
- 5. the method for shared printing device according to claim 1, it is characterised in that send first data to described Printing device, it is specially:Identify the application program for sending first data;If the application program be present in default printing white list, first data are sent to the printing device;It is no Then intercept first data.
- 6. a kind of POS terminal, it is characterised in that including printing device, the first bluetooth equipment and one or more processors and deposit Reservoir;The memory storage has program, and is configured to by one or more of computing device following steps:Trigger the printing device and establish communication connection with first bluetooth equipment;The serial ports for triggering first bluetooth equipment receives the first data;First data are sent to the printing device;Trigger the printing device and print first data.
- 7. POS terminal according to claim 6, it is characterised in that the printing device prints first data, specifically For:Obtain the data protocol being adapted to the printing device;First data are parsed, obtain the second data;Second data are encapsulated according to the data protocol, obtain the 3rd data;The printing device prints the 3rd data.
- 8. POS terminal according to claim 6, it is characterised in that the serial ports of triggering first bluetooth equipment receives the One data, it is specially:Trigger first bluetooth equipment and establish communication connection with the second bluetooth equipment outside POS terminal;The serial ports for triggering first bluetooth equipment receives the first data that second bluetooth equipment is sent.
- 9. POS terminal according to claim 6, it is characterised in that send first data to the printing device, tool Body is:If first packet contains default keyword, first data are sent to the printing device;Otherwise intercept First data.
- 10. POS terminal according to claim 6, it is characterised in that transmission first data to the printing device, Specially:Identify the application program for sending first data;If the application program be present in default printing white list, first data are sent to the printing device;It is no Then intercept first data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710669552.5A CN107578579A (en) | 2017-08-08 | 2017-08-08 | A kind of method and POS terminal of shared printing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710669552.5A CN107578579A (en) | 2017-08-08 | 2017-08-08 | A kind of method and POS terminal of shared printing device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107578579A true CN107578579A (en) | 2018-01-12 |
Family
ID=61035216
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710669552.5A Pending CN107578579A (en) | 2017-08-08 | 2017-08-08 | A kind of method and POS terminal of shared printing device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107578579A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110162278A (en) * | 2019-05-16 | 2019-08-23 | 口碑(上海)信息技术有限公司 | The adding method and device of POS machine built-in printer |
WO2022228076A1 (en) * | 2021-04-30 | 2022-11-03 | 华为技术有限公司 | Automatic printing method and electronic device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101482962A (en) * | 2009-02-26 | 2009-07-15 | 北控易码通(北京)科技有限公司 | Service data processing terminal and service data processing method |
CN202058132U (en) * | 2011-05-10 | 2011-11-30 | 甘水生 | Device with local area network printing function |
CN102541482A (en) * | 2010-12-27 | 2012-07-04 | 北大方正集团有限公司 | Method and system for document printing control and document tracing |
CN205354003U (en) * | 2016-01-15 | 2016-06-29 | 广州市大枣信息科技有限公司 | Intelligent printer |
CN106897037A (en) * | 2017-02-21 | 2017-06-27 | 广东天波信息技术股份有限公司 | Intelligent terminal realizes the method and device of printing |
-
2017
- 2017-08-08 CN CN201710669552.5A patent/CN107578579A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101482962A (en) * | 2009-02-26 | 2009-07-15 | 北控易码通(北京)科技有限公司 | Service data processing terminal and service data processing method |
CN102541482A (en) * | 2010-12-27 | 2012-07-04 | 北大方正集团有限公司 | Method and system for document printing control and document tracing |
CN202058132U (en) * | 2011-05-10 | 2011-11-30 | 甘水生 | Device with local area network printing function |
CN205354003U (en) * | 2016-01-15 | 2016-06-29 | 广州市大枣信息科技有限公司 | Intelligent printer |
CN106897037A (en) * | 2017-02-21 | 2017-06-27 | 广东天波信息技术股份有限公司 | Intelligent terminal realizes the method and device of printing |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110162278A (en) * | 2019-05-16 | 2019-08-23 | 口碑(上海)信息技术有限公司 | The adding method and device of POS machine built-in printer |
WO2022228076A1 (en) * | 2021-04-30 | 2022-11-03 | 华为技术有限公司 | Automatic printing method and electronic device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200241888A1 (en) | Method and apparatus for plug and play, networkable iso 18000-7 connectivity | |
CN104965700B (en) | The method and system of driving SPI equipment is realized under vxworks operating system | |
CN105592403B (en) | NFC-based communication device and method | |
CN109218030A (en) | Interface of the near-field communication (NFC) between controller and safety element | |
CN107578579A (en) | A kind of method and POS terminal of shared printing device | |
EP3160165A1 (en) | Nfc "split stack" architecture | |
CN104517146A (en) | NFC tag, communication method and system | |
CN110531942B (en) | Print data bridging system and bridging method based on embedded Linux | |
CN106354445B (en) | Method of printing and its system based on virtual bluetooth equipment | |
CN104573591A (en) | Safe card reader and working method thereof | |
CN108023921A (en) | The cut-in method and device of a kind of third-party platform | |
CN102547681B (en) | Intelligent key device and identity authentication method | |
CN107613483A (en) | Method and smart machine based on virtual bluetooth equipment communication between process | |
US20140154978A1 (en) | Near field communication (nfc) device | |
CN104253635A (en) | Reception confirmation system, verification system and verification method of electronic coupon | |
CN206024025U (en) | A kind of home gateway | |
JP2015184692A (en) | Information processor, information processing method and information processing program | |
CN103905147B (en) | Data processing method, sending device, receiving device and communication system | |
US20040153559A1 (en) | Data processing apparatus | |
CN102801610B (en) | Method for merging network ports of peripheral equipment and port mapping | |
EP2928224A1 (en) | Management server, data processing method, and program | |
CN205847259U (en) | A kind of bluetooth equipment and Bluetooth system | |
CN104363200B (en) | A kind of control method and device of Bluetooth transmission | |
CN104077618B (en) | A kind of method and apparatus accessing smart card | |
CN103763507B (en) | Video conference terminal, service end, the upgrade-system of video conference terminal and method |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20180112 |
|
WD01 | Invention patent application deemed withdrawn after publication |