I have been looking into this question for almost a month now. It seems I am being pushed in all different directions. I hope someone can help me with an answer.
to give a brief model of what I am looking for:
I have a webserver that has information I need to get to a thermal printer through the internet to be printed. I DO NOT want a computer to be the intermediary. I have no problem doing the necessary programming to make this happen. My problem has come through finding the devices that I will be able to program. the first problem I came accross was finding a thermal receipt printer that has a built in webserver that I could program to poll my server for information to print. There are no printers currently available for this purpose. I have talked to Zebra, Epson, Brother, etc. Most have a solution for printing if both devices are on the same network such as a mobile phone printer to a printer on the same network the mobile phone is connected to and most have SDK's to do it. I need the printer to be able to poll my webserver. So I went looking for an alternative. Maybe I could attach a wireless USB mini web server to the printer to reach my end goal. I thought this would be a simple task but its not. My question for the users here at stackoverflow.com is has anyone come accross as similar problem and know a solution? again I have spoken to the different manufacturers and none of them are able to help. I think most of them are not even able to understand what I am talking about. I hope those that program here my understand my problem.
Below is a homegrown roundabout solution for what I am trying to do.
http://proto-pic.co.uk/internet-connected-thermal-printer-kit/
again this solution above requires me to build it from the ground up. The berg cloud is another option but they do not allow me to control my web server and everything runs through them. Please feel free to ask questions as I do not expect a quick answer to this problem. I hope there are programmers who came across a similar problem.
Also to reference the tag I chose for this question, I was thinking maybe I could attach a device(Web server micro controller setup) to the thermal printer that maybe has a JVM running a webserver that I could then have communicate through USB to printer. I know Java is much worse than C for a microcontroller but its what I know. would love to hear any alternative solution.
I've successfully created mini websocket server to talk with ZD420 - LinkOS powered Zebra printers.
To configure printer I wrote small python utility (tested on linux) https://github.com/elops/zebra-wifi-tool
This tool will setup printer to connect to wifi network, and via that wifi network connect to weblink location. weblink location is Zebra name for URL of your websocket server. You can easily adjust configuration, send print jobs and much more through websocket.
Python implementation of websocket server was coded with python 3.5 using asyncio
and websockets
Core functionality is basically c/p from docs here http://websockets.readthedocs.io/en/3.4/intro.html#both
You need 3 co-routines:
Connection handler: this co-routine is responsible for listening what happens first on your websocket, is it data receive or data send. Whichever happens first other one is canceled and it loops.
Producer: This co-routine is used to push data to IoT device through active websocket.
Consumer: This co-routine is fed the data IoT device sends through websocket to server.
Websocket handshake looks like this
start_server = websockets.serve(handler, 'localhost', 6000, subprotocols=['v1.weblink.zebra.com'], extra_headers={'Content-Length': '0'})
Whole thing works like charm, very reliable and highly configurable and feature rich solution for various scenarios where you need to print from web application to printers that are somewhere connected to the internet. I've paired bar code scanner with ZD420 printer. Scanned data can be easily sent to websocket server via same websocket printer uses for printing so you can create powerful solutions for POS environments on the web.