LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   compiling Epson scanning software needs libpng12/png.h (https://www.linuxquestions.org/questions/slackware-14/compiling-epson-scanning-software-needs-libpng12-png-h-4175579164/)

moesasji 05-10-2016 01:00 AM

Quote:

Originally Posted by brobr (Post 5542836)
@Moesasji: yes, my user is in the "scanner" group. I did edit that /etc/sane.d/epoka.conf-file; commented the scsi out (saved on an error message) and added the usb id for the scanner but that is not really making a difference. The V330 is usb-only, alas no network capacity (that might have made it working....)

The scanner is in /lib/udev/rules.d/80-libsane.rules for group lp, so it has a udev rule. My guess would be a udev problem, but I have no clue how to debug those.

btw) for some USB hardware I have udev-rules that explicitly tell not to probe with MTP. Maybe this scanner needs something similar as below?

Code:

ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0142", ENV{MTP_NO_PROBE}="1"

brobr 05-10-2016 04:56 AM

@Moesasj Thanks for the tip. I copied /lib/udev/rules.d/69-libmtp.rules to /etc/udev/rules.d/ and added:

Code:

########Epson Perfection V330 Photo EHB group
ATTR{idVendor}=="04b8", ATTR{idProduct}=="0142", GOTO="libmtp_rules_end"
########added 10-05-2016

in the section
Code:

# Some sensitive devices we surely don't wanna probe
# Color instruments
ATTR{idVendor}=="0670", GOTO="libmtp_rules_end"
....

rebooted and plugged the usb-stuff in:

Code:

[  821.981074] usb 1-1.3: USB disconnect, device number 3
[  825.431127] usb 1-1.3: new low-speed USB device number 4 using ehci-pci
[  825.520544] usb 1-1.3: New USB device found, idVendor=093a, idProduct=2510
[  825.520549] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  825.520553] usb 1-1.3: Product: USB Optical Mouse
[  825.520555] usb 1-1.3: Manufacturer: PixArt
[  825.523349] input: PixArt USB Optical Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:093A:2510.0002/input/input18
[  825.523699] hid-generic 0003:093A:2510.0002: input,hidraw0: USB HID v1.11 Mouse [PixArt USB Optical Mouse] on usb-0000:00:1a.0-1.3/input0
[  843.384098] usb 3-2: new high-speed USB device number 3 using xhci_hcd
[  843.551206] usb 3-2: New USB device found, idVendor=04b8, idProduct=0142
[  843.551213] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  843.551217] usb 3-2: Product: EPSON Perfection V33/V330
[  843.551219] usb 3-2: Manufacturer: EPSON
[  843.551507] usb 3-2: ep 0x81 - rounding interval to 128 microframes, ep desc says 255 microframes
[  843.551519] usb 3-2: ep 0x2 - rounding interval to 128 microframes, ep desc says 255 microframes

Some improvement: never saw those ep desc lines before!
And the mtp-messages are gone...

Still it takes ages for xsane to find a scanner ([epkowa:usb:003:003]), comes up with two options for the same usb-port (003:003) where it is found by lsusb

Code:

bash-4.3$ lsusb
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 8087:07da Intel Corp.
Bus 003 Device 003: ID 04b8:0142 Seiko Epson Corp. GT-F730 [GT-S630/Perfection V33/V330 Photo]
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

xsane crashes whatever option one chooses; iscan, also slow, fades away with an error-message

Code:

