Printing from a web server to a thermal printer without intermediaries

I have been dealing with this issue for almost a month now. They seem to be pushing me in different directions. Hope someone can help me with the answer.

to give a brief model of what I'm looking for:

I have a web server that has the information I need to get to print a thermal printer over the Internet. I do NOT want the computer to be an intermediary. I have no problem doing the necessary programming for this to happen. My problem arose when searching for devices that I can program. The first problem I ran into was finding a thermal receipt printer with a built-in web server that I could program to poll my server for printing. There are currently no printers for this purpose. I spoke with Zebra, Epson, Brother, etc. Most of them have a print solution if both devices are on the same network, such as a printer for a mobile phone, to a printer on the same network as the mobile phone, and most of them have an SDK for doing this. I need the printer to poll my web server. So I went looking for an alternative. Perhaps I could connect a wireless USB mini-server to the printer to achieve the final goal. I thought it would be a simple task, but it is not. My question is for users here on stackoverflow.com, does anyone have a similar problem and know a solution? again I spoke with different manufacturers, and none of them can help. I think that most of them are not even able to understand what I'm talking about. I hope that those who work here understand my problem.

Below is the homemade circular solution for what I'm trying to do.

http://proto-pic.co.uk/internet-connected-thermal-printer-kit/

again, this solution above requires me to build it from scratch. The berg cloud is another option, but they do not allow me to control my web server and everything goes through them. Please feel free to ask questions, as I do not expect a quick answer to this problem. Hopefully there are programmers who have run into a similar problem.

Also for the link to the tag that I chose for this question, I thought maybe I can connect the device (setting up the web server microcontroller) to a thermal printer, which can have a JVM running on the web server, which I could then exchange via USB to the printer. I know that Java is much worse than C for a microcontroller, but that is what I know. I would like to hear any alternative solution.

+4
source share
3 answers

I have successfully created a websocket mini-server to communicate with the ZD420 - Zebra LinkOS printers.

To set up the printer, I wrote a small python utility (tested on Linux) https://github.com/elops/zebra-wifi-tool

This tool will install a printer to connect to a Wi-Fi network, and through this Wi-Fi network to connect to the location of the web link. The web link location is the Zebra name for the URL of your web server server. You can easily configure, send print jobs and more via websocket.

Python websocket server implementation was encoded using python 3.5 using asyncio and websockets

The main functionality is mainly c / p from docs here http://websockets.readthedocs.io/en/3.4/intro.html#both

You need 3 joint procedures:

  • 1x connection handler
  • 1x manufacturer
  • 1x consumer

Connection handler: This joint routine is responsible for listening to what happens first on your website, whether it is data transfer or data transfer. Whatever happens, the first other is canceled, and it ends.

Manufacturer: This collaborative routine is used to transfer data to an IoT device using an active website.

Consumer: This collaborative routine feeds the data that the IoT device sends through the websocket to the server.

The Websocket handshake looks like this: start_server = websockets.serve(handler, 'localhost', 6000, subprotocols=['v1.weblink.zebra.com'], extra_headers={'Content-Length': '0'})

The whole thing works like a charm, a very reliable and customizable and multi-functional solution for various scenarios where you need to print from a web application to printers that are somewhere connected to the Internet. I connected a barcode scanner to the ZD420 printer. Scanned data can be easily sent to the websocket server through the same websocket printer for printing, so you can create powerful solutions for the POS environment on the Internet.

0
source

I highly recommend that you reconsider the Zebra websocket solution at this point.

The best solution may still be a solution for mini-web servers.

My experience with Zebra websocket: Help:

First I tried to create a node.js solution (I read in several places that any server is doable). But after several unsuccessful connection attempts, even after Zebra signed the certificates - and the printer / server went through a successful connection process - it still failed with a mysterious error, which when viewed was due to a printer trying to verify that a specific Tomcat version / server used !!! ???

I received a response from a Zebra developer who is developing a .NET solution, but also cannot get it to work and is waiting for additional information from Zebra engineers before they can complete the solution. They said they would send it through the information when it had it, and hoped to receive it within a week (more than a week - until it was lucky).

