Giter VIP home page Giter VIP logo

airscan's People

Contributors

danderson avatar denysvitali avatar dnwe avatar markdrayton avatar meistert avatar mikue avatar nenad avatar pookaboydunc avatar probonopd avatar stapelberg avatar tubit 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

airscan's Issues

Check if scanner support ADF in Duplex mode

Some printers are using an ADF in simplex mode, because they don't support duplex mode.
Setting the wrong option for duplex (or in the case of the CLI, having it set to true as a default) can cause some issues.

For example, in my "Canon MF642C/643C/644C" device (ADF, Simplex), starting a scan with duplex mode causes the scanner to crash, and the only way to get out of this mode is to... reboot the printer.

$ airscan1 -debug=true -host=Canon00000 -source=adf -duplex=true
# Truncated
2023/03/10 01:05:49 device "Canon MF642C/643C/644C" found in 150.795627ms
2023/03/10 01:05:53 http://Canon00000/eSCL/ScanJobs: unexpected HTTP status: got 500 Internal Server Error (), want 201

After this, the printer gets stuck in this view:
scanning

After "Cancel" is pressed, the printer remains stuck in this view:
canceling

The only way to get rid of that screen is to power off the device entirely (unplug it from the socket) and boot it again.

Device Information

Make: Canon
Model: MF642C/643C/644C

Version

Main Controller: 05.18
Boot ROM: 01.01
DCON: 02.01
Language: 01.13

(I have no clue on why the language has a version on its own)

Proposed fix

Check for the scanner capabilities before assuming it can perform a duplex scan :D

P.S: I hate printers.

panic: runtime error: invalid memory address or nil pointer dereference

me@host:~$ '/home/me/Downloads/go/bin/go' get  github.com/stapelberg/airscan/cmd/airscan1

me@host:~$ '/home/me/Downloads/go/bin/go' install github.com/stapelberg/airscan/cmd/airscan1

me@host:~$ ./go/bin/airscan1
2020/08/16 14:35:07 finding device for 5s (use -timeout=0 for unlimited)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x7111fa]

goroutine 1 [running]:
github.com/stapelberg/airscan.NewClientForService(0x0, 0x0)
	/home/me/go/src/github.com/stapelberg/airscan/airscan.go:333 +0x3a
main.(*airscanner).scan1(0xc0000de580, 0x0, 0x0)
	/home/me/go/src/github.com/stapelberg/airscan/cmd/airscan1/airscan1.go:173 +0x52
main.airscan1(0x0, 0x0)
	/home/me/go/src/github.com/stapelberg/airscan/cmd/airscan1/airscan1.go:155 +0x6e9
main.main()
	/home/me/go/src/github.com/stapelberg/airscan/cmd/airscan1/airscan1.go:238 +0x25

This is my printer (I do not know whether it should be supported): HP LaserJet 200 colorMFP M276n. It is being advertised with Zeroconf as _scanner._tcp.

dug with compatible checking ?

Wonder how we determine if a printer is / is not compatible ?
Some white list ?

So it say its not compatible :

airscan1 
2021/10/29 17:12:50 finding device for 5s (use -timeout=0 for unlimited)
2021/10/29 17:12:50 device "Brother MFC-L2710DW series" discovered (use -host="BRW90324B93B317")
2021/10/29 17:12:55 no compatible scanner found

Yet it works !


airscan1 -host BRW90324B93B317
2021/10/29 17:13:25 finding device for 5s (use -timeout=0 for unlimited)
2021/10/29 17:13:26 device "Brother MFC-L2710DW series" found in 301.239815ms
2021/10/29 17:13:32 wrote /tmp/page1.jpg (136163 bytes)
2021/10/29 17:13:33 scan done in 6.889450047s

set output folder ?

works on my printer first time.

Wondering if there is any possibility to control where it puts the documents ?

colour mode support?

Q. would you be happy to review a small PR to add a cmdline parameter for the colour mode to pass through to the scanner?

e.g.,

-color_mode string
    	Color mode to scan using. One of BlackAndWhite1, Grayscale8 (default) or RGB24 (default "Grayscale8")

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.