Could not send commands to scanner. Check the scanner's status.
I am desperate; have to check whether that scanner is ok.... I am now going to try the thing in windows xp, running in a virtual machine (as if that doesn't bring its own trouble...)


EDIT: well the thing is seen but running the windows version gives the same kind of error.... and the machine doesn't make the typical noises... oh wait, plugging it into a macbook makes it do that... plug the thing back into my laptop and it's dead as a brick.. with iscan running circles ending up with the same error.

EDIT2: bah, from XP in virtual machine: yes it starts up the program and it does everything (after one ticks the USB to 'on' in the 'devices' in the virtual-box menu-bar....)... so it's in my compiled software that it goes wrong somewhere in making the connection with the scanner

EDIT3: When USB connection works, the scanner makes the noises. It goes via ehci on windows, it seems, but under linux (being in the usb3-port now):xhci
Code:

[ 4934.330518] usb 1-1.2: Product: EPSON Perfection V33/V330
[ 4962.958806] vboxdrv: ffffffffc09d2020 VMMR0.r0
[ 4963.001482] vboxdrv: ffffffffc06ce020 VBoxDDR0.r0
[ 4963.002728] vboxdrv: ffffffffc0589020 VBoxDD2R0.r0
[ 4963.068571] vboxdrv: ffffffffc0598020 VBoxEhciR0.r0
[ 4985.383793] usb 3-2: new high-speed USB device number 7 using xhci_hcd
[ 4985.550880] usb 3-2: New USB device found, idVendor=04b8, idProduct=0142
[ 4985.550886] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4985.550890] usb 3-2: Product: EPSON Perfection V33/V330
[ 4985.550892] usb 3-2: Manufacturer: EPSON
[ 4985.551087] usb 3-2: ep 0x81 - rounding interval to 128 microframes, ep desc says 255 microframes
[ 4985.551093] usb 3-2: ep 0x2 - rounding interval to 128 microframes, ep desc says 255 microframes

Trying iscan now is faster in the sense that we reach faster the dead-end; xsane too, gives now 'device busy', (well that's still being grabbed by vbox; turning usb-in vbox off; brings back the slow road to nowhere)

slackartist 05-10-2016 01:33 PM

scanner pr0gz
 
whats listed in /var/log/packages/iscan* ???

take a look at this file from aur.archlinux.org

wget https://aur.archlinux.org/cgit/aur.g...in-v330.tar.gz

iscan-plugin-v330.install

Code:


post_install() {
        ARCH=`uname -m`
        echo "Running iscan-registry to register plugin and firmware with iscan."
        if [ "x$ARCH" == "xi686" ]; then
                iscan-registry -a interpreter usb 0x04b8 0x0142 /usr/lib/esci/libesci-interpreter-perfection-v330 /usr/share/esci/esfwad.bin
        else
                iscan-registry -a interpreter usb 0x04b8 0x0142 /usr/lib64/esci/libesci-interpreter-perfection-v330 /usr/share/esci/esfwad.bin
        fi
}


brobr 05-10-2016 02:05 PM

@slackartist: the three required packages:
Code:

bash-4.3$ ls /var/log/packages/iscan*
/var/log/packages/iscan-2.30.1-x86_64-1alien
/var/log/packages/iscan-data-1.36.0-x86_64-1_sg
/var/log/packages/iscan-plugin-perfection-v330-0.2.0-x86_64-1_sg

sg mark the packages made with adapted scripts from Simone Giustetti, alien, from Eric Hameleers. The data package has an install.sh that generates a udev-rule....which has the line
Code:

ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0142", MODE="0660", GROUP="lp", ENV{libsane_matched}="yes"
/etc/group:
Code:

..
lp:x:7:lp,rob
plugdev:x:83:rob
scanner:x:93:rob
..

still something is not triggered with the scanner via the usb for user rob


EDIT

OK, you enhanced your post... with maybe the golden tip!


According to the Slackbuild a connection with the interpreter is added to the doinst.sh, which reads
Code:

# Create interpreter line for Epson scanners.
echo "interpreter usb 0x04b8 0x0142 /usr/lib64/esci/libesci-interpreter-perfection-v330 /usr/share/esci/esfwad.bin" >> var/lib/iscan/interpreter
( cd usr/lib64/esci ; rm -rf libesci-interpreter-perfection-v330.so.0 )
( cd usr/lib64/esci ; ln -sf libesci-interpreter-perfection-v330.so.0.0.0 libesci-interpreter-perfection-v330.so.0 )
( cd usr/lib64/esci ; rm -rf libesci-interpreter-perfection-v330.so )
( cd usr/lib64/esci ; ln -sf libesci-interpreter-perfection-v330.so.0.0.0 libesci-interpreter-perfection-v330.so )

Only thing: there is no /var/lib/iscan/interpreter on my system (would that not be expected according to above command?).
After making the /var/lib/iscan directory by hand and re-installing the plugin-package, that file is now made! Tada!

Anyway, I ran the Arch command you highlighted.
Code:

iscan-registry -a interpreter usb 0x04b8 0x0142 /usr/lib64/esci/libesci-interpreter-perfection-v330 /usr/share/esci/esfwad.bin
Will see tomorrow whether that has had the wished result.....

ReaperX7 05-10-2016 03:50 PM

Just as an alternative, you could place libpng12 into /opt and use the buildflags to target the libpng install in /opt as opposed to /usr, and install it as part of the actual SlackBuild itself. Then just add it to your system path in /etc/profile.d using a simple configuration file.

brobr 05-10-2016 03:58 PM

@ReaperX7 at the moment there is no longer an issue with libpng; (ArchLinux) patches were available to solve this and at the moment the major problem seems getting the scanner-thing activated through USB, you know one needs to hear those nice rattling sounds that give the impression that the machine is choking up but actually indicate a live-connection between program and scanner. When I get the communication-rattle and then a libpng-failure, your solution will be an option.

brobr 05-11-2016 04:17 AM

1 Attachment(s)
Success! It worked. Straight from Gimp using iscan as a plugin (see attached) or via Xsane. The only naggle is that a) it takes forever to get the scanner going, that is, before the choose-scanner dialog pops up. Then, b) I see 5 devices to chose from; the 2 I saw before and marked 'Epson (unknown model)[epkowa:usb:001:015)' and 3 marked 'Epson Perfection V330 Photo [epkowa:interpreter:001:015]'. The latter options work; the previous ones do not.