So, I decided to build a Tomcat server - the only example that Zebra works ... I got a servlet example, but started to get new certificate problems (since I changed servers / domains, etc.), it made me think about everything awkward the process - and 1 transaction robber admitted - the very strict authentication and ssl signing process is too risky.

eg. Let's say you have 100 clients relying on this solution. If you NEVER have problems with a certificate (for example, changing a domain name, changing a serverโ€™s settings, or revoking or expiring a certificate), then ALL 100+ clients do not have their own printer. But you cannot just fix it yourself. To fix / generate a new certificate, etc., the process of re-signing is slow and depends on external resources! (This is a Zebra btw manual process - you send an e-mail and you are left waiting for a significant amount of time before a Zebra employee will respond with a signed certificate).

This means that all clients of more than 100 clients without significant time do not work with the printer, but you do not have the OPTION option, but Zebra signs your certificate. For me, this is an unacceptable risk - (the websocket solution should NOT be associated with a certificate signed by Zebra - after you install the YOUR printer (or your client), you then configure the printer to specify the EXACT domain name / address for it to connect to).

With your solution for mini-servers - if the client has a problem - it will affect only one client, and you DO NOT rely on an external company to sign certificates to fix the problem.

Here are the identified problems and the associated risks.

PROBLEM 1) It is very poorly implemented - I cannot (and they also cannot) connect it to a standard server, different from a VERY specific Tomcat installation !!! RISK LEVEL: LOW - that is, the initial cost and time load - but as soon as the running permanent risk of this problem, causing a further problem, is minimal. RISKS: a) Limits development to specific servers and technologies. b) Increased time and costs for initial development / testing.

PROBLEM 2) Poorly documented - I identified (and Zebra checked) several errors in the documentation - the documentation is also scattered with important information thrown into the inaccessible readme.txt file, separate for the rest of the documentation. RISK LEVEL: LOW - that is, the initial cost and time load - but as soon as the running permanent risk of this problem, causing a further problem, is minimal. RISKS: a) Slows down initial development. b) Increased time and costs for initial setup / development.

PROBLEM 3) Printer / ssl authentication is poorly planned and implemented. It involves several steps - extremely restrictive and requires a slow zebra signing process, which creates constant risk. RISK LEVEL: HIGH - i.e. we cannot work with this solution. RISKS: a) Limits development to specific servers and technologies. b) slows down the initial development. c) Increased time and cost of initial installation / development. d) It creates a constant high-level risk for the project as follows: ---> The idea is that the company will rely on this solution to connect to the printer - therefore, any potential downtime can cause MAJOR BUSINESS DESTRUCTION. ---> ANY of the following scenarios would mean that ALL clients relying on this web-based mailing solution would work without printers for several days until new Zebra certificates were organized: ---> 1) The certificate expires , 2) The certificate is invalid, 3) The server has been moved, 4) the domain information is changed, 5) Tomcat server settings have been changed (due to the way the printer checks certain Tomcat / server settings) ---> In addition, the above 5 scenarios are known only based on my testing so far - can There may be other possible limitations that may indicate certificate failures that I have not yet met.

Summary: IMO Problem 3 is an unacceptable risk, and the following two things must happen before I review Zebra websites. 1) They need the correct documentation on how webcams connect to the server, because it is hidden, and even Zebra employees are currently in the dark. 2) They need to remove some authentication restrictions so that you can fix any problem without the time-consuming Zebra interaction.

+3
source

Zebra offers printers that can communicate through websockets. If your web server is public (i.e. available on the Internet), you can open a web socket connection between the printer and the server and simply send data when there is new information for service. Although it seems that you need the printer to start a conversation, perhaps having a constantly open connection to the web server will help you fulfill your needs. This eliminates the need for any intermediate computers, and printers instead access the server directly.

Zebra Websocket printers: http://www.zebra.com/us/en/products-services/software/link-os/cloud-connect.html

Zebra (Java) SDK: http://www.zebra.com/us/en/products-services/software/link-os/link-os-sdk.html

If you need a thermal receipt printer that supports this, the iMZ model should be sufficient.

+1
source

All Articles