Code Monkey home page Code Monkey logo

webapp-hardware-bridge's Introduction

WebApp Hardware Bridge

WebApp Hardware Bridge (succeeder of "Chrome Hardware Bridge / Chrome Direct Print")

Make it possible for WebApp to perform silent print and access to serial ports.

Common use cases:

  • Web-based POS - PDF and ESC/POS receipt silent print
  • Web-based WMS - Serial weight scale real-time reading, delivery Note/packing List silent print
  • WebApp that need to read/write to serial ports

Features

  • Direct print from webpage
  • Serial read/write from webpage
  • Support all modern broswers that implemented WebSocket (Chrome, Firefox, Edge... etc)
  • JS SDK/Example included

Web Direct Print

  • 0-click silent printing in web browsers
  • Download via URL / Base64 encoded file / Base64 encoded binary raw command
  • Support multiple printers, mapped by key
  • Support PDF/PNG/JPG Printing
  • Support RAW/ESC-POS Printing

Web Serial Access

  • Bidirectional communication
  • Support multiple ports, mapped by key
  • Support multiple connection share same serial port
  • Serial weigh scale (AWH-SA30 supported out-of-box in JS SDK)

How to use?

Client Side

  1. Install and setup mapping via Configurator

  2. Start "WebApp Hardware Bridge" and start using your WebApp

WebApp Side

  1. Check JS SDK/Example

How it works?

WebApp Hardware Bridge is a Java based application, which have more direct access to hardwares.

It expose a WebSocket server on localhost which accept print jobs and serial connection.

For print jobs, PDF/Images job are downloaded/decoded and then sent to mapped printer.

Raw job are sent to mapped printer directly.

For serial port, serial port are opened by Java and "proxified" as WebSocket stream,

which allow bidirectional communcations.

Configurator is provided to setup mappings between keys and printers/serials.

Therefore web apps do not need to care about the actual printer names.

Known Issue

  • Browser refuse to connect to non-Secure WebSocket server Firefox Workaround: Change "network.websocket.allowInsecureFromHTTPS" to true in about:config

FAQs

Advanced Usages

TODOs

  • Serial settings (Baudrate, data bits, stop bit, parity bit)

Any other ideas? Fork and PR are welcome!

webapp-hardware-bridge's People

Contributors

imtigger avatar timeslogistics avatar reneburghardt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.