I mark this as [Solved] but if anyone has an idea to speed recognition up or to get rid of spurious devices, that would be helpful (I will play around with the iscan-registry, but it may be enough to reboot and clear the USB-devices that have been hanging on the ports between yesterday and today and have been registered; still why 3x the real thing shows up I have no idea... could multiple udev-rules cause this???

@Moesasj @55020 @slackartist @Simone Giustetti @AlienBob Thank you, thank you (and please tell me how to properly search the Arch repository.... as I seem to miss it all the time ;-)

Cheers,

Rob

Xsane 05-11-2016 07:29 AM

Quote:

Originally Posted by brobr (Post 5543686)
... it takes forever to get the scanner going, that is, before the choose-scanner dialog pops up.

This can happen then the net 'backend' is enabled without a network connection (it waits for a connection timeout). Trying all of the other 'backends' can also take time. Try creating an /etc/sane.d/dll.conf that contains only epkowa.

brobr 05-11-2016 07:43 AM

@Xsane, thanks; yes the 'net' and many other backends were still available in the dll.conf; I've commented them out but no immediate improvement (maybe I have to login and out again but I am in the middle of something; will have to test this later)

EDIT
OK, after commenting all these backends out from the dll.conf, having rebooted, the same list of five pops up, again after a longish period. So, let's look at iscan-registry

I found these helpful pages when looking things up about iscan-registry epson-scanner-problem-with-64-bit-slackware; wiki.mageia.org/en/Epson_scanners

By using the iscan-registry, all the three working entries could be removed by running this command three times:
Code:

iscan-registry -r interpreter usb 0x04b8 0x0142 /usr/lib64/esci/libesci-interpreter-perfection-v330 /usr/share/esci/esfwad.bin
but the non-working ones I suspect slow the system down, could not be removed this way.

After uninstalling the three programs and reinstalling them, without running iscan-registry first, I get the two entries again (when running xsane] of which the most descriptive one, as expected, is working. I removed all packages and reinstalled them again and ran
Code:

bash-4.3# iscan-registry -a interpreter usb 0x04b8 0x0142 /usr/lib64/esci/libesci-interpreter-perfection-v330 /usr/share/esci/esfwad.bin
before attaching the scanner.
This gave an extra entry of which I could delete one with the -r version of the command. Thus, it is not needed to run the iscan-registry to get the scanner started/recognized when the /var/lib/iscan/interpreter file is present after installation.

Thus:
Code:

bash-4.3# scanimage -L
device `epkowa:usb:003:011' is a Epson (unknown model) flatbed scanner
device `epkowa:interpreter:003:011' is a Epson Perfection V330 Photo flatbed scanner

It still takes time to come up; this is as good as it gets. Thanks all for the advice.

brobr 05-05-2017 07:56 PM

patch needed for compilation on new gcc 7
 
Just to annotate this thread. On current (06 May 2017) with gcc-7.1, iscan did no longer compile; the iscan.Slackbuild needs to be patched according to
https://bugs.gentoo.org/show_bug.cgi?id=595776.

Code:

patch -p1 -i ${SRCDIR}/[iscan-gcc6.patch]


All times are GMT -5. The time now is 11:21 PM.