Method and system for simultaneously printing by connecting multiple terminals with same printer
By building a wireless LAN and IP configuration for WIFI printers, the connection of multiple terminals to the same printer and data classification verification are achieved, solving the problems of high cost and printing errors in existing technologies and providing an economical and stable printing solution.
Patent Information
- Application Number
- CN202510793482.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-09-16
AI Technical Summary
Existing technologies require dedicated servers or cloud services when multiple terminals share a printer, which leads to high costs and is prone to problems such as printing errors and loss. It cannot meet small-scale shared printing needs, especially in micro-receipt printer application scenarios such as ordering food in restaurants and refueling at gas stations.
By building a wireless LAN, using the WIFI printer AP mode or router mode to connect multiple WIFI terminals, obtaining the printer IP address and configuring it, the WIFI terminal queries the printer status and sends print data. The WIFI printer classifies and groups packets and verifies data integrity, prints in sequence, and sets a response mechanism to prevent failures.
No dedicated server is required, which reduces hardware and operating costs, is easy to deploy, prevents data loss and confusion, ensures printing accuracy and system stability, and is suitable for shared printing in small-scale LANs.
Smart Images

Figure CN120653213A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field related to printer printing, and in particular to a method for connecting multiple terminals to the same printer for simultaneous printing, and also to a system for connecting multiple terminals to the same printer for simultaneous printing. Background Art
[0002] The traditional method of sharing a single printer across multiple terminals requires a dedicated host computer to act as a server, to which all terminals and printers must connect. Alternatively, a cloud server must be built or rented, to which all terminals and printers must connect to achieve queued or simultaneous printing. The drawbacks of this method are the need for a dedicated server, which must always run the print service program, and the need for specialized personnel to deploy it. Furthermore, while some Wi-Fi printers on the market can connect directly to multiple terminals or use routers to achieve shared printing, printing errors and lost prints can occur when multiple terminals are connected to the same printer simultaneously. This approach cannot meet the growing number of small-scale shared printing applications, particularly micro-receipt printers, such as restaurant ordering and gas station refueling. Therefore, the market urgently needs a more convenient and cost-effective way to achieve shared printing. Summary of the Invention
[0003] In order to overcome the existing technical deficiencies, the purpose of the present invention is to provide a method and system for connecting multiple terminals to the same printer for simultaneous printing to solve the above technical problems.
[0004] The technical solutions adopted by the present invention to solve the technical problems are as follows:
[0005] According to one aspect of the present invention, a method for connecting multiple terminals to the same printer and printing simultaneously is designed, comprising the following steps:
[0006] Step S1, building a wireless local area network: selecting the WIFI printer AP mode or router mode to wirelessly connect the WIFI printer to multiple WIFI terminals;
[0007] Step S2: Obtain the IP address of the WIFI printer and configure it to each WIFI terminal;
[0008] Step S3: After the WIFI terminal starts the print task, it queries the WIFI printer status based on the IP address;
[0009] Step S4: If the WIFI terminal finds that the WIFI printer is in normal condition, the printing data is sent to the WIFI printer;
[0010] Step S5: The WIFI printer receives the print data, classifies and packages it, and verifies the integrity of the print data;
[0011] Step S6: If the print data verified by the WIFI printer is complete, the WIFI printer prints the print instructions and print data transmitted by each WIFI terminal in sequence according to the classified data packets;
[0012] Step S7: The WIFI printer determines whether the printing is successful. If not, the reason for the printing failure is fed back to the corresponding WIFI terminal. The corresponding WIFI terminal terminates the printing and gives a corresponding prompt based on the feedback status of the WIFI printer. If yes, the printing success result is fed back to each WIFI terminal, and each WIFI terminal feeds back that the printing is completed.
[0013] In some embodiments, in step S5, the classification and packetization includes: classifying and packetizing the print data concurrently sent by multiple WIFI terminals according to the source terminals based on the terminal identification information carried in the received data packets.
[0014] In some embodiments, the classification and grouping of packages adopts a single buffer sorting mode, specifically including:
[0015] Open a cache area in the WIFI printer RAM and set a timer of n seconds;
[0016] The WIFI printer stores the commands and print data sent by each WIFI terminal in the set buffer area in the order of receiving time without distinction;
[0017] When the timer reaches the preset duration n seconds, the reception stops. The duration n is dynamically adjusted according to the number of terminals, data volume and network quality;
[0018] The WIFI printer uses the IP address of each WIFI terminal in the cache area as a serial number, and arranges them in chronological order to generate independent printing data packets corresponding to the WIFI terminals. At this point, the classification and packaging tasks are completed.
[0019] In some embodiments, the classification and grouping of packets adopts a multi-cache direct storage mode, specifically including:
[0020] Open an independent cache area for each WIFI terminal IP address in the WIFI printer RAM;
[0021] Real-time analysis of the source IP address of received data packets;
[0022] Store the data packet directly into the independent buffer area of the corresponding WIFI terminal according to the source IP address;
[0023] When the WIFI printer detects that there is no data transmission from the WIFI communication port within a preset time, it determines that data reception is completed;
[0024] The data arranged in sequence in each independent buffer area forms a complete terminal printing data packet, and the classification and packaging tasks are completed.
[0025] In some implementations, in step S5 , the WIFI printer sets its own status to “busy” when receiving data from each WIFI terminal.
[0026] In some embodiments, in step S5, verifying the integrity of the printed data includes:
[0027] Check whether the print data packet contains the start and stop instructions.
[0028] And / or, verify whether the size of the received print data is consistent with the size of the print data sent by the WIFI terminal.
[0029] In some implementations, in step S6, if the print data verified by the WIFI printer is incomplete, the WIFI printer feeds back "printer data reception abnormality" to the corresponding WIFI terminal.
[0030] According to another aspect of the present invention, a system for connecting multiple terminals to the same printer for simultaneous printing is designed, comprising:
[0031] At least two WIFI terminals;
[0032] A WIFI printer that supports wireless communication;
[0033] Network connection module: used to build a local area network through the WIFI printer's own AP hotspot or an external WIFI router, so that all WIFI terminals can establish a wireless connection with the WIFI printer;
[0034] The WIFI terminal is configured as follows:
[0035] (a) Store the IP address of each WIFI printer and query the status of each WIFI printer;
[0036] (b) When the WIFI printer status is "OK", a print instruction and print data are sent to the WIFI printer;
[0037] (c) receiving the printing result fed back by the WIFI printer;
[0038] (d) Prompt correspondingly based on the feedback status of the WIFI printer, including but not limited to beeping sounds and / or text prompts;
[0039] The WIFI printer configuration is:
[0040] A buffer area is opened in the RAM on it to receive the printing data sent concurrently by multiple WIFI terminals and classify and package them, verify the integrity of the printing data, execute printing in sequence according to the package order, and feedback the results to the WIFI terminal to determine whether the printing is successful.
[0041] In some implementations, when the network connection module adopts the WIFI printer self-built AP hotspot mode, the WIFI printer directly establishes a wireless connection with each WIFI terminal through its own SSID and password.
[0042] In some embodiments, when the network connection module adopts an external WIFI router, the WIFI printer and each WIFI terminal access the same local area network through the SSID and password of the WIFI router.
[0043] The technical effects of the present invention are:
[0044] Compared with existing technologies, users do not need to purchase a separate host or rent a cloud server, nor do they need to run dedicated service programs, which can significantly save hardware and operating costs. Users only need to follow the instructions to simply enter the IP address of the WIFI printer into each terminal device to complete deployment, without the need for specialized engineers or technicians. This makes use and maintenance more convenient and is very suitable for small-scale LAN shared printers. Due to the simplicity of the system, the probability of failure is inherently low, and troubleshooting and replacement after a failure is also simple, without the need for dedicated after-sales service. A self-developed algorithm to prevent data loss and confusion can ensure printing accuracy and effectively prevent common problems such as missing and omissions in printing. A self-developed response mechanism can effectively prevent common problems such as blind typing, missed typing, and incorrect typing, ensuring system stability and printing reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is a system connection diagram with a router;
[0046] Figure 2 This is a system connection diagram without a router;
[0047] Figure 3 This is a diagram of the system deployment and printing process. DETAILED DESCRIPTION
[0048] To make the objectives, technical solutions, and advantages of the present invention more clearly understood, the present invention will be further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present invention.
[0049] Example 1
[0050] refer to Figures 1 to 3 As shown, the present invention provides a method for connecting multiple terminals to the same printer for simultaneous printing, comprising the following steps:
[0051] Set up the system, build a wireless LAN, and select the WIFI printer in AP mode or router mode to wirelessly connect the WIFI printer to multiple WIFI terminals. The decision on whether to use a WIFI router depends on two factors: First, if the selected WIFI printer does not have an AP hotspot function, or is used in a complex environment with many obstacles, the communication distance is long, and high stability is required, then a system with a router can be selected. Conversely, if the WIFI printer has an AP hotspot function, the communication distance is short, and the environment is simple with few obstacles, then a system without a router can be selected.
[0052] If a WIFI router is required, the WIFI printer and each WIFI terminal access the same LAN through the SSID and password of the WIFI router. In this embodiment, Figure 1 As shown in the figure, the system connection diagram of the router is shown. The WIFI printer, WIFI terminal A, WIFI terminal B and WIFI terminal N are connected to form a local area network through the SSID and password of the WIFI router, forming a system in which multiple terminals are connected to the same printer and print simultaneously.
[0053] If a WIFI router is not required, directly connect the WIFI printer and each WIFI terminal into a local area network through the WIFI printer's own SSID and password. The WIFI printer has an AP hotspot function. In this embodiment, reference Figure 2 As shown in the figure, there is a system connection diagram without a router. The WIFI printer, WIFI terminal A, WIFI terminal B and WIFI terminal N are directly connected to form a local area network through the WIFI printer's own SSID and password, forming another system in which multiple terminals are connected to the same printer to print simultaneously.
[0054] Get the IP address of the WIFI printer. The methods for obtaining the IP address of the WIFI printer include:
[0055] Get the IP address through the WIFI printer self-test page. Specifically, press the Feed button when turning on the printer to print a self-test page. The self-test page will display the printer WIFI IP address.
[0056] Alternatively, access the WIFI printer web page through other terminals to obtain the IP address (the page will display the printer WIFI IP address).
[0057] The obtained IP address of the WIFI printer is entered into the IP list of each WIFI terminal, that is, the IP list of WIFI terminal A, WIFI terminal B, and WIFI terminal N. At this point, the entire system deployment is complete and the user is waiting to start the print task.
[0058] When each WIFI terminal starts the printing task at the same time, the printing program on it establishes a connection with the WIFI printer through the IP address and queries the status of the WIFI printer respectively.
[0059] Each WIFI terminal determines whether the various queried statuses are OK. If so, the printing programs of WIFI terminal A, WIFI terminal B, and WIFI terminal N send their respective print instructions and print data to the WIFI printer; if not, the corresponding WIFI terminal terminates printing and gives corresponding prompts based on the feedback status of the WIFI printer, including but not limited to beeping sounds and / or text prompts.
[0060] When the WIFI printer receives the print data sent by each WIFI terminal, it sets its own status to "busy".
[0061] The WIFI printer classifies and packages the received print data. The classification and packaging includes: classifying and packaging the print data sent concurrently by multiple WIFI terminals according to the source terminal based on the terminal identification information carried in the received data packet. The classification and packaging adopts a single-buffer sorting mode or a multi-buffer direct storage mode.
[0062] When the classification and grouping adopts the single buffer sorting mode, it specifically includes:
[0063] Open a cache area in the WIFI printer RAM and set a timer of n seconds;
[0064] The WIFI printer stores the commands and print data sent by each WIFI terminal in the set buffer area in the order of receiving time without distinction;
[0065] When the timer reaches the preset duration n seconds, the reception stops. The duration n is dynamically adjusted according to the number of terminals, data volume and network quality;
[0066] The WIFI printer uses the IP address of each WIFI terminal in the cache area as a serial number, and arranges them in chronological order to generate independent printing data packets corresponding to the WIFI terminals. At this point, the classification and packaging tasks are completed.
[0067] When the classification group package adopts the multi-cache direct storage mode, it includes:
[0068] Open an independent cache area for each WIFI terminal IP address in the WIFI printer RAM;
[0069] Real-time analysis of the source IP address of received data packets;
[0070] Store the data packet directly into the independent buffer area of the corresponding WIFI terminal according to the source IP address;
[0071] When the WIFI printer detects that there is no data transmission from the WIFI communication port within a preset time, it determines that data reception is completed;
[0072] The data arranged in sequence in each independent buffer area forms a complete terminal printing data packet, and the classification and packaging tasks are completed.
[0073] The WIFI printer verifies the integrity of the print data transmitted by each WIFI terminal. The verification of print data integrity includes:
[0074] Check whether the print data packet contains the start and stop instructions.
[0075] And / or, verify whether the size of the received print data is consistent with the size of the print data sent by the WIFI terminal.
[0076] If the print data verification fails, that is, the verified print data is incomplete, the WIFI printer will feedback "printer data reception abnormality" to the corresponding WIFI terminal, and the corresponding WIFI terminal will terminate printing and give corresponding prompts based on the feedback status of the WIFI printer.
[0077] If the print data is verified to be complete, the WIFI printer will print the print instructions and print data transmitted by each WIFI terminal in sequence according to the classified data packets.
[0078] The WIFI printer determines whether printing is successful. If not, that is, printing is unsuccessful, the WIFI printer feeds back the reason for printing failure to the corresponding WIFI terminal, and the corresponding WIFI terminal terminates printing and gives a corresponding prompt based on the feedback status of the WIFI printer; if yes, that is, printing is successful, the WIFI printer feeds back the printing success result to the corresponding WIFI terminal, and the WIFI terminal feeds back printing completion to the user.
[0079] The response mechanism between the WIFI printer and the WIFI terminal ensures the stability and reliability of the system and effectively prevents common problems such as blind typing, missed typing, and wrong typing.
[0080] At this point, multiple WIFI terminals have completed the task of connecting to the same printer and printing simultaneously, and are waiting for the arrival of the next printing task.
[0081] The WIFI terminal is a smart phone, a smart tablet, etc.
[0082] Example 2
[0083] refer to Figures 1 to 2 As shown, the present invention provides a system for connecting multiple terminals to the same printer for simultaneous printing based on the method of embodiment 1, comprising: two or three or more WIFI terminals, a WIFI printer supporting wireless communication, and a network connection module. The WIFI terminal is a smart phone, a smart tablet, etc. In this embodiment, preferably, there are three WIFI terminals, namely: A WIFI terminal, B WIFI terminal, and N WIFI terminal. The network connection module is used to establish a local area network through a self-built AP hotspot of the WIFI printer or an external WIFI router, so that all WIFI terminals establish a wireless connection with the WIFI printer. When the network connection module adopts the self-built AP hotspot mode of the WIFI printer (that is, the WIFI printer has a hotspot function), the WIFI printer directly establishes a wireless connection with each WIFI terminal through its own SSID and password. When the network connection module adopts an external WIFI router, the WIFI printer and each WIFI terminal access the same local area network through the SSID and password of the WIFI router.
[0084] The WIFI terminal is configured as:
[0085] (a) Store the IP address of each WIFI printer and query the status of each WIFI printer;
[0086] (b) When the WIFI printer status is "OK", a print instruction and print data are sent to the WIFI printer;
[0087] (c) receiving the printing result fed back by the WIFI printer;
[0088] (d) Providing corresponding prompts based on the feedback status of the WIFI printer, including but not limited to beeping sounds and / or text prompts.
[0089] The WIFI printer is integrated with a cache processing unit and a print control unit, and its configuration is as follows:
[0090] A buffer area is opened in the RAM on it to receive the printing data sent concurrently by multiple WIFI terminals and classify and package them, verify the integrity of the printing data, execute printing in sequence according to the package order, and feedback the results to the WIFI terminal to determine whether the printing is successful.
[0091] The above are only some embodiments of the present invention. For those skilled in the art, several modifications and improvements can be made without departing from the creative concept of the present invention, which all fall within the scope of protection of the present invention.
Claims
1. A method for printing simultaneously by connecting multiple terminals to the same printer, characterized in that: The following steps are involved: Step S1, building a wireless local area network: selecting the WIFI printer AP mode or router mode to wirelessly connect the WIFI printer to multiple WIFI terminals; Step S2: Obtain the IP address of the WIFI printer and configure it to each WIFI terminal; Step S3: After the WIFI terminal starts the print task, it queries the WIFI printer status based on the IP address; Step S4: If the WIFI terminal finds that the WIFI printer is in normal condition, the printing data is sent to the WIFI printer; Step S5: The WIFI printer receives the print data, classifies and packages it, and verifies the integrity of the print data; Step S6: If the print data verified by the WIFI printer is complete, the WIFI printer prints the print instructions and print data transmitted by each WIFI terminal in sequence according to the classified data packets; Step S7: The WIFI printer determines whether the printing is successful. If not, the reason for the printing failure is fed back to the corresponding WIFI terminal. The corresponding WIFI terminal terminates the printing and gives a corresponding prompt based on the feedback status of the WIFI printer. If yes, the printing success result is fed back to each WIFI terminal, and each WIFI terminal feeds back that the printing is completed.
2. The method for printing simultaneously by connecting multiple terminals to the same printer according to claim 1, characterized in that: In step S5, the classification and packetization includes: classifying and packetizing the print data concurrently sent by multiple WIFI terminals according to the source terminals based on the terminal identification information carried in the received data packets.
3. The method for printing simultaneously by connecting multiple terminals to the same printer according to claim 2, characterized in that: The classification and grouping adopts a single buffer sorting mode, which specifically includes: Open a cache area in the WIFI printer RAM and set a timer of n seconds; The WIFI printer stores the commands and print data sent by each WIFI terminal in the set buffer area in the order of receiving time without distinction; When the timer reaches the preset duration n seconds, the reception stops. The duration n is dynamically adjusted according to the number of terminals, data volume and network quality; The WIFI printer uses the IP address of each WIFI terminal in the cache area as a serial number, and arranges them in chronological order to generate independent printing data packets corresponding to the WIFI terminals. At this point, the classification and packaging tasks are completed.
4. The method for printing simultaneously by connecting multiple terminals to the same printer according to claim 2, characterized in that: The classification and grouping of packages adopts a multi-cache direct storage mode, specifically including: Open an independent cache area for each WIFI terminal IP address in the WIFI printer RAM; Real-time analysis of the source IP address of received data packets; Store the data packet directly into the independent buffer area of the corresponding WIFI terminal according to the source IP address; When the WIFI printer detects that there is no data transmission from the WIFI communication port within a preset time, it determines that data reception is completed; The data arranged in sequence in each independent buffer area forms a complete terminal printing data packet, and the classification and packaging tasks are completed.
5. The method for printing simultaneously by connecting multiple terminals to the same printer according to claim 1, characterized in that: In step S5, the WIFI printer sets its own status to “busy” when receiving data from each WIFI terminal.
6. The method for printing simultaneously by connecting multiple terminals to the same printer according to claim 1, characterized in that: In step S5, the verification of the integrity of the printed data includes: Check whether the print data packet contains the start and stop instructions. And / or, verify whether the size of the received print data is consistent with the size of the print data sent by the WIFI terminal.
7. The method for printing simultaneously by connecting multiple terminals to the same printer according to claim 1, characterized in that: In step S6, if the print data verified by the WIFI printer is incomplete, the WIFI printer feeds back "printer data reception abnormality" to the corresponding WIFI terminal.
8. A system for connecting multiple terminals to the same printer for simultaneous printing based on any one of the methods of claims 1 to 7, characterized in that: include: At least two WIFI terminals; A WIFI printer that supports wireless communication; Network connection module: used to build a local area network through the WIFI printer's own AP hotspot or an external WIFI router, so that all WIFI terminals can establish a wireless connection with the WIFI printer; The WIFI terminal is configured as follows: (a) Store the IP address of each WIFI printer and query the status of each WIFI printer; (b) When the WIFI printer status is "OK", send the print command and print data to the WIFI printer; (c) receiving the printing result fed back by the WIFI printer; (d) Prompt correspondingly based on the feedback status of the WIFI printer, including but not limited to beeping sounds and / or text prompts; The WIFI printer configuration is: A buffer area is opened in the RAM on it to receive the printing data sent concurrently by multiple WIFI terminals and classify and package them, verify the integrity of the printing data, execute printing in sequence according to the package order, and feedback the results to the WIFI terminal to determine whether the printing is successful.
9. A system for connecting multiple terminals to the same printer for simultaneous printing according to claim 8, characterized in that: When the network connection module adopts the WIFI printer self-built AP hotspot mode, the WIFI printer directly establishes a wireless connection with each WIFI terminal through its own SSID and password.
10. The system for connecting multiple terminals to the same printer for simultaneous printing according to claim 8, characterized in that: When the network connection module adopts an external WIFI router, the WIFI printer and each WIFI terminal are connected to the same local area network through the SSID and password of the WIFI router.
Citation Information
Patent Citations
Webpage selectable printing method for mobile terminal based on local area network
CN102368202A
IP recognition based printer task control device
CN108920112A
Networking communication system and method for coordinating printers
CN114185496A
Printer apparatus and method of controlling same
US6229622B1