Code Monkey home page Code Monkey logo

wsd-python's Introduction

I'm a student, and I don't have a job yet, so if you like my repo, please consider to gift me a cup of coffee โ˜•

Donate

PyWSD

Web Services for Devices (WSD) tools and utilities for cross platform support.

Documentation

You can browse the documentation on readthedocs.io.

Abstract

The Web Services for Devices is a set of specifications aimed to handle network communication between devices which offer some kind of functionality or need to signal events. There's a discovery protocol, a way to retrieve a list of services from endpoints, and a set of rules built on top of XML/SOAP messages over UDP for commands/events.

Windows uses WSD as a way to discover and interact with a wide range of printers and scanners nowadays. Other WSD applications are less-known, but this project aims to cover the standard with a generic set of tools suitable even for those devices.

Linux and Mac OS users everyday have to deal with a not-so-good (or absent) full support for printers/scanners. For example, Canon does not support Linux at all, and distributes bugged drivers that are not fully open source, nor integrates well with existing and coherent Linux printing and scanning frameworks. Device-initiated operations are not supported at all. This is going to change: WSD standards are not well-known, but fortunately they are documented, and easy to reverse-engineer if needed.

So my idea is to get a good comprehension of the protocol, implement a draft library and a set of associated tools in python, then test it until the implementation is mature. The natural next step will be C implementation, that will finally enable the SANE and CUPS wsd backends implementations.

A library for simulating/implementing new WSD devices could also be developed, and it would allow seamless integration of devices shared from a linux instance and a Windows-enabled client, for example.

Developer notes

Required python version: 3.6
Docstring style complies IntelliJ PyCharm suggestions

Project status

As you can see, I'm the only developer. I need people to test my library, develop tools from it (some demo bits are among the modules, but they're just for on-the-fly debug while developing).

Here's the list of targets for now:

  • Python library for scanners (70% done IMHO)
  • C library for scanners
  • SANE backend for scanners
  • Linux daemon for device-initiated scans

Protocol public resources (PDF/DOC/HTML from MSDN/W3C/SOAP)

WS-Discovery
WS-Transfer
PNP-X

WSD-Profiles

WS-Print
WS-Scan

wsd-python's People

Contributors

roncapat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wsd-python's Issues

I have been updating a Scanner GUI

I have been updating a scanner Web GUI that I made for several models of orphaned scanners thanks to a command line binary. Recently I added eSCL/AirScan support, meaning that it can take advantage of and now use eSCL Scanners. Not only that . It should also allow the orphaned scanners to be available via AirScan (by way of the Linux host). The scanner web GUI offers some quick edit tools (imagemagick) like Grayscale. PDF (the orphaned scanners only to JPG in color), and a cropping tool by way of jcrop. Aside from the quickedit tools the latest version integrates Tui Image Editor. I figure I am in the testing Phase for scanner compatibility. I know there are remaining issues elsewhere they are just things That I need to deal with after making way for GUI changes and eSCL .

What I need to say is that this project is interesting . It is similar to those that originally had me interested in eSCL but in the case of eSCL I did not find any python projects that were actually mature enough. They all had issues, and I ended up writing it all in php. So if I implemented this to my Web GUI project for a WSD scanner (that did not support eSCL/AirScan), my Web GUI could also make it available as an AirScan scanner.

I am also interested in going the other way too however and have an orphaned or eSCL scanner be abailable as a WSD device if that is even possible. I do not believe that there is any WSD advertising available in linux yet.

For now I wish you luck and hope you have great success and can do broad testing , as I do not have a WSD scanner to test with . Using your python code would make it a no-brainer.

I do not understand why the Linux SANE projects lag so far behind when it comes to new scanner technology and why the support is so limited. they do a wonderful job on USB, Parallel, and Net scanners why did they never implement the ability to use an external command line at all? I hope that the Fred, Wilma, Barney and Betty at the SANE project wake up soon so they can get from the Flintstones to the Jetsons . Airscan has been on OSX and iOS for years now and SANE still has not woke up to it.

Strict ws-discovery support

  • fallback to epRefAddr to obtain a network-resolvable URI if no XAddrs present

if the value of this element is not a network-resolvable transport address, such transport address(es) are conveyed in a separate d:XAddrs element

  • support discovery proxies

Clients listen for this signal that one or more DP are available, and for subsequent searches, Clients do not send Probe and Resolve messages multicast but instead unicast directly to one or more DP whilst ignoring multicast Hello and Bye from Target Services.

  • Check application instance ID and sequence ID (and discard older messages??)
  • Update information in database only if MetadataVersion has changed

Sane FRONT end?

I would like to see the day SANE is the default scanner server for linux, mac and windows. Sane's net backend and the Airsane front end make it possible to serve Linux and Mac clients right now. Would your work allow Windows clients to scan (via WS-Scan) from a Sane server? IOW, expose the SANE scanners as WSD Scan devices on a network?

AttributeError: module 'PyWSD.wsd_common' has no attribute 'init'

I tried to run the demo code in wsd_scan_operations but init function is not found in wsd_common

Traceback (most recent call last):
  File "/home/acosta/Projects/scanner/WSD-python/src/PyWSD/wsd_scan__operations.py", line 329, in <module>
    __demo()
  File "/home/acosta/Projects/scanner/WSD-python/src/PyWSD/wsd_scan__operations.py", line 288, in __demo
    wsd_common.init()
AttributeError: module 'PyWSD.wsd_common' has no attribute 'init'

Command-line Interface

I would like to test it but can only invest minimal effort. Can you provide a small code snippet for scanning? Or even better provide a simple command-line interface?

We corresponded about eSCL to WSD bridge

We corresponded about eSCL to WSD bridge

I was wondering if you ever worked on it at all

If I had better understanding of the WSD protocol I could do it in PHP but so little info on real world WSD it seems. Some of your links to Microsoft are now dead too.

I already have a good handle on eSCL and have PHP doing a lot of the work , see http://scannershare.com .

Ideally my goal would be to use a a bridge on Windows with eSCL scanners, with the bridge translating to WSD to communicate with Windows.

Mark

Handle ipv6 link-local scopes

Detect the interface through which a target may be reached, and use it in ipv6 URIs.

eg.
http://[fe80:::::%eth0]:80/

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.