You are not logged in.

#1 2021-12-23 08:15:30

nikinbaidarr
Member
Registered: 2021-05-06
Posts: 92

[SOLVED] scanimage: EPSON GT-X830 sane_start: Invalid argument

I am trying to use scanimage to use EPSON GT-X830 scanner for a basic scan. I have installed sane-airscan and also installed iscan as it has support for the scanner that I'm trying to use, as listed here.

I could not find the " DFSG non-free iscan-plugin-gt-x830" package in the AUR although packages for some of the scanners are availble.

I've also add the following line to the files /etc/sane.d/epkowa.conf and epson.conf:

usb 0x04b8 0x0153

When I run

scanimage --format=png --output-file test.png --progress

I get the an errory saying "scanimage: sane_start: Invalid argument".

The output of `lsusb' lists the scanner so it is connected for sure.

Bus 002 Device 008: ID 152d:9561 JMicron Technology Corp. / JMicron USA Technology
Corp. Elements
Bus 002 Device 017: ID 18f8:1286 [Maxxter] USB GAMING MOUSE
Bus 002 Device 020: ID 04b8:0153 Seiko Epson Corp. EPSON Scanner
Bus 002 Device 019: ID 2109:2815 VIA Labs, Inc. USB2.0 Hub
Bus 002 Device 018: ID 258a:002a SINO WEALTH Gaming KB
Bus 002 Device 016: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0bda:0138 Realtek Semiconductor Corp. RTS5138 Card Reader Controller
Bus 001 Device 003: ID 0402:7675 ALi Corp. WebCam
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Can someone please help me with this?

Last edited by nikinbaidarr (2021-12-23 15:59:08)

Offline

#2 2021-12-23 09:16:05

seth
Member
Registered: 2012-09-03
Posts: 50,012

Offline

#3 2021-12-23 10:31:44

nikinbaidarr
Member
Registered: 2021-05-06
Posts: 92

Re: [SOLVED] scanimage: EPSON GT-X830 sane_start: Invalid argument

Apparently, they have only .deb and .rpm packages.

I tried this and now there is no errors. The command runs properly without producing any errors but for some reason, it also does not produce an output file. A file is produced if I redirect things but trying to open it with feh results in the following output:

feh WARNING: nikin.png - Does not look like an image (magic bytes missing)
feh: No loadable images specified.
See 'feh --help' or 'man feh' for detailed usage information

Offline

#4 2021-12-23 10:37:05

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] scanimage: EPSON GT-X830 sane_start: Invalid argument

I tried this and now there is no errors

What exactly did you try? Just installing that package or did you modify it to use the gt-x830 download?


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2021-12-23 11:10:30

nikinbaidarr
Member
Registered: 2021-05-06
Posts: 92

Re: [SOLVED] scanimage: EPSON GT-X830 sane_start: Invalid argument

progandy wrote:

I tried this and now there is no errors

What exactly did you try? Just installing that package or did you modify it to use the gt-x830 download?

Just installed them.

Offline

#6 2021-12-23 12:39:07

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: [SOLVED] scanimage: EPSON GT-X830 sane_start: Invalid argument

You do see your mistake?

Offline

#7 2021-12-23 13:05:04

nikinbaidarr
Member
Registered: 2021-05-06
Posts: 92

Re: [SOLVED] scanimage: EPSON GT-X830 sane_start: Invalid argument

seth wrote:

You do see your mistake?

I think I do but I don't exactly know what to change.

There were four files in iscan-plugin-gt-x820
1. gt-x820.install
2. PKGBUILD
3. iscan-gt-x820-bundle-2.30.4.x64.rpm.tar.gz
4. iscan-plugin-gt-x820-2.2.1-2-x86_64.pkg.tar.zst


I renamed "gt-x820.install" to "gt-x830.install" and changed the product id from 0x013a to 0x0153 in that file. Plus changed the pkgname and source in the PKGBUILD, I don't know how to or what to modify in md5sums or sha256sums vars.

I downloaded the rpm iscan-gt-x830-bundle-2.30.4.x64.rpm.tar.gz from here. I don't know what the last file is or where I can get an equivalent for my scanner.

Nonetheless, when I run makepkg I get

==> Validating source files with md5sums...
    iscan-gt-x830-bundle-2.30.4.x64.rpm.tar.gz ... FAILED
==> ERROR: One or more files did not pass the validity check!

Probably something is not right with the checksums. Is there another way I can validate the checksums? I'm a bit confused here honestly because, in my knowledge rpm packages are supposed to be specific for red hat based distros.
I really believe the scanner will work if I can get this right.

Last edited by nikinbaidarr (2021-12-23 13:25:22)

Offline

#8 2021-12-23 13:42:32

seth
Member
Registered: 2012-09-03
Posts: 50,012

Offline

#9 2021-12-23 14:04:59

nikinbaidarr
Member
Registered: 2021-05-06
Posts: 92

Re: [SOLVED] scanimage: EPSON GT-X830 sane_start: Invalid argument

Wow thanks. I was able to generate the checksums for the builds but like I mentioned I could find a replacement for  iscan-plugin-gt-x820-2.2.1-2-x86_64.pkg.tar.zst.

The output of the makepkg is as follows:

==> Making package: iscan-plugin-gt-x830 2.2.1-2 (Thu 23 Dec 2021 07:41:09 PM +0545)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found iscan-gt-x830-bundle-2.30.4.x64.rpm.tar.gz
==> Validating source files with md5sums...
    iscan-gt-x830-bundle-2.30.4.x64.rpm.tar.gz ... Passed
==> Validating source files with sha256sums...
    iscan-gt-x830-bundle-2.30.4.x64.rpm.tar.gz ... Passed
==> Extracting sources...
  -> Extracting iscan-gt-x830-bundle-2.30.4.x64.rpm.tar.gz with bsdtar
==> Starting prepare()...
bsdtar: Error opening archive: Failed to open 'iscan-plugin-gt-x830-2.2.1-1.x86_64.rpm'
==> ERROR: A failure occurred in prepare().
/usr/share/makepkg/util/message.sh: line 51: QUIET: unbound variable
/usr/bin/makepkg: line 131: logpipe: unbound variable

This is expected because I don't have a file name iscan-plugin-gt-x830-2.2.1-1.x86_64.pkg.tar.zst that bsdtar can extract.

Offline

#10 2021-12-23 14:46:59

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] scanimage: EPSON GT-X830 sane_start: Invalid argument

iscan-plugin-gt-x820-2.2.1-2-x86_64.pkg.tar.zst is the result of running makepkg for the original PKGBUILD.
iscan-plugin-gt-x830-2.2.1-1.x86_64.rpm is a file inside the bundle file you downloaded.
You'll have to fix the version numbers in the PKGBUILD so the correct rpm plugin file can be found
You'll also have to modify the installscript.

Here are the changes I think are needed, at least makepkg builds the package:

diff --git a/iscan-plugin-gt-x820/PKGBUILD b/iscan-plugin-gt-x830/PKGBUILD
index eff3522..ad2ee50 100644
--- a/iscan-plugin-gt-x820/PKGBUILD
+++ b/iscan-plugin-gt-x830/PKGBUILD
@@ -1,4 +1,6 @@
-# Maintainer:  Chris Severance aur.severach aATt spamgourmet dott com
+# Maintainer:  UNKNOWN
+# Contributor: progandy
+# Contributor: Chris Severance aur.severach aATt spamgourmet dott com
 # Contributor: notjustbill
 # Contributor: untitled
 # Contributor: mh00h
@@ -7,23 +9,24 @@
 # Contributor: Internauta
 
 set -u
-pkgname='iscan-plugin-gt-x820'
-pkgver='2.2.1'; _bundlever='2.30.4'
-pkgrel='2'
-pkgdesc='iscan plugin for Epson Colorio GT-X820 Perfection V600 Photo scanners'
+pkgname=iscan-plugin-gt-x830
+pkgver=1.0.1
+_bundlever=2.30.4
+pkgrel=1
+pkgdesc='iscan plugin for Epson GT-X830 scanners'
 arch=('x86_64')
 url='http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX'
 license=('custom')
 depends=('iscan>=2.21')
-install='gt-x820.install'
-source=("https://download2.ebz.epson.net/iscan/plugin/gt-x820/rpm/x64/iscan-gt-x820-bundle-${_bundlever}.x64.rpm.tar.gz")
-md5sums=('f0b466d04e05018af6942e82a571e1f5')
-sha256sums=('63647dac68e26bfee5bd75108cc6a4df0fddb8453a1e3bac2d63dea7db518bee')
+install='gt-x830.install'
+source=("https://download2.ebz.epson.net/iscan/plugin/gt-x830/rpm/x64/iscan-gt-x830-bundle-${_bundlever}.x64.rpm.tar.gz")
+md5sums=('6b827f5484e066d2302f540dbcac591d')
+sha256sums=('3d792c25db38d6cac50fe9026f64fb89a8a20f512d4b6d555b20c64623ee5e52')
 
 prepare() {
   set -u
-  cd "iscan-gt-x820-bundle-${_bundlever}.x64.rpm/plugins"
-  bsdtar -xf "iscan-plugin-gt-x820-${pkgver}-1.x86_64.rpm"
+  cd "iscan-gt-x830-bundle-${_bundlever}.x64.rpm/plugins"
+  bsdtar -xf "iscan-plugin-gt-x830-${pkgver}-1.x86_64.rpm"
   if [ -d "usr/lib64" ]; then
     mv 'usr/lib64' 'usr/lib'
   fi
@@ -32,7 +35,7 @@ prepare() {
 
 package() {
   set -u
-  cd "iscan-gt-x820-bundle-${_bundlever}.x64.rpm/plugins"
+  cd "iscan-gt-x830-bundle-${_bundlever}.x64.rpm/plugins"
   mv 'usr' "${pkgdir}"
   install -Dpm644 "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}"/* -t "${pkgdir}/usr/share/licenses/${pkgname}/"
   rm -r "${pkgdir}/usr/share/doc"

gt-x830.install:

diff --git a/iscan-plugin-gt-x820/gt-x820.install b/iscan-plugin-gt-x830/gt-x830.install
index 32aa187..050401c 100644
--- a/iscan-plugin-gt-x820/gt-x820.install
+++ b/iscan-plugin-gt-x830/gt-x830.install
@@ -1,9 +1,9 @@
 post_install() {
-  echo 'Registering gt-x820 plugins/firmware with iscan'
-  iscan-registry -a 'interpreter' 'usb' '0x04b8' '0x013a' '/usr/lib/iscan/libesintA1' '/usr/share/iscan/esfwA1.bin'
+  echo 'Registering gt-x830 plugins/firmware with iscan'
+  iscan-registry -a 'interpreter' 'usb' '0x04b8' '0x0153' '/usr/lib/iscan/libiscan-plugin-gt-x830' '/usr/share/iscan/Esfw0111.bin'
 }
 
 pre_remove() {
-  echo 'Unregistering gt-x820 plugins/firmware with iscan'
-  iscan-registry -r 'interpreter' 'usb' '0x04b8' '0x013a' '/usr/lib/iscan/libesintA1' '/usr/share/iscan/esfwA1.bin'
+  echo 'Unregistering gt-x830 plugins/firmware with iscan'
+  iscan-registry -r 'interpreter' 'usb' '0x04b8' '0x0153' '/usr/lib/iscan/libiscan-plugin-gt-x830' '/usr/share/iscan/Esfw0111.bin'
 }

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#11 2021-12-23 15:57:48

nikinbaidarr
Member
Registered: 2021-05-06
Posts: 92

Re: [SOLVED] scanimage: EPSON GT-X830 sane_start: Invalid argument

progandy wrote:

iscan-plugin-gt-x820-2.2.1-2-x86_64.pkg.tar.zst is the result of running makepkg for the original PKGBUILD.

I was scrapping the internet like crazy for that file. Also I had most of the diffs already applied, except:

progandy wrote:
diff --git a/iscan-plugin-gt-x820/PKGBUILD b/iscan-plugin-gt-x830/PKGBUILD
-pkgver='2.2.1'; _bundlever='2.30.4'
+pkgver=1.0.1
+_bundlever=2.30.4

diff --git a/iscan-plugin-gt-x820/gt-x820.install b/iscan-plugin-gt-x830/gt-x830.install

 post_install() {
-  iscan-registry -a 'interpreter' 'usb' '0x04b8' '0x013a' '/usr/lib/iscan/libesintA1' '/usr/share/iscan/esfwA1.bin'
+  iscan-registry -a 'interpreter' 'usb' '0x04b8' '0x0153' '/usr/lib/iscan/libiscan-plugin-gt-x830' '/usr/share/iscan/Esfw0111.bin'
 }
 
 pre_remove() {
-  iscan-registry -r 'interpreter' 'usb' '0x04b8' '0x013a' '/usr/lib/iscan/libesintA1' '/usr/share/iscan/esfwA1.bin'
+  iscan-registry -r 'interpreter' 'usb' '0x04b8' '0x0153' '/usr/lib/iscan/libiscan-plugin-gt-x830' '/usr/share/iscan/Esfw0111.bin'
 }

Applying those mods fixed the issues and the scanner is working now. How did you get the get the pkgversion and the .bin firmware? Also how can I upload this directory to the AUR so that others can benefit from this build in the future?

I would really like to thank both you guys for helping me with this. Thank you so much! I am marking it as solved now.

Last edited by nikinbaidarr (2021-12-23 15:58:05)

Offline

#12 2021-12-23 16:10:01

seth
Member
Registered: 2012-09-03
Posts: 50,012

Offline

#13 2021-12-23 17:52:46

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] scanimage: EPSON GT-X830 sane_start: Invalid argument

seth wrote:

I guess he looked into the rpm

Exactly, though I just used the standard archive tools  (bsdtar -xf or file-roller work just fine). Edit: You could also look at the files makepkg puts in the src/pkg directory during a failed run.

Last edited by progandy (2021-12-23 17:55:24)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB