Git Product home page Git Product logo

es2button's People

Contributors

janrueth avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

joberthel

es2button's Issues

Scanners with spaces in the name lead to "ERROR : Option format invalid."

In example-epsonscan2.sh you call epsonscan2 with e.g.

epsonscan2 -s ${ES2_DEV} $(dirname $0)/a4_preset.SF2

this fails on my system with a Epson ES-60W since epsonscan2 lists my Epson ES-60W with a space in the name.

$ epsonscan2 -l
 === List of available devices ==
device ID :Epson ES-60W:003:016
ModelID:ES0181

I have to add quotes to the call:

epsonscan2 -s "${ES2_DEV}" $(dirname $0)/a4_preset.SF2

Without the quotes, I receive the error "Option format invalid":

$  /usr/bin/es2button /usr/share/es2button/example/merge-pdfs.sh
[...]
+ epsonscan2 -s Epson ES-60W:003:017 /usr/share/es2button/example/test.SF2
ERROR : Option format invalid.
+ echo 'Finished scan'
Finished scan
Resuming from script


failed handling button press: Invalid Parameter

Hello!

Thanks for this -- it's awesome and exactly what I need!

However, I'm having some trouble getting it to work with my Epson WF-2935 printer/scanner on a Raspberry Pi 5 running Debian 12.5 Bookworm. Unfortunately, it seems that libtiff5 and libwebp6 aren't available on Bookworm so I installed the .deb files from the Debian package site directly which seemed to work, but it might well be the problem.

In saying that, I had no problem building Epson Scan 2 directly from Epson - just your arm64 build of ES2 failed to install without them (and building it failed even with the Dockerfile because of Unknown CMake command "QT5_USE_MODULES".

I have just seen though that building and/or installing ES2 shouldn't be necessary for the Rust remake.


When setting it up with the Rust rewrite of es2button, I'm seeing this:

May 03 11:59:55 pi5 es2button[82861]: [ERROR es2button::listener] failed handling button press: Invalid Parameter

And then the printer starts yelling about a Communication error.

Is there anything you'd recommend to be able to pin down what the Invalid Parameter is?

Cheers!

es2button crashes, when executed by service

I build es2button on an arch linux system. As scanner I use an Epson ES-60W. It works, when I run in manually:

$ /usr/bin/es2button /usr/share/es2button/example/merge-pdfs.sh
Using "/usr/share/es2button/example/merge-pdfs.sh" as program to call
Initializing Epson ES-60W, vid=04B8, pid=016E, bus=003, dev=016
Failed checking card scanning status
Calling script: /usr/share/es2button/example/merge-pdfs.sh
+ [[ /home/myuser = \u\n\s\e\t ]]
+ echo 'Button 1 pressed on Epson ES-60W:003:016 (VID:PID=04B8:016E)'
Button 1 pressed on Epson ES-60W:003:016 (VID:PID=04B8:016E)
+ [[ ! Yes = \Y\e\s ]]
+ echo 'Starting scan'
Starting scan
+ [[ No = \N\o ]]
+ echo 'Scanning A4 paper'
Scanning A4 paper
++ dirname /usr/share/es2button/example/merge-pdfs.sh
+ epsonscan2 -s 'Epson ES-60W:003:016' /usr/share/es2button/example/test.SF2
Corrupt JPEG data: found marker 0xd9 instead of RST5
+ echo 'Finished scan'
Finished scan
Resuming from script
Failed checking card scanning status
Calling script: /usr/share/es2button/example/merge-pdfs.sh
+ [[ /home/myuser = \u\n\s\e\t ]]
+ echo 'Button 1 pressed on Epson ES-60W:003:016 (VID:PID=04B8:016E)'
Button 1 pressed on Epson ES-60W:003:016 (VID:PID=04B8:016E)
+ [[ ! No = \Y\e\s ]]
++ date +%Y%m%d-%H%M%S
+ pdfunite /tmp/img1.pdf /tmp/20231201-082437-scan.pdf
+ rm /tmp/img1.pdf
+ exit
Resuming from script

But when the daemon is run by [email protected], it segfaults:

$ journalctl -f
[...]
Dez 01 08:19:56 compi kernel: usb 3-3.2: new high-speed USB device number 14 using xhci_hcd
Dez 01 08:20:02 compi kernel: usb 3-3.2: device descriptor read/64, error -110
Dez 01 08:20:03 compi kernel: usb 3-3.2: New USB device found, idVendor=04b8, idProduct=016e, bcdDevice= 2.33
Dez 01 08:20:03 compi kernel: usb 3-3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Dez 01 08:20:03 compi kernel: usb 3-3.2: Product: Epson ES-60W
Dez 01 08:20:03 compi kernel: usb 3-3.2: Manufacturer: EPSON
Dez 01 08:20:03 compi kernel: usb 3-3.2: SerialNumber: X5RF010702
Dez 01 08:20:03 compi systemd[1]: Started ES2Button for Epson.
Dez 01 08:20:03 compi (udev-worker)[13565]: 3-3.2: Process '/usr/bin/systemctl start es2button@Epson ES\x2d60W:3:14.service' failed with exit code 5.
Dez 01 08:20:03 compi kernel: usb 3-3.2: reset high-speed USB device number 14 using xhci_hcd
Dez 01 08:20:03 compi kernel: es2button[13568]: segfault at 0 ip 00007f26886698b5 sp 00007ffca8a27b90 error 4 in libc.so.6[7f2688644000+15a000] likely on CPU 6 (core 2, socket 0)
Dez 01 08:20:03 compi kernel: Code: ec 28 49 8b 41 08 48 89 74 24 08 44 89 44 24 18 85 c9 0f 85 05 03 00 00 83 ff 01 0f 84 74 01 00 00 83 ff 24 0f 87 6b 01 00 00 <49> 0f be 14 24 49 8b 49 68 4c 89 e3 48 89 d0 f6 44 51 01 20 74 18
Dez 01 08:20:04 compi systemd[1]: Started Process Core Dump (PID 13579/UID 0).
Dez 01 08:20:04 compi systemd-coredump[13580]: [๐Ÿก•] Process 13568 (es2button) of user 0 dumped core.
                                                
                                                Stack trace of thread 13568:
                                                #0  0x00007f26886698b5 n/a (libc.so.6 + 0x4b8b5)
                                                #1  0x00007f268865dbb4 atoi (libc.so.6 + 0x3fbb4)
                                                #2  0x000055626cd3fa21 main (es2button + 0x5fa21)
                                                #3  0x00007f2688645cd0 n/a (libc.so.6 + 0x27cd0)
                                                #4  0x00007f2688645d8a __libc_start_main (libc.so.6 + 0x27d8a)
                                                #5  0x000055626cd3f6f5 _start (es2button + 0x5f6f5)
                                                ELF object binary architecture: AMD x86-64
Dez 01 08:20:04 compi systemd[1]: [email protected]: Main process exited, code=dumped, status=11/SEGV
Dez 01 08:20:04 compi systemd[1]: [email protected]: Failed with result 'core-dump'.
Dez 01 08:20:04 compi systemd[1]: [email protected]: Deactivated successfully.
Dez 01 08:20:13 compi kernel: usb 3-3.2: USB disconnect, device number 14

I'm not sure, why. I call the same program:

$ cat /lib/systemd/system/[email protected]
# copy this file to /etc/systemd/system/
# reload systemd services: systemctl daemon-reload
# adjust path to your es2button program that is supposed to be called
# note: your program will be executed as nobody:scanner
# make sure this uid:gid can access whatever it needs
# udev rule populates %I with the es2button device

[Unit]
Description=ES2Button for %I

[Service]
User=root
Group=scanner
Type=simple
#ExecStart=/usr/bin/es2button -d "%I" /etc/es2button/entrypoint
ExecStart=/usr/bin/es2button /usr/share/es2button/example/merge-pdfs.sh 

[Install]

Bug scanimage example - wrong device ID created

Hi, thank you for creating this nice service ๐Ÿ˜„

While playing to integrate to my environment, I stumbled upon problems with 'example-scanimage.sh' that blocks to scan an image:

matthias@flunder:/etc/es2button$ journalctl -f
Jun 04 15:22:58 flunder es2button[3835]: Output format is not set, using pnm as a default.
Jun 04 15:22:58 flunder es2button[3835]: scanimage: open of device epsonscan2:DS-310:004:004:esci2:usb::345 failed: Invalid argument
Jun 04 15:22:58 flunder es2button[3823]: Finished scan
Jun 04 15:22:58 flunder es2button[3822]: /
matthias@flunder:/etc/es2button$ scanimage -L
device `epsonscan2:DS-310:004:004:esci2:usb:ES013E:345' is a EPSON DS-310:004:004 flatbed scanner

So the PID seems to empty? Is this caused by my previous installed epsonscan2 installation? ๐Ÿค”

